dvgrab / ffmpeg capture / compression


Recently I volunteered to record video for the DrupalCamp Seattle 2008. It quickly dawned on me that to record 10 hours of video, bring it home and capture it to disk and then compress it would take 30+ hours. Also, that wouldn't be anywhere close to live and they were hoping to post the video as soon as possible. Since I am only running Linux on my laptops now, I decided to see what could be accomplished via command line tools in Linux. I quickly stumbled on ffmpeg and dvgrab. DVgrab can capture raw dv from firewire and has features for detecting scenes when capturing from tape. FFMPEG can also capture directly from the firewire, but specializes in converting (transcoding) video from one format to another.

When capturing directly from firewire using ffmpeg I would get glitches every now and then.

ffmpeg -f dv -i /dev/dv1394/0 -target ntsc-svcd output.mpg

FFMpeg takes an input file (or multiple input files) and an output file.
The parameters for each come before the file.


If I tried writing raw DV from ffmpeg I would get IO errors basically stating my computer couldn't andle the throughput.

But, dvgrab worked flawlessly!

dvgrab -format raw test.dv

Since both can use pipes I tried piping dvgrab directly into ffmpeg.

dvgrab -format dv1 - | ffmpeg -f dv -i - -target ntsc-vcd test.mpg

This worked wiithout any glitches.
 So the next step was to figure out which format would give me the best compression vs. quality.

To do this I wrote a perl script which allowed me to easily experiment by converting a raw dv input file to various formats.
I have attached that script called encodetest.pl below.

After experimenting, I decided to go with flv since the video was to be posted to blip.tv, and blip.tv will convert anything posted to flv accept for flv which it leaves alone.
I tried posting some short xvid samples, ad they were taking an hour or more for blip.tv to convert, so flv had the additional advantage of being available instantly.

Next I wrote a very tiny perl script to encode video using the current timestamp as the filename and added it as a command to my desktop. Now all I had to do is literally click an icon to record and compress video to the conference. I have attached this perl script as well named rec_druplicon.pl

essentially the command it produces is:

dvgrab -format dv1 - | ffmpeg -deinterlace -f dv -i - -f flv -vcodec flv -s 480x270 -aspect 16:9 -qscale 3.5 -acodec libmp3lame -ab 32k -ar 22050 timestamp.flv


So how did it turn out?

As far as the recording, it went flawlessly. I was even able to post some of the videos during the next talk. The conditions could have been better. For some talks the lighting was poor in that the ambient light in the room was too bright to see the projector. In the main theatre, I was in the far back of the room and there was no PA, so the audio is faint, but the realtime recording/encoding worked better than expected. You can view all of the recordings at http://seadug.blip.tv/posts?view=archive&nsfw=dc

Some of the benefits of realtime encoding.
1. I could change tape without interupting the hard disk recording.
2. I could stop and start which automatically created multiple files named by timestamp.
3. All of the video from 2 days of recording fit easily n a DVD.
4. Most important, no slow post capture / compression so I was done as soon as I left the conference.

encode_test.pl.txt12.82 KB
rec_druplicon.pl.txt956 bytes
(Thanks to everyone who comments)


Hey ! Thanks for sharing - www.votesfactory.com


Nice Article..

agen bola secrets

Way cool! Some very valid points! I appreciate you penning this article plus the rest of the website is also very good.agen bola secrets

bola tangkas


Thanks for such a great article here. I was searching for something like this for quite a long time and at last I’ve found it on your blog. It was definitely interesting for me to I read about web applications and their market situation nowadays. thanks one more time and keep posting such nice ones in the nearest future too
GATE 2016 ResultBest Morning QuotesPlus one Improvement exam result 2015Kerala Hse Plus Two (+2) Result 2016Kerala Hse Plus One(+1) Results 2016jobs
Kerala Hse Result 2016cbse Result 2016
aipgmee2016results10 Result 2016
sslc Result 2016newyear2016
Get thisCheck AvailabilityTrendingnewsTrendingnews


Thanks for sharing itunes codes free


You can get unlimited generatoe codes and itunes codes,gift card for i phone to get this link. http://itunesgiftcardcodesfree.com

And It Works

Very glad to see that someone found this and that it helped. Thanks for leaving a comment too!This is one of the good articles you can find in the net explaining everything in detail regarding the topic. I thank you for taking your time sharing your thoughts and ideas to a lot of readers out there

thanks nice blog

I am thankful for the article.Really looking forward to read more.new year 2016 happy new year 2016
bonne année 2016 Journée internationale des droits des femmes 2016

great post


great post


Check Cashing Spring-Valley

Me including ones working hard with and may lose time waiting for far more write-up seeing that by people seeing that write-up afforded everyone joy and provides many aids you to complete similar do the job here. At this point stop by Check Cashing Spring-Valley My business is likewise presenting some sort of referrals web page link of this blog site around my research study. Appreciate it intended for placing like beneficial information. Hold placing.


Find the best essays and term papers only on http://essayservicey.com! The best and reliable!

Millions are seeking relief

Millions are seeking relief using the same kind of outdated devices that only turn out costing energy and income. The so-called comfort just uses a different way of debt. You'll find better approaches. rainbow-finance

Scientific works inside theories involving finances along with credit, good specification in the research subject, are characterized to get many-sided along with many-leveled. vipcarfinance

Looking to teach your kids about income management? The sooner you start this procedure, the easier it's going to be for your kids to acquire financial habits that could benefit the puppy for a long time, and reduce them via moving household after higher education in critical debt. teachingfinance


king of thieves hack
También fue algo confuso para muchas personas. Aunque casi cualquiera puede ver cuánto más difícil se ha vuelto hacer un beneficio poner premium sólo para iPad juegos de rol, Vogel siempre parecía dedicados a la base de fans que había construido en la plataforma.

king of thieves trucos

Essay writing help!

I always like college workshops! Here is a resource for you guys that will help you to pass all your university tasks!

They inferred that scholarly

They inferred that scholarly 70-463 vce constancy and execution enhances when understudies are taught to create positive outlooks and are likewise taught viable learning VCP510-DT vce methodologies. They found that understudy determination is a result of scholarly mentalities and metacognition and self-administrative aptitudes 642-887 vce

tips and clues

Most of the students loose their minds during exams and tests. Using skilled assisatnce may help you to save your time and get fine results at your test.
Open source on demand.


Your blog post is just completely quality and informative related to traders hits.. Many new facts and information which I have not heard about before. Keep sharing more blog posts.

club penguin code

this is the best place to get unlimited cheats and codes of club penguin if you are looking for club penguin free membership then visit here

club penguin code

this is the best place to get unlimited cheats and codes of club penguin if you are looking for club penguin free membership then visit here


Well somehow I got to read lots of articles on your blog. It’s amazing how interesting it is for me to visit you very often.

The education regarding

The education regarding meaning beliefs becomes necessary regarding greater existence. The value of the part of write my papers very fast grabessays.com neighborhood holds the beds base regarding contact. The persons interact jointly using this type of mechanism.


Clash of clans hack
In recent years, Android is a platform and ecosystem grown tremendously. It surrounds us and is growing for many meaningful. We feel it (partly because of) our task to enrich technology for everyone to make it understandable and show how Android your life. Our slogan Discover the power of Android is key.
clash of clans gems hack

Hydroxycut Reviews

Thanks so much with this fantastic new web site very fired up to show it to anyone. It makes me so satisfied your vast understanding and wisdom have a new channel for trying into the world..
Hydroxycut Reviews

A student really should

A student really should sense satisfy anytime they tidies up or matches any kind of task together with success. They wouldn’t possibly be confounded in addition trust paper wrіtіng to uncertain. They need to be self-assured at their expertise in addition to skills.

The actual politics

The actual politics scientific disciplines is usually a systematic examine involving condition and its companies. The study us essay wrіtіng servіce involving government, it is areas for instance legislature, account manager and also judiciary.

Zoology would be the study

Zoology would be the study involving animals that has established his comment is here UN universe. It relates to your located design, their composition.


Every single student has his favorite teacher. Next to his teacher he feels at ease. That is a huge trouble in various students. They GrabMyEssays wrіte my papers will show unpredicted actions having different teachers which appear to never end up being great.


This is what I have been searching in many websites and I finally found it here. Amazing article. I am so impressed. Could never think of such a thing is possible with it...I think you have a great knowledge especially while dealings with such subjects. SlimQuick

Students need to be

Students need to be evaluated within the angles in their category performance, with the wisdom involving forms within examinations. Student’s performance source can certainly only always be evaluated by means of screening these people as a result of different ways in addition to techniques.

A person has to know the way

A person has to know the way he can make selections. He must be aware even though they are managing along with servant, car owner or even any smartcustomwriting.net kind of member of staff at your home. He really should manage over the fury and ruthless behavior in stress filled circumstance and have to take care of neat head. This well mannered and variety behavior towards member of staff may also improve the quality of life.

Unbelievable stuff and

Unbelievable stuff and quality content written by our online staff and workers. I am really surprised from positive unique response from all over the world. Time factor matters a bit, take few minutes on http://www.topbritishessays.com/writing-help-co-u-review share this with all of your friends online for better educational process and networks. I am willing to increase my whole process and setup.


But this year, again a pain. I think I've never had such a density of successful games. But the PC gave me enough already Entertainment. Endless Legend, Civilization V: The Complete Edition or even Civilization: Beyond Earth handcuffed me for an hour to the monitor. On the Wii U, it does not look much better. Hyrule Warriors, Mario Kart 8 or Bayonetta 2 are just three of the many games that repeatedly proved to me that the console is among one of the most underrated this year. The One? Aside from all the wrangling for winding up, Kinect and so, they also offered me a lot of entertainment. Destiny, Sunset overdrive or Valiant Hearts were brilliant games, no matter what others say! And the PS4 I will not of course forget. Since I discovered last Steam World Dig for me and learned to love it.
eternity warriors 3 hack

There are certainly a lot of

There are certainly a lot of details like that to take into consideration.I read and understand the entire article and I really enjoyed it to be honest. aida , safira400 , aidamotor

This is one of the good

This is one of the good articles you can find in the net explaining everything in detail regarding the topic. I thank you for taking your time sharing your thoughts and ideas to a lot of readers out there

just brilliant

I've been struggling with streaming from a firewire device for ages and this tutorial helped me sort it all out. Great stuff and thankyou.


Any chance of pulling off something similar on osx?

It should work, but I

It should work, but I haven't tried it on OSX
I have a mac so I can give it a try.
First install ffmpeg and dvgrab. Either compile from source or use macports http://www.macports.org/

Then everything else should work as outlined above.

Instant Video

I love this approach. We do a similar thing when we broadcast our church sermons. Our biggest issue is swapping out the camera batteries in the middle of the sermon. We have an old church with very few outlets, so one of the cameras cannot run from electricity. We end up cutting away and go with the distant shot during the battery swap, which works out ok. I agree that Linux is the way to go to get these things done. So much easier and user friendly than Windows.

Camera batteries

If you're swapping out a lot of camera batteries then you should consider buying them in bulk. You can try this https://www.batterytex.com/browse/category/Digital%20Camera%20Batteries. They have really good prices.


I'm also using Linux on my laptop. I used FFMpeg with input and found the result was effective and the quality of the image was perfect!! I noticed that the moving command was easier than I thought. Nice article!

Thanks mate!

Hey! Thanks for sharing this! You saved me some headaches on finding the right settings for doing that! Great!

realtime encoding doesn't work on my system

I tried your command lines, but I didn't got a realtime encoding. It seems that my pc is just grabbing dv video from my camera in 1gig pieces named -001.avi, -002, and so on, without encoding them. Cpu usage is very low.
I'm on ubuntu and tried also with a self compiled version of ffmpeg (and before with the medibuntu package). My system should be powerful enough (Athlon X2, 4gig ram). I cut and copied your string, and I can't find out what's wrong. May you or any other reader of this blog help me?
Thanks in advance

P.S. When I launch the commands, I get two warnings: Cannot set RR-scheduler and Cannot disable swapping

I got it

After two days of googling around hopelessly, I understood why your method wasn't working for me. It can be interesting for everyone has dvgrab 3.0 in his/her system. That version has stdout ( - ) broken. Man has to remove it and compile a newer ( or older) version from source. Hope it will be useful to someone.
Regdx, sorry for asking/writing something probably off topic to your blog, the reason is that's on top of google when searching about direct encoding or something similar...

Glad you were able to get

Glad you were able to get this working. And thanks for the comment about dvgrab being broken in the repositories. Instead of dvgrab you can also use ffmpeg an set the input to the firewire device, but on a slow laptop I had much better performance using dvgrab. On newer systems ffmpeg should work fine though.

great tip - thanks!

I'm going to be taking a multiday train trip soon, and your tip will let me record as much of it as I want, without wasting expensive HI-8 tapes. I'm using mpeg4 instead of flv, it works to be roughly 250mb/hour in my early tests. I might bump the bitrate a little - none the less, it's way better than having to store the raw uncompressed dv files.


Very glad to see that someone found this and that it helped. Thanks for leaving a comment too!

i would like to register on your site

what a really ventured article posted.

You can register if you want

Registrations are moderated.
You must include legitimate details to be approved.
Since you tried to include spam in your comment your request would be denied - sorry!

Post new comment

More information about formatting options