Page 1 of 1

reading/transcoding stream.yuv from yuv output module

Posted: 05 Jan 2010 10:58
by kozz
VLC version 1.02 goldeneye, linux, ubuntu karmic, x86

I guess this is about getting vlc to read its own handwriting. Using a 480p webcam and vlc to record, to get better quality I postpone the transcoding and set output to yuv, so that it creates the gigantic stream.yuv file.

Again for quality I leave the yuv4mpeg headers on the default "off" setting. (Using them resulted in freezes, too many skips and a video that played at double speed)

The stream.yuv file created by vlc from this yuyv stream looks beautiful when transcoded by ffmpeg or mencoder,

ex. $ffmpeg -sameq -s 640x480 -i stream.yuv test1.avi

except that the frames all shift left to right like a bad horizontal hold. Also all 3 frames from yuv are separately visible, and moving left to right at different rates.

VLC itself will accept the 10-minute stream.yuv dump as input, but plays it back as a 2-hour video made of bright green diagonal lines.

VLC had no problem displaying the cam stream with output set to default. How can I get it to replay the stream.yuv dump, which should essentially be the same stream? Or better yet to convert it since ffmpeg/mencoder can't do it without yuv4mpeg headers present.

here's a sample of what ffmpeg and mencoder both do with the stream.yuv:

http://www.youtube.com/watch?v=LUVpDsq-QJU

Re: reading/transcoding stream.yuv from yuv output module

Posted: 20 Jan 2010 01:41
by axroh
Did you ever figure this out? I have the same problem, I think there's some header. There's a 34 byte header at the beginning, followed by 6 byte headers per frame afterwards. Maybe mpeg4 short header? I don't have access to the spec ...

Re: reading/transcoding stream.yuv from yuv output module

Posted: 20 Jan 2010 18:01
by RĂ©mi Denis-Courmont
The global header is "<chroma> W<width> H<height> F<rate>:<divider> Ip A<horizontal>:<vertical>", then a line feed. rate and divider represent the frame rate. horizontal and vertical represent the aspect ratio. p refers to progressive (t resp b would refer to interlaced frames with top resp bottom fields, but VLC does not support that).

Then for each picture, there is "FRAME", a line feed and the raw picture as specified by the chroma, plane by plane (if the chroma is planar anyway), line by line.