ot: capture hdv to hd with realtime preview

dreamlx wrote on 9/9/2007, 7:36 AM
Hi,

The known solution for this is Dvrack, now Adobe Onlocation, however as far as I know (correct me if I am wrong) it can no longer be purchased separately, but only in conjunction with Premiere Pro, therefor I searched for another solution, and I have found one (not so advanced, but only hdv to harddisc capture and realtime preview) and this completely free.

What you need to do:

1. install Ubuntu linux 7.04
2. compile latest dvgrab (www.kinodv.org)
3. compile latest mplayer (www.mplayerhq.hu)

How to use it:

simply open a terminal window and use the following command

dvgrab -format hdv -buffers 200 | tee <file to capture video to> | mplayer -fs -cache 8192 -fps 50 -vc ffmpeg2

Explanations:

-fs

switch to fullscreen

-cache 8192

buffer 8 mbytes prior to start playback (needed to prevent mplayer from aborting as first frame might be something other than an I frame)

-fps 50

this might seem irritating at first, but in fact isn't. When using 25fps, and for some reason mplayer isn't able to decode a frame in time, frames build up in the buffer, which after a certain amount of time will be full and capture will be aborted. By using 50fps, playback is anyway done only with 25fps as frames are played at the speed they have been captured. However if one frame is decoded too late, the following frames will be decoded at 50fps until playback is again in realtime (in fact not realtime, but realtime +1 sec, due to the delay introduced by the camcorder). So the buffer never becomes full.

-vc ffmpeg2

normally libmpeg2 is used for decoding mpeg in mplayer, but I prefer ffmpeg as it displays errors on bad frames on console, so you also notice errors in mpeg stream during capture


I have tried this on an old 2.6ghz P4 notebook, and capture and preview worked flawlessly and in realtime on this machine (tested with 30minute captures).

Hope this might be useful for someone of you.

Comments

rmack350 wrote on 9/9/2007, 10:15 AM
Saved the text to my Ubuntu desktop. I've got all the free parts, now I just need an HDV camera...

Thanks!

Rob Mack
JohnnyRoy wrote on 9/9/2007, 1:37 PM
I couldn't find a screen shot of DVGrab on that site but Vegas already captures DV/HDV direct to disc with preview so I'm not sure what this buys you. The beauty of the now defunct DV Rack was the "rack", i.e., the wave form monitor, histograms, blue gun/bars, white balance, zebras, etc. that made it a true field monitor that you could trust. Not sure if DVGrab has any of these or even the ability to calibrate your laptop as a monitor.

Still, it sure is good to see more software for Linux.

~jr
dreamlx wrote on 9/9/2007, 1:42 PM
this should also work for dv with this slightly modified commandline but I have not tested

dvgrab -format raw -buffers 200 | tee <file to capture video to> | mplayer -fs -cache 8192 -fps 50 -vc libdv

I have also noted that tee uses a bit to much resources (althought it shouldn't be an issue with a >2.6 ghz machine). I have written vtee which is a faster implementation of tee. I am currently testing it and publishing it shortly.
dreamlx wrote on 9/9/2007, 1:50 PM
It is normal that you couldn't find a screenshot of dvgrab as dvgrab is a utility to capture dv/hdv and write it to file or to stdout. It is only the acquisition part. Processing is done by applications to which the output is piped. Output is displayed by mplayer which currently doesn't include plugins to display histogramms etc, but it should be possible to write these.

I prefer this solution over the vegas capturing module, as I prefer doing realtime operation on the os which I find best for these (Linux).

4eyes wrote on 9/9/2007, 8:13 PM
I don't capture in Linux, but really like playing back the videos from my linux machine on the
monitors & the hdtv, the realtime playback is nice because I have full control over how the video is displayed on the hdtv in 480i/480p/720p/1080i.

I've done this a few times through a gigabit switching hub. On the windows machine, I'll map a drive to my linux box that's running samba.
Then on the windows machine again using HDVSplit capture direct to the mapped drive which is my Linux harddisk. Then play it back using VLC, mplayer, xine etc as it's being captured.

Maybe the next release of Kino will support HDV.

VLC has a nice de-interlacer, start VLC with this command:
vlc --vout-filter=deinterlace --deinterlace-mode=linear xxxx.m2t
or change default startup framesize
vlc --zoom=.25 --vout-filter=deinterlace --deinterlace-mode=linear xxxx.m2t
vlc --zoom=.5 --vout-filter=deinterlace --deinterlace-mode=linear xxxx.m2t