AVS Forum


Google™ Search AVS:

Go Back   AVS Forum > Other Areas of Interest > Camcorders



Reply
Forum Jump
 
Thread Tools
Old 06-24-08, 08:28 PM   #1   |  Link


jape41
New Member
 
Join Date: Jun 2008
Posts: 9
linux tips with canon HF10/HF100

I didn't find this info easily with google, so I thought I would aggregate it here.

Getting Files via supplied USB cable
The device seems to have 2 USB modes. It seems to pretend to either be a camera, or a USB mass storage device. The storage device behaviour will let you get both pictures and video off the camera, though you can use gphoto2 to get the pictures off it in "camera mode". If you have the device in "view picture mode" when you connect it to the PC, it will behave like a camera, if you have it in "view movie mode" it will act as a mass storage device. Here's the steps I use:
  • attach the camcorder to the it's power source
  • turn the function selection dial to the blue movie camera icon
  • connect the usb cable to the camcoder
  • plug the usb cable into the PC
  • power on the camcorder
  • the screen on the camcorder will prompt you for the type of usb connection; select PC/Printer
  • If you are lucky the device will automount for you. If not you can mount it manually

Mouting the device manually
First we need to find out what device the usb subsystem has mapped the camcorder to. Open a shell and type "dmesg". This should generate some cannon-like-usb data near the end:

scsi 12:0:0:0: Direct-Access CANON VIXIA HF100 1.00 PQ: 0 ANSI: 2
sd 12:0:0:0: [sdb] 15728640 512-byte hardware sectors (8053 MB)
sd 12:0:0:0: [sdb] Write Protect is off
sd 12:0:0:0: [sdb] Mode Sense: 03 00 00 00
sd 12:0:0:0: [sdb] Assuming drive cache: write through
sd 12:0:0:0: [sdb] 15728640 512-byte hardware sectors (8053 MB)
sd 12:0:0:0: [sdb] Write Protect is off
sd 12:0:0:0: [sdb] Mode Sense: 03 00 00 00
sd 12:0:0:0: [sdb] Assuming drive cache: write through
sdb: sdb1
sd 12:0:0:0: [sdb] Attached SCSI removable disk
sd 12:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete


The important part is the "sdb1". This is the device to mount. As root:

# mkdir /camera
#mount /dev/sdb1 /camera
#cd /camera
# ls -al
total 132
drwxr-xr-x 5 root root 32768 1969-12-31 19:00 .
drwxr-xr-x 22 root root 4096 2008-06-24 20:04 ..
drwxr-xr-x 3 root root 32768 2008-03-29 04:29 dcim
drwxr-xr-x 2 root root 32768 2008-03-30 01:01 misc
drwxr-xr-x 3 root root 32768 2008-03-29 04:13 private


Still pictures can be found in: dcim/101canon
The movies can be found in: private/avchd/bdmv/stream

Playing the .mts (AVCHD) files
Mplayer supports playing these files, but you will need to build mplayer from source. Follow the instructions on getting the source from subversion on the mplayer download page:
http://www.mplayerhq.hu/design7/dload.html

You will also need the binary codecs from the same page.

mplayer needs you to supply a fps ( frames per second) value for the video files you want to play. ie:

mplayer -fps 29.97 myfile.mts

Caveats
  • Mplayer seems to be playing the files correctly, but I can't be sure since my Athlon64-3000 doesn't seem to be powerful enough to play the 1080i60 files I've tried.
  • Now that I think about it the HF10 is probably a bit different since it has flash built in, along with support for the SDHC card.

Corrections or futher tips appreciated.

regards,

jp
jape41 is offline   Reply With Quote
Old 06-25-08, 09:49 AM   #2   |  Link
img eL
Dirtbag of hurt
 
Join Date: Nov 2006
Posts: 743
Wow i hope u can get a more powerful system. Playing 1080i60 avchd files in linux without converting is amazing!
img eL is offline   Reply With Quote
Old 06-25-08, 07:15 PM   #3   |  Link
jape41
New Member
 
Join Date: Jun 2008
Posts: 9
Out of curiosity, what are your system specs? I'm interested in building a new mythfrontend capable of playing the 1080i60 .mts files. Is it true that there is no video card acceleration support (ie xvmc or equivalent) for playing these files on linux?
jape41 is offline   Reply With Quote
Old 06-27-08, 08:00 PM   #4   |  Link
img eL
Dirtbag of hurt
 
Join Date: Nov 2006
Posts: 743
I'm looking to upgrading some time. My main setup right now is just a 2 GHz T7200 core 2 duo, 2GB of memory, NVIDIA GeForce GO 7600 w/ 256 MB. I'm not able to play straight avchd files in linux yet. Keep us tuned
img eL is offline   Reply With Quote
Old 11-01-08, 11:05 AM   #5   |  Link
jape41
New Member
 
