VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Member
    Join Date
    Jan 2010
    Location
    United States
    Search Comp PM
    stream.yuv from 480p webcam, generated by VLC (version above 1.0), transcodes fine when yuv4mpeg header option is included in the stream dump. But cpu limits make the result choppy and with freezes lasting several seconds.

    With yuv4mpeg turned off (the VLC default for yuv output), conversion to avi with ffmpeg is beautiful, except the screen slips left to right, like a tv with bad horizontal hold, along with orthogonal regions of color that look like misplaced leftovers from one of the yuv's.

    I know the stream from the webcam is in yuyv, however the linux manpage gives no different instructions for yuyv as opposed to planar yuv (besides which, it worked with the headers).

    conversion was, on command line:

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

    2-pass conversion went fine, assuming I did it right, but produced same result:

    Code:
     dan@frankenstein:~$ ffmpeg -sameq -s 640x480 -i stream.yuv -pass 1 test2.avi
    FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
      libavutil     49.15. 0 / 49.15. 0
      libavcodec    52.20. 0 / 52.20. 0
      libavformat   52.31. 0 / 52.31. 0
      libavdevice   52. 1. 0 / 52. 1. 0
      libavfilter    0. 4. 0 /  0. 4. 0
      libswscale     0. 7. 1 /  0. 7. 1
      libpostproc   51. 2. 0 / 51. 2. 0
      built on Oct 13 2009 22:15:16, gcc: 4.4.1
    Input #0, rawvideo, from 'stream.yuv':
      Duration: N/A, start: 0.000000, bitrate: N/A
        Stream #0.0: Video: rawvideo, yuv420p, 640x480, 25 tbr, 25 tbn, 25 tbc
    Output #0, avi, to 'test2.avi':
        Stream #0.0: Video: mpeg4, yuv420p, 640x480, q=2-31, pass 1, 200 kb/s, 90k tbn, 25 tbc
    Stream mapping:
      Stream #0.0 -> #0.0
    Press [q] to stop encoding
    frame=12555 fps= 13 q=0.0 Lsize=  501067kB time=502.20 bitrate=8173.5kbits/s    
    video:500761kB audio:0kB global headers:0kB muxing overhead 0.061099%
    
    dan@frankenstein:~$ ffmpeg -sameq -s 640x480 -i stream.yuv -b 9000k -pass 2 test2.avi
    FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
      libavutil     49.15. 0 / 49.15. 0
      libavcodec    52.20. 0 / 52.20. 0
      libavformat   52.31. 0 / 52.31. 0
      libavdevice   52. 1. 0 / 52. 1. 0
      libavfilter    0. 4. 0 /  0. 4. 0
      libswscale     0. 7. 1 /  0. 7. 1
      libpostproc   51. 2. 0 / 51. 2. 0
      built on Oct 13 2009 22:15:16, gcc: 4.4.1
    Input #0, rawvideo, from 'stream.yuv':
      Duration: N/A, start: 0.000000, bitrate: N/A
        Stream #0.0: Video: rawvideo, yuv420p, 640x480, 25 tbr, 25 tbn, 25 tbc
    File 'test2.avi' already exists. Overwrite ? [y/N] y
    Output #0, avi, to 'test2.avi':
        Stream #0.0: Video: mpeg4, yuv420p, 640x480, q=2-31, pass 2, 9000 kb/s, 90k tbn, 25 tbc
    Stream mapping:
      Stream #0.0 -> #0.0
    [mpeg4 @ 0x8514b30][lavc rc] Using all of requested bitrate is not necessary for this video with these parameters.
    Press [q] to stop encoding
    frame=12555 fps= 13 q=0.0 Lsize=  501067kB time=502.20 bitrate=8173.5kbits/s    
    video:500761kB audio:0kB global headers:0kB muxing overhead 0.061099%
    if links are allowed in this forum, here's a sample of test2.avi:

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

    Any parameters that can fix this? Using the headers is not gonna be an option. So far mencoder has produced the same exact result.
    Quote Quote  
  2. Hi-

    I'm having a similar problem with the horizontal scroll. Did you ever figure out how to fix this?

    Thanks,
    Michael
    Quote Quote  
  3. AviSynth has raw YUV input filters.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!