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:
In some recent versions of mencoder, the 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 \
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
-lameopts cbr:br=128 -endpos 30 -o outfile.mpg tv:// > /dev/null


This is using Christian Marillat's unofficial package of mencoder for Debian amd64, mencoder_1.0-pre7-0.0_amd64.deb and may or may not apply to other versions.
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'''.


The fact that the framerate is slightly off is not noticeable in playback, and has been the case for at least three months, from January 2005. What is new is that the latest mencoder version usefully reports "Skipping frame!" once a second during recording. 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, 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:
Line 15: Line 17:
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].


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


Dave
Dave

Revision as of 22:47, 19 April 2005

In some recent versions of mencoder, the 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 is using Christian Marillat's unofficial package of mencoder for Debian amd64, mencoder_1.0-pre7-0.0_amd64.deb and may or may not apply to other versions.

The fact that the framerate is slightly off is not noticeable in playback, and has been the case for at least three months, from January 2005. What is new is that the latest mencoder version usefully reports "Skipping frame!" once a second during recording. The workaround is to set the framerate explicitly with -fps 29.97.

In addition, in the most recent version of mencoder, 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 or other platforms and can't report on whether the same tweaks are required there.

Dave