Join Date: Jun 2008
Posts: 9
A few updates:

- mplayer/ffmpeg decoding of these files is single threaded. This means that mplayer will not be able to take advantage of multi core systems when playing these files. Basically you need more GHZ, not more cores

- you definitely will want a video card with xvideo support for hardware video scaling. My ATI chipset is not fully documented so no open source driver is available. I have to use the proprietary ATI drivers. I also needed to manually adjust my xorg.conf to include textured video support ( Option "TexturedVideo" "on")

- so far the closest I have come to playing my 1080i60 .mts files is:

mplayer -fs -ao alsa:device=spdif -lavdopts fast=1:skiploopfilter=all -srate 48000 -fps 59.94 file.mts

but my AMD 2.6 GHz X2 5000 seems underpowered. Mplayer is easily chewing up 90%+ CPU on it's core and I wind up with many of these logs printed out:
Too many video packets in the buffer: (127 in 8393208 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
- This blog is a bit old, but I found it useful:

http://blog.charlies-server.com/2007...yback-in-linux

Based on my experiences I wouldn't recommend this camcorder to linux enthusiasts, unless you are OK with transcoding the recordings.

regards

jp
jape41 is offline   Reply With Quote
Old 11-07-08, 08:08 PM   #6   |  Link
jape41
New Member
 
Join Date: Jun 2008
Posts: 9
More useful info I came across:

http://blog.mymediasystem.net/?page_id=14
jape41 is offline   Reply With Quote
Old 07-12-09, 07:27 AM   #7   |  Link
jape41
New Member
 
Join Date: Jun 2008
Posts: 9
Well, being stubborn and refusing to transcode these files, I was eventually able to play the files after upgrading my CPU to an AM3 AMD Athlon II X2 250. The current radeon drivers have support for xvideo, and with a current mplayer svn compiled for 64bit ubuntu, my CPU usage during playback is about 70% for mplayer and 20% for xorg. (note dual core, 200% total, free CPU=~100%)

The command I'm using minimized CPU usage, and offloads audio to my dolby receiver:

mplayer -fs -vo xv -fps 60 -ao alsa:device=hw=0.1 -ac hwac3 -framedrop -lavdopts threads=3:fast:skiploopfilter=all file.mts

video output is over HDMI at 1920x1080

regards

jp
jape41 is offline   Reply With Quote
Old 12-29-09, 10:00 AM   #8   |  Link
mspice
New Member
 
Join Date: Dec 2009
Posts: 1
example files

I want to test out my system and using mplayer/mencoder with these types of files before getting one of these Canon cameras. Would someone be willing to post some sample .mts files to test with? Also, this would give me an opportunity to judge the quality of the camera as well.

Thanks in advance!
mspice is offline   Reply With Quote
Old 12-29-09, 11:28 AM   #9   |  Link
Shadow_7
Senior Member
 
Join Date: Dec 2008
Posts: 380
hv20.com has an hv20.info ftp site with many canon samples.

$ mplayer -idx -geometry 0:0:0:0 -vo xv -ao alsa -brightness 0 -contrast 0 -monitoraspect 1.6 -cache 2048 -lavdopts skiploopfilter=all ./file.mts

-geometry makes it top left with no border.

-monitoraspect because ati's driver doesn't get the aspect ratio right without it when using xv. 1280x800 display on the laptop. 1280/800 == 1.6

-lavdopts skiploopfilter=all to do the least amount of post processing.

And various other ways to speed things up. i.e. close your web browser, too many sites have animated gifs, flash movies, java applets, and other cpu hogs going on and on and on ...... Even those little emoticons hog a lot of cpu when you have 40+ of them on the screen.
Shadow_7 is offline   Reply With Quote
Old 12-31-09, 03:14 PM   #10   |  Link
h-munster
Member
 
Join Date: Jan 2009
Location: Hollywood, CA
Posts: 33
Other mplayer flags.

Try both "-demuxer lavf -vc ffh264" or just "-demuxer lavf" or just "-vc ffh264".
h-munster is offline   Reply With Quote
Reply

Forum Jump

AVS Forum > Other Areas of Interest > Camcorders



Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -5. The time now is 04:44 PM.


Load Balanced and Protected By
 

Hosting Services Powered By

Page generated in 0.18575191 seconds (100.00% PHP - 0% MySQL) with 9 queries

Copyright ©1995 - 2010 AVS Forum.com, Inc. - All Rights Reserved. No information may be posted elsewhere without written permission.