[MPlayer-users] Re: Telecine output - needed for NTSC DVD encoding

Tobias Diedrich ranma at gmx.at
Tue Mar 9 16:08:44 CET 2004


Bruno wrote:

> No, no, no. It becomes 23.976fps progressive with or without softpulldown, 
> the only thing this filter makes is delete the first field of the first 
> frame and then the field order gets reversed and the whole thing looks 
> interlaced. I can prove it anytime, and already did on that post.

Well, the real problem with this is, that mencoder and mplayer can not
properly handle a video filter chain that outputs more frames than it
was fed.
I remember now, that when I wrote softpulldown I also patched
vo_yuv4mpeg so that it will output the increases framerate and used
mplayer and a stream.yuv pipe to get it working.
(See http://www.sim.uni-hannover.de/~td/smdiff.html)

Maybe it would be easier to teach libavcodec to insert the right field
flags for 24000/1001 fps video.

So, to really make softpulldown useful for your case, apply the
following patch

------cut-----------
Index: libvo/vo_yuv4mpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_yuv4mpeg.c,v
retrieving revision 1.15
diff -u -r1.15 vo_yuv4mpeg.c
--- libvo/vo_yuv4mpeg.c	2 Sep 2003 17:40:41 -0000	1.15
+++ libvo/vo_yuv4mpeg.c	9 Mar 2004 14:21:27 -0000
@@ -275,6 +275,10 @@
 
 static void flip_page (void)
 {
+}
+
+static void do_flip_page (void)
+{
 	uint8_t *upper_y, *upper_u, *upper_v, *rgb_buffer_lower;
 	int rgb_stride, uv_stride, field_height;
 	unsigned int i, low_ofs;
@@ -383,6 +387,7 @@
 			}
 			break;
 	}
+	do_flip_page();
 	return 0;
 }
-----------cut-----------

And then use:

mkfifo stream.yuv
mplayer -nosound -fps 30000/1001 -vo yuv4mpeg -vf softpulldown dvd://1
mencoder -ovc lavc -of rawvideo -o output.m2v \
         -lavcopts vcodec=mpeg2video:ildct:vbitrate=5000 stream.yuv

(BTW: To use -of rawvideo you need to update to todays CVS version.
Alternatively you can use -of mpeg).

-- 
Tobias						PGP: http://9ac7e0bc.2ya.com
Be vigilant!




More information about the MPlayer-users mailing list