Mark Heath wrote:
Joe Friedrichsen wrote:
After reading mpeg2enc's man page, I decided that changing -F 4 to -F
1 and adding -p would work. However, I was wrong and mpeg2enc changed
the frame rate number to 4 (30000/1001) when it started. The man page
gave me the impression that -p would work for 24fps _source_ material
and tell the decoder to do pulldown at playtime. yuv2fps changed the
framerate to 24000/1001, but mpeg2enc still encoded at 30000/1001.
By removing -p, I got things to work and mpeg2enc kept the source's
24000:1001 frame rate. What am I not understanding about using -p?
24000:1001 is not a valid frame rate for DVD. Thus 3:2 pulldown is
used and the frame rate becomes 29.97.
Programs like mplayer detect the pulldown flags and will play the file
back at 23.976 progressive, even though the mpeg claims to be encoded
at 29.97.
It is confusing, and it took me several attempts to convert film rate
files into something suitable for DVD.
So this is my assumption. That the pulldown option adds an MPEG flag
that causes a stream to go from 23.976 to 29.97, with the correct
interlacing 3:2 pattern. I assume it's encoded somehow into the
stream (I'm guessing null motion interlaced p frames) so that programs
that do not detect it will just play it as 29.97 interlaced, but it is
distinct enough that some programs can detect it and revert to 23.976
progressive.
I have a program that will allow me to convert a 23.976 mpeg
elementary stream to 29.97 very quickly (about 1000 fps) by simply
adding the pulldown flags, so I assume it's not a complex procedure.
Hopefully someone else can explain it better.
So you are correct, adding the -p option makes your mpeg appear as if
it is 29.97 interlaced even though it's 23.976 progressive. This is
perfectly normal behaviour.
That is a great and clear answer. Let me try to reword it (using my
example) to see if I understand...
If I give mpeg2enc 24000:1001 material and specify only -F 1 (no -p),
then mpeg2enc will faithfully encode the stream as 24000:1001 (like it
did for me). The problem is that the resultant file is NOT DVD compliant
(because 24000:1001 is not a valid frame rate).
So, if I have 24000:1001 material and I want to encode for NTSC DVD, I
need to specify -F 4 -p (not -F 1 -p). This way, the encoded file has a
DVD-compliant frame rate (30000:1001) with the proper MPEG flag telling
the decoder to do pulldown (to reconstruct the 24000:1001 video from the
encoded 30000:1001) at play time.
When I encoded with -F 1 -p, mpeg2enc chose the NTSC frame rate to
encode in so that playback would happen as I would expect (a nice 'fix
it' anticipation by the developers).
Is this a good summary?
Joe
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users