I actually thought people would be more aware of this stuff. I've made quite a few vids for the echoes wiki and all of them were done on PAL echoes at 60 Hz. I might as well post all the problems I've had with video capture and my solutions for all of them.
My cap card is some crap Avermedia DVB thing, it's the usual BT878 chipset which all cheap cards will use. I had nothing but problems with it, even using the supplied software and drivers it would not capture AVIs without sound glitches (this is of course all on PAL). I only have the card because I accidentally stumbled across a security vulnerability in the website of a well known British electronic parts supplier, and being the good fellow that I am, figured out a working exploit, sent it to them via email, and recommended they fix it pronto. :P
The supplied software was no good, so I moved to virtualdub next. This had a problem which both Flamancipator and jng have reported, that being losing sychronisation between video and audio, so by the time you've recorded ten minutes of play, your audio is way behind your video (or is it ahead ? I can't remember, and I don't care much). I *think* this is caused by video frames being dropped but no compensative action being taken by the recording software, so the video ends up shorter than the audio, but regardless of what caused it, it was very annoying, as it made the card useless.
I can't remember what I did next, but in the end I came across a combination which worked for me on PAL at 50 Hz. The combination was BaoTV
http://www.terra.es/personal2/jmbbao/
and a set of alternative open source drivers for BT878 cards. I can't remember where I found them originally, but I have them mirrored here:
http://www.ali1548.ukshells.co.uk/btwdmdrvinstaller5.3.8.zip
There is probably a newer version by now, but those are the ones that worked for me. More recently I have persuaded this combination to do 60Hz capture as well. BaoTV doesn't look up to much, but really it does everything you need to capture AVIs and nothing you don't need; once you have the AVI you just load it into virtualdub and proceed as usual. Flamancipator's BT878 card had exactly the same desync problems as mine, and the BaoTV / open source drivers combo worked perfectly for him as well (on NTSC, this time), the only difference being that I handed the solution to him and he didn't have to spend three months figuring it out himself. :P
Before Echoes came out I'd moved my everyday computing activities onto Linux, so this stuff didn't matter any more. However when jng was having problems with his capture, I was roped in to help again. According to some site I came across, his card wasn't a BT8xx card, so I assumed the open source drivers and BaoTV (which was specifically written for the BT8xx chipset) wouldn't work, so I looked for another solution. I knew that VideoLAN client had the ability to capture video from a source because of my experiments with it on Linux, so I booted Windows and looked for a way to convince it to capture video on Windows XP. It took a day or two, but eventually I came up with this (this is a batch [.bat] file):
edit: code snipped to restrain horizontal scrollbars - nate
(you can get this at
http://www.ali1548.ukshells.co.uk/scu/vlc_60hz_capture.bat
)
Just quickly, to use it you need to
i) find the exact names of the video and audio capture devices you're going to use (they're in the Control Panel under "Sound, Video and Game Controllers")
ii) install VLC for windows ( http://www.videolan.org/vlc/ )
iii) place the batch file into your c:\Program Files\VideoLAN\VLC\ directory or wherever
iv) edit the batch file in notepad, and place the appropriate device names from the control panel into the quotes at the top of the batch file (I'm assuming they have to be exactly right)
v) run the batch file
vi) do a prime single-segment 1:00 run
vii) type "quit" into the VLC console to save the file to whatever filename you specified at the top of the batch file.
The only codec I could get to work reliably here was Motion JPEG (vcodec=MJPG), which winamp and windows media player didn't seem to like much, but virtualdub (or vdubmod anyway, not sure about vanilla vdub) has an import filter for it, so you can just encode and save in the normal way. It looks a bit long winded, but it worked fine on my card.
jng didn't use this method in the end, he found some settings for a program called DSelect that worked for him (PAL-60 again here), but you'd have to ask him about that.
The final thing I'll mention is capturing on Linux, which is how all the videos on the echoes wiki that I made were done. This is not a quick solution because it will invariably involve a kernel recompile to make available the relevant video for linux / I2C / BT878 drivers in the Linux kernel. If you know enough about Linux or can find an appropriate howto (they do exist), though, this works pretty well. The software I use to actually do the capture is mplayer (or mencoder to be precise), with a script that looks like this:
Again you need to make sure the version of mplayer you're using has video for linux support compiled in, the default one on arch-linux does not, so I had to compile mplayer from source (annoying, but probably not as hard as it sounds). Needless to say this does PAL-50 and PAL-60 with no problems (the above script is for PAL-60 as selected by normid=7 and fps=30). This one uses MPEG-4 one pass to capture, although it would be easily modifiable to use huffyuv or whatever.
The observant will notice that my videos on the wiki are not perfect. Some of them suffer from low video quality, and nearly all of them have a strange "burp" at the end. However both of these are twopass encoding problems, not capture problems, so what I have provided here is still sound (and I've fixed the video quality problem now by changing a setting for the open source divx snap-in replacement codec I'm using). The sound problem persists, but it's only a minor annoyance, so I never bothered investigating ways to fix it.
Finally I'll just say that Linux users can find a good Linux replacement for virtualdub in the avidemux2 project:
http://avidemux.sourceforge.net/
which is not as good as vdub, but is not bad either. I usually crop my videos using this, save them and then do the encodes in two passes using shell scripts which call mencoder again (you can have those too if you want them).
avidemux2 has also been ported to mac os X as part of the fink and darwin-ports projects, although once more getting it up and running is unlikely to be trivial.
http://darwinports.opendarwin.org/
http://fink.sourceforge.net/
My cap card is some crap Avermedia DVB thing, it's the usual BT878 chipset which all cheap cards will use. I had nothing but problems with it, even using the supplied software and drivers it would not capture AVIs without sound glitches (this is of course all on PAL). I only have the card because I accidentally stumbled across a security vulnerability in the website of a well known British electronic parts supplier, and being the good fellow that I am, figured out a working exploit, sent it to them via email, and recommended they fix it pronto. :P
The supplied software was no good, so I moved to virtualdub next. This had a problem which both Flamancipator and jng have reported, that being losing sychronisation between video and audio, so by the time you've recorded ten minutes of play, your audio is way behind your video (or is it ahead ? I can't remember, and I don't care much). I *think* this is caused by video frames being dropped but no compensative action being taken by the recording software, so the video ends up shorter than the audio, but regardless of what caused it, it was very annoying, as it made the card useless.
I can't remember what I did next, but in the end I came across a combination which worked for me on PAL at 50 Hz. The combination was BaoTV
http://www.terra.es/personal2/jmbbao/
and a set of alternative open source drivers for BT878 cards. I can't remember where I found them originally, but I have them mirrored here:
http://www.ali1548.ukshells.co.uk/btwdmdrvinstaller5.3.8.zip
There is probably a newer version by now, but those are the ones that worked for me. More recently I have persuaded this combination to do 60Hz capture as well. BaoTV doesn't look up to much, but really it does everything you need to capture AVIs and nothing you don't need; once you have the AVI you just load it into virtualdub and proceed as usual. Flamancipator's BT878 card had exactly the same desync problems as mine, and the BaoTV / open source drivers combo worked perfectly for him as well (on NTSC, this time), the only difference being that I handed the solution to him and he didn't have to spend three months figuring it out himself. :P
Before Echoes came out I'd moved my everyday computing activities onto Linux, so this stuff didn't matter any more. However when jng was having problems with his capture, I was roped in to help again. According to some site I came across, his card wasn't a BT8xx card, so I assumed the open source drivers and BaoTV (which was specifically written for the BT8xx chipset) wouldn't work, so I looked for another solution. I knew that VideoLAN client had the ability to capture video from a source because of my experiments with it on Linux, so I booted Windows and looked for a way to convince it to capture video on Windows XP. It took a day or two, but eventually I came up with this (this is a batch [.bat] file):
edit: code snipped to restrain horizontal scrollbars - nate
(you can get this at
http://www.ali1548.ukshells.co.uk/scu/vlc_60hz_capture.bat
)
Just quickly, to use it you need to
i) find the exact names of the video and audio capture devices you're going to use (they're in the Control Panel under "Sound, Video and Game Controllers")
ii) install VLC for windows ( http://www.videolan.org/vlc/ )
iii) place the batch file into your c:\Program Files\VideoLAN\VLC\ directory or wherever
iv) edit the batch file in notepad, and place the appropriate device names from the control panel into the quotes at the top of the batch file (I'm assuming they have to be exactly right)
v) run the batch file
vi) do a prime single-segment 1:00 run
vii) type "quit" into the VLC console to save the file to whatever filename you specified at the top of the batch file.
The only codec I could get to work reliably here was Motion JPEG (vcodec=MJPG), which winamp and windows media player didn't seem to like much, but virtualdub (or vdubmod anyway, not sure about vanilla vdub) has an import filter for it, so you can just encode and save in the normal way. It looks a bit long winded, but it worked fine on my card.
jng didn't use this method in the end, he found some settings for a program called DSelect that worked for him (PAL-60 again here), but you'd have to ask him about that.
The final thing I'll mention is capturing on Linux, which is how all the videos on the echoes wiki that I made were done. This is not a quick solution because it will invariably involve a kernel recompile to make available the relevant video for linux / I2C / BT878 drivers in the Linux kernel. If you know enough about Linux or can find an appropriate howto (they do exist), though, this works pretty well. The software I use to actually do the capture is mplayer (or mencoder to be precise), with a script that looks like this:
Code:
#!/bin/bash /home/ali/bin/mplayer/bin/mencoder -ovc lavc -oac pcm -tv driver=v4l2:input=1:device=/dev/video0:normid=7:alsa:width=384:height=288:brightness=5:contrast=10:fps=30 -vf-add kerndeint=5,crop=x=9:y=9:w=360:h=268 -o ~/`date +%y%m%d%H%M%S`.avi -lavcopts vcodec=mpeg4:vbitrate=4000 tv://
Again you need to make sure the version of mplayer you're using has video for linux support compiled in, the default one on arch-linux does not, so I had to compile mplayer from source (annoying, but probably not as hard as it sounds). Needless to say this does PAL-50 and PAL-60 with no problems (the above script is for PAL-60 as selected by normid=7 and fps=30). This one uses MPEG-4 one pass to capture, although it would be easily modifiable to use huffyuv or whatever.
The observant will notice that my videos on the wiki are not perfect. Some of them suffer from low video quality, and nearly all of them have a strange "burp" at the end. However both of these are twopass encoding problems, not capture problems, so what I have provided here is still sound (and I've fixed the video quality problem now by changing a setting for the open source divx snap-in replacement codec I'm using). The sound problem persists, but it's only a minor annoyance, so I never bothered investigating ways to fix it.
Finally I'll just say that Linux users can find a good Linux replacement for virtualdub in the avidemux2 project:
http://avidemux.sourceforge.net/
which is not as good as vdub, but is not bad either. I usually crop my videos using this, save them and then do the encodes in two passes using shell scripts which call mencoder again (you can have those too if you want them).
avidemux2 has also been ported to mac os X as part of the fink and darwin-ports projects, although once more getting it up and running is unlikely to be trivial.
http://darwinports.opendarwin.org/
http://fink.sourceforge.net/
Thread title: