Archived:MEncoder-V4L: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
On an amd64 machine, using Christian Marillat's unofficial mencoder for Debian amd64, mencoder_1.0-pre7-0.0_amd64.deb, I just discovered that mencoder's default framerate for ntsc with the following command comes out as 29 instead of 29.97:
On an amd64 machine, using Christian Marillat's unofficial mencoder for Debian amd64, mencoder_1.0-pre7-0.0_amd64.deb, I just discovered that mencoder's default framerate for ntsc with the following command comes out as 29 instead of 29.97:


mencoder -tv driver=v4l2:width=720:height=480:norm=ntsc -ovc lavc -lavcopts vcodec=mpeg4:vhq -oac mp3lame -lameopts cbr:br=128 -endpos 30 -o outfile.mpg tv:// > /dev/null
mencoder -tv driver=v4l2:width=720:height=480:norm=ntsc -ovc lavc -lavcopts vcodec=mpeg4:vhq -oac mp3lame \
-lameopts cbr:br=128 -endpos 30 -o outfile.mpg tv:// > /dev/null


This has been the case for at least the last three months; what is new is that the latest mencoder version usefully reports "Skipping frame!" once a second. The workaround is to set the framerate explicitly with -fps 29.97.
This has been the case for at least the last three months; what is new is that the latest mencoder version usefully reports "Skipping frame!" once a second. The workaround is to set the framerate explicitly with '''-fps 29.97'''.


In addition, in the most recent version of mencoder for Debian amd64, the default codec for mpeg is FMP4, while it used to be DIVX. To reset it to DIVX, use the -ffourcc DIVX option.
In addition, in the most recent version of mencoder for Debian amd64, the default codec for mpeg is FMP4, while it used to be DIVX. To reset it to DIVX, use the '''-ffourcc DIVX''' option.


The full command gives great results as before, overriding the poor defaults:
The full command gives great results as before, overriding the poor defaults:


mencoder -tv driver=v4l2:width=720:height=480:norm=ntsc -ffourcc DIVX -fps 29.97 -ovc lavc -lavcopts vcodec=mpeg4:vhq -oac mp3lame -lameopts cbr:br=128 -endpos 30 -o outfile.mpg tv:// > /dev/null
mencoder -tv driver=v4l2:width=720:height=480:norm=ntsc -ffourcc DIVX -fps 29.97 -ovc lavc \
-lavcopts vcodec=mpeg4:vhq -oac mp3lame -lameopts cbr:br=128 -endpos 30 -o outfile.mpg tv:// > /dev/null


For unofficial packages of mencoder for Debian, see [http://debian.video.free.fr/ Christian Marillat's Debian Repositories].
For unofficial packages of mencoder for Debian, see [http://debian.video.free.fr/ Christian Marillat's Debian Repositories].

Revision as of 22:35, 19 April 2005

On an amd64 machine, using Christian Marillat's unofficial mencoder for Debian amd64, mencoder_1.0-pre7-0.0_amd64.deb, I just discovered that mencoder's default framerate for ntsc with the following command comes out as 29 instead of 29.97:

 mencoder -tv driver=v4l2:width=720:height=480:norm=ntsc -ovc lavc -lavcopts vcodec=mpeg4:vhq -oac mp3lame \
 -lameopts cbr:br=128 -endpos 30 -o outfile.mpg tv:// > /dev/null

This has been the case for at least the last three months; what is new is that the latest mencoder version usefully reports "Skipping frame!" once a second. The workaround is to set the framerate explicitly with -fps 29.97.

In addition, in the most recent version of mencoder for Debian amd64, the default codec for mpeg is FMP4, while it used to be DIVX. To reset it to DIVX, use the -ffourcc DIVX option.

The full command gives great results as before, overriding the poor defaults:

 mencoder -tv driver=v4l2:width=720:height=480:norm=ntsc -ffourcc DIVX -fps 29.97 -ovc lavc \ 
 -lavcopts vcodec=mpeg4:vhq -oac mp3lame -lameopts cbr:br=128 -endpos 30 -o outfile.mpg tv:// > /dev/null

For unofficial packages of mencoder for Debian, see Christian Marillat's Debian Repositories.

I don't have a TV card on a x86 machine and can't report on whether the same tweaks are required there.

Dave