|
|
![]() |
|
|
|
|
|
#1 | Link |
|
|
New Member
|
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:
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
Corrections or futher tips appreciated. regards, jp |
|
|
|
|
|
|
#5 | Link | |
|
New Member
|
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).- 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 |
|
|
|
|
|
|
#7 | Link |
|
New Member
|
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 |
|
|
|
|
|
#8 | Link |
|
New Member
|
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! |
|
|
|
|
|
#9 | Link |
|
Senior Member
|
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. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|