VideoHelp Forum
+ Reply to Thread
Results 1 to 14 of 14
Thread
  1. Hello,

    Is there anyone here experienced with YUV format ?
    I tried to view the samples in
    https://media.xiph.org/video/derf/
    with yuv player (http://sourceforge.net/projects/raw-yuvplayer/)
    but I get that the view is not clean (vertical line movement)
    for example I've tried to view carphone_qcif but it does not work correctly.
    I also tried 7yuv, elecard viewer.
    Only with vlc is it OK........ I don't know why.

    Regards,
    Ran
    Quote Quote  
  2. Because it's "y4m" not raw yuv . Y4M has headers

    You usually have to specify the pixel format , planar arrangement, dimensions correct for raw yuv viewers. If you specify the wrong value, you will get a garbage image
    Quote Quote  
  3. Right!
    Thank you so much.
    Quote Quote  
  4. Hi,

    One more on this issue if I may.
    I am trying to convert yuv format to nv12 and to play it
    I used carphone qcif sample yuv format (yuv420):
    http://trace.eas.asu.edu/yuv/
    The original sampled is played OK with yuv player.
    But on trying to play the converted sample
    ffmpeg -pix_fmt yuv420p -s 176x144 -i carphone_qcif.yuv -pix_fmt nv12 carphone_qcif_nv12.yuv
    the result seems wrong with any yuv player I've used (i remembered to change the setting for qcif 176x144, and NV12 but it did not help).
    Is there something wrong with ffmpeg convert ?

    Thanks,
    Ran
    Quote Quote  
  5. You can use RawSource() in AviSynth to read several different YUV formats. For example, this file:

    http://trace.eas.asu.edu/yuv/akiyo/akiyo_cif.7z

    after extracting the YUV file can be opened with:

    Code:
    RawSource("akiyo_cif.yuv", width=352, height=288, pixel_type="I420")
    The carphone sample can be opened with:

    Code:
    RawSource("carphone_qcif.yuv", width=176, height=144, pixel_type="I420")
    Quote Quote  
  6. Hi jagabo,

    I am more intereted in a tool for converting the file to NV12.
    I don't know why it does not work with ffmpeg.

    Regards,
    Ran
    Quote Quote  
  7. It crashes ffmpeg for me, not sure why - nv12 is listed on the supported -pix_fmts for IO

    You might be able to do it through a directshow chain. If you disable all the output pixel formats, except nv12 , in LAV video decoder configuration and use a raw dump that might work but I haven't tested it
    Quote Quote  
  8. It works ok on akiyo cif (doesn't crash) . Not sure why carphone crashes, maybe the resolution

    For example, ffplay can play it

    Code:
    ffmpeg -i akiyo_cif.y4m -s:v 352x288 -c:v rawvideo -pix_fmt nv12 -an nv12.yuv
    Code:
    ffplay -i nv12.yuv -pix_fmt nv12 -s:v 352x288
    Quote Quote  
  9. Oops, sorry, made a mistake. Suggestion withdrawn.
    Last edited by jagabo; 16th Nov 2015 at 11:45.
    Quote Quote  
  10. But the "nv12.yuv" produced above by ffmpeg doesn't display correctly with rawsource in avisynth using "nv12" - so I don't know how valid it is, or if it is a problem with rawsource.dll .



    (Other variants like IYUV etc... display correctly in rawsource, and "NV12" is listed as supported in the documentation)

    Supported pixel_types are:
    RGB, RGBA, BGR, BGRA, ARGB, ABGR (interleaved RGB without subsampling, resulting in AviSynth's RGB24 or RGB32)
    YUY2(YUYV), YVYU, UYVY, VYUY (interleaved horizontally subsampled resulting in AviSynth's YUY2)
    I444, YV24 (planar without subsampling, resulting in AviSynth's YV24)
    I422, YV16 (planar horizontally subsampled, it is converted to AviSynth's YV16)
    I420(IYUV), YV12 (planar horizontally and vertically subsampled resulting in AviSynth's YV12)
    I411(Y41B), YV411 (planar horizontally subsampled, it is converted to AviSynth's YV411)
    NV12, NV21 (planar horizontally and vertically subsampled resulting in AviSynth's YV12)
    Y8(aka GRAY) (luma only resulting in AviSynth's Y8)
    Quote Quote  
  11. But yuvplayer 2.3 from sourceforge displays it correctly when nv12 is selected, so maybe it is a problem with rawsource.dll
    http://sourceforge.net/projects/raw-yuvplayer/
    Quote Quote  
  12. Hi,

    I probably have some ffmpeg issue ? I tried it again as following but I can't play it with yuvplayer.
    Maybe my ffmpeg version is too old and have some isse ?


    ubuntu@ubuntu-laptop:/media/sf_shared$ ffmpeg -i akiyo_cif.y4m -s 352x288 -f rawvideo -pix_fmt nv12 -an nv12.yuv

    FFmpeg version SVN-r0.5.9-4:0.5.9-0ubuntu0.10.04.3, Copyright (c) 2000-2009 Fabrice Bellard, et al.
    configuration: --extra-version=4:0.5.9-0ubuntu0.10.04.3 --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-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
    libavutil 49.15. 0 / 49.15. 0
    libavcodec 52.20. 1 / 52.20. 1
    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 Jan 24 2013 19:42:59, gcc: 4.4.3
    Input #0, yuv4mpegpipe, from 'akiyo_cif.y4m':
    Duration: N/A, bitrate: N/A
    Stream #0.0: Video: rawvideo, yuv420p, 352x288, PAR 128:117 DAR 1408:1053, 29.97 tbr, 29.97 tbn, 29.97 tbc
    File 'nv12.yuv' already exists. Overwrite ? [y/N] y
    Output #0, rawvideo, to 'nv12.yuv':
    Stream #0.0: Video: rawvideo, nv12, 352x288 [PAR 128:117 DAR 1408:1053], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
    Stream mapping:
    Stream #0.0 -> #0.0
    Press [q] to stop encoding
    frame= 300 fps=278 q=0.0 Lsize= 59400kB time=10.01 bitrate=48611.9kbits/s
    video:59400kB audio:0kB global headers:0kB muxing overhead 0.000000%
    ubuntu@ubuntu-laptop:/media/sf_shared$
    Quote Quote  
  13. built on Jan 24 2013 19:42:59
    Maybe it's too old ?

    check ffmpeg -pix_fmts if nv12 is included as I/O option in your build

    can your ffplay play nv12.yuv correctly ?
    Quote Quote  
  14. Hi,

    I've did the conversion with 7yuv, it works perfectly.
    Probably the old ffmpeg version in my old ubuntu (10.04) has some bug with nv12.

    Thanks,
    Ran
    Quote Quote  



Similar Threads

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