VideoHelp Forum




+ Reply to Thread
Results 1 to 16 of 16
  1. I'm trying to encode 4k yuv video with webmproject VP9 I m using Linux Kubuntu 18.04 my command :

    HTML Code:
    ./vpxenc --codec=vp9  --profile=0  --fps=50000/1001 --static-thresh=0 --drop-frame=0 --good --auto-alt-ref=1  --kf-min-dist=50 --kf-max-dist=50 --min-q=32 --max-q=32 --max-intra-rate=50 -w 3840 -h 2160 --limit=1 --i420 /home/siraj/Desktop/Project/Samples/Jockey_3840x2160_120fps_420_10bit_YUV.yuv -o siraj.webm
    when trying to open webm in chrome, I got a Strange color https://i.stack.imgur.com/EYdJS.jpgImage
    [Attachment 46154 - Click to enlarge]
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    I guess vpxenc does not understand 10-bit-per-component YUV formats.
    Quote Quote  
  3. Member
    Join Date
    Oct 2016
    Location
    Spain
    Search PM
    It only happens in chrome? it can be only a chrome because it looks like a video renderer issue, also can yo post a sample file?
    Quote Quote  
  4. Originally Posted by LigH.de View Post
    I guess vpxenc does not understand 10-bit-per-component YUV formats.
    I think I found the problem < I'm using profile 0, I need to switch to profile 2 and enable --enable-vp9-highbitdepth
    Quote Quote  
  5. Originally Posted by gdx View Post
    It only happens in chrome? it can be only a chrome because it looks like a video renderer issue, also can yo post a sample file?
    chrome, firefox,
    and then i decode it to yuv and play it with some yuv players, all the same

    I think the problem is with the profile 0 I need to switch it to 2 and enable --enable-vp9-highbitdepth
    Last edited by rockerovo; 22nd Jul 2018 at 16:09.
    Quote Quote  
  6. I did

    Code:
    siraj@RouterX:~/Desktop/Project/VP9/libvpx-master$ ./configure --enable-vp9-highbitdepth
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
            LANGUAGE = "",
            LC_ALL = (unset),
            LC_TIME = "en_UM.UTF-8",
            LC_MONETARY = "ar_LY.UTF-8",
            LC_ADDRESS = "ar_LY.UTF-8",
            LC_TELEPHONE = "ar_LY.UTF-8",
            LC_NAME = "ar_LY.UTF-8",
            LC_MEASUREMENT = "ar_LY.UTF-8",
            LC_IDENTIFICATION = "ar_LY.UTF-8",
            LC_NUMERIC = "en_UM.UTF-8",
            LC_PAPER = "ar_LY.UTF-8",
            LANG = "en_US.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
      enabling vp9_highbitdepth
      enabling vp8_encoder
      enabling vp8_decoder
      enabling vp9_encoder
      enabling vp9_decoder
    Configuring for target 'x86_64-linux-gcc'
      enabling x86_64
      enabling runtime_cpu_detect
      enabling mmx
      enabling sse
      enabling sse2
      enabling sse3
      enabling ssse3
      enabling sse4_1
      enabling avx
      enabling avx2
      enabling avx512
      using yasm
      enabling postproc
      enabling unit_tests
      enabling webm_io
      enabling libyuv
    Creating makefiles for x86_64-linux-gcc libs
    Creating makefiles for x86_64-linux-gcc examples
    Creating makefiles for x86_64-linux-gcc tools
    Creating makefiles for x86_64-linux-gcc docs
    Code:
    siraj@RouterX:~/Desktop/Project/VP9/libvpx-master$ ./vpxenc --codec=vp9  --profile=0  --fps=50000/1001 --static-thresh=0 --drop-frame=0 --good --auto-alt-ref=1  --kf-min-dist=50 --kf-max-dist=50 --min-q=32 --max-q=32 --max-intra-rate=50 -w 3840 -h 2160 --limit=1 --i420 /home/siraj/Desktop/Project/Samples/Jockey_3840x2160_120fps_420_10bit_YUV.yuv -o siraj.webm
    Warning: Bad quantizer values. Quantizer values should not be equal, and should differ by at least 8.
    1 encoder configuration warning(s). Continue? (y to continue) y
    Pass 1/2 frame    1/2        416B    3328b/f  166233b/s  103495 us (9.66 fps)
    Pass 2/2 frame    1/1    3167674B 25341392b/f 1265803796b/s   41626 ms (0.02 fps)
    the problem still exists

    Image
    [Attachment 46155 - Click to enlarge]
    Quote Quote  
  7. Member
    Join Date
    Oct 2016
    Location
    Spain
    Search PM
    can you post sample of your converted video?
    Quote Quote  
  8. Member
    Join Date
    Oct 2016
    Location
    Spain
    Search PM
    Its beacuse you don't specify the input bitdepth, vpxenc don't support converting 10 to 8 bits then you need to use profile 2 and specify both the input bitdepth and the video bitdepth:

    Code:
    vpxenc --codec=vp9  --profile=2  --fps=50000/1001 --static-thresh=0 --drop-frame=0 --good --auto-alt-ref=1  --kf-min-dist=50 --kf-max-dist=50 --min-q=32 --max-q=32 --max-intra-rate=50 -w 3840 -h 2160 --limit=1 --i420 --input-bit-depth=10 --bit-depth=10 Jockey_3840x2160_120fps_420_10bit_YUV.yuv -o siraj.webm
    if you want to do it 8 bits you can pipe it through ffmpeg:

    Code:
    ffmpeg -f rawvideo -vcodec rawvideo -s 3840x2160 -r 50000/1001 -pix_fmt yuv420p10le -i "Jockey_3840x2160_120fps_420_10bit_YUV.yuv" -vframes 1 -pix_fmt yuv420p -strict -1 -f yuv4mpegpipe -an -sn - | vpxenc --codec=vp9  --profile=0  --static-thresh=0 --drop-frame=0 --good --auto-alt-ref=1  --kf-min-dist=50 --kf-max-dist=50 --max-intra-rate=50 --passes=1 --end-usage=q --cq-level=32 -o siraj.webm -
    But if you uses ffmpeg you have to do the 2 passes manually if you want then. Also this "--min-q=32 --max-q=32" technically that is equivalent to "--end-usage=q --cq-level=32"
    Quote Quote  
  9. Hm,

    to be honest, your encoding string looks a bit like an encoding for VP8.

    Google has provided some infos how to deal with VP9:
    https://developers.google.com/media/vp9/

    Just tried it as follows (ffmpeg version 3.4.2):
    - 2pass
    - crf 32
    - Fixed keyframe interval of 50 (as in your encoding)
    - Input frame rate 120 fps (the name of your original file suggests that)
    - Output frame rate 50000/1001 (as in your encoding)
    - Renamed the file to jockey.yuv and jockey.webm - gives a better overview

    1st pass:
    Code:
    ffmpeg -f rawvideo -c:v rawvideo -s 3840x2160 -r 120 -pix_fmt yuv420p10le -i jockey.yuv -vf fps=fps=49.950 -keyint_min 50 -g 50 -pass 1 -passlogfile jockey-2160 -c:v libvpx-vp9 -threads 8 -cpu-used 4 -tile-columns 3 -frame-parallel 1 -b:v 0 -crf 32 -an -f webm -y NUL
    2nd pass:
    Code:
    ffmpeg -f rawvideo -c:v rawvideo -s 3840x2160 -r 120 -pix_fmt yuv420p10le -i jockey.yuv -vf fps=fps=49.950 -keyint_min 50 -g 50 -pass 2 -passlogfile jockey-2160 -c:v libvpx-vp9 -threads 8 -cpu-used 3 -tile-columns 3 -frame-parallel 1 -auto-alt-ref 1 -b:v 0 -crf 32 -an -f webm -y jockey.webm
    Seems to work fine. Please find the result attached.
    jockey.webm
    Quote Quote  
  10. Originally Posted by gdx View Post
    Its beacuse you don't specify the input bitdepth, vpxenc don't support converting 10 to 8 bits then you need to use profile 2 and specify both the input bitdepth and the video bitdepth:

    Code:
    vpxenc --codec=vp9  --profile=2  --fps=50000/1001 --static-thresh=0 --drop-frame=0 --good --auto-alt-ref=1  --kf-min-dist=50 --kf-max-dist=50 --min-q=32 --max-q=32 --max-intra-rate=50 -w 3840 -h 2160 --limit=1 --i420 --input-bit-depth=10 --bit-depth=10 Jockey_3840x2160_120fps_420_10bit_YUV.yuv -o siraj.webm
    if you want to do it 8 bits you can pipe it through ffmpeg:

    Code:
    ffmpeg -f rawvideo -vcodec rawvideo -s 3840x2160 -r 50000/1001 -pix_fmt yuv420p10le -i "Jockey_3840x2160_120fps_420_10bit_YUV.yuv" -vframes 1 -pix_fmt yuv420p -strict -1 -f yuv4mpegpipe -an -sn - | vpxenc --codec=vp9  --profile=0  --static-thresh=0 --drop-frame=0 --good --auto-alt-ref=1  --kf-min-dist=50 --kf-max-dist=50 --max-intra-rate=50 --passes=1 --end-usage=q --cq-level=32 -o siraj.webm -
    But if you uses ffmpeg you have to do the 2 passes manually if you want then. Also this "--min-q=32 --max-q=32" technically that is equivalent to "--end-usage=q --cq-level=32"


    When using the first code i got :
    i cant enable the profile 2

    Code:
    siraj@RouterX:~/Desktop/Project/VP9/libvpx-master$ ./vpxenc --codec=vp9  --profile=2  --fps=50000/1001 --static-thresh=0 --drop-frame=0 --good --auto-alt-ref=1  --kf-min-dist=50 --kf-max-dist=50 --min-q=32 --max-q=32 --max-intra-rate=50 -w 3840 -h 2160 --limit=1 --i420 --input-bit-depth=10 --bit-depth=10 Jockey_3840x2160_120fps_420_10bit_YUV.yuv -o siraj.webm
    Error: Unrecognized option --input-bit-depth=10
    
    Usage: ./vpxenc <options> -o dst_filename src_filename 
    Use --help to see the full list of options.
    and output for the second command :

    Code:
    siraj@RouterX:~/vp9$ ffmpeg -f rawvideo -vcodec rawvideo -s 3840x2160 -r 50000/1001 -pix_fmt yuv420p10le -i "/home/siraj/Desktop/Project/Samples/Jockey_3840x2160_120fps_420_10bit_YUV.yuv" -vframes 1 -pix_fmt yuv420p -strict -1 -f yuv4mpegpipe -an -sn - | vpxenc --codec=vp9  --profile=0  --static-thresh=0 --drop-frame=0 --good --auto-alt-ref=1  --kf-min-dist=50 --kf-max-dist=50 --max-intra-rate=50 --passes=1 --end-usage=q --cq-level=32 -o siraj.webm 
    No input file specified!
    Usage: vpxenc <options> -o dst_filename src_filename 
    Use --help to see the full list of options.
    ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers
      built with gcc 7 (Ubuntu 7.3.0-16ubuntu2)
      configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
      libavutil      55. 78.100 / 55. 78.100
      libavcodec     57.107.100 / 57.107.100
      libavformat    57. 83.100 / 57. 83.100
      libavdevice    57. 10.100 / 57. 10.100
      libavfilter     6.107.100 /  6.107.100
      libavresample   3.  7.  0 /  3.  7.  0
      libswscale      4.  8.100 /  4.  8.100
      libswresample   2.  9.100 /  2.  9.100
      libpostproc    54.  7.100 / 54.  7.100
    [rawvideo @ 0x55a7f0ed5ae0] Estimating duration from bitrate, this may be inaccurate
    Input #0, rawvideo, from '/home/siraj/Desktop/Project/Samples/Jockey_3840x2160_120fps_420_10bit_YUV.yuv':
      Duration: 00:00:12.01, start: 0.000000, bitrate: 9943336 kb/s
        Stream #0:0: Video: rawvideo (Y3[11][10] / 0xA0B3359), yuv420p10le, 3840x2160, 9943336 kb/s, 49.95 tbr, 49.95 tbn, 49.95 tbc
    Stream mapping:
      Stream #0:0 -> #0:0 (rawvideo (native) -> wrapped_avframe (native))
    Press [q] to stop, [?] for help
    Output #0, yuv4mpegpipe, to 'pipe:':
      Metadata:
        encoder         : Lavf57.83.100
        Stream #0:0: Video: wrapped_avframe, yuv420p, 3840x2160, q=2-31, 200 kb/s, 49.95 fps, 49.95 tbn, 49.95 tbc
        Metadata:
          encoder         : Lavc57.107.100 wrapped_avframe
    siraj@RouterX:~/vp9$
    Quote Quote  
  11. Originally Posted by fornit View Post
    Hm,

    to be honest, your encoding string looks a bit like an encoding for VP8.

    Google has provided some infos how to deal with VP9:
    https://developers.google.com/media/vp9/

    Just tried it as follows (ffmpeg version 3.4.2):
    - 2pass
    - crf 32
    - Fixed keyframe interval of 50 (as in your encoding)
    - Input frame rate 120 fps (the name of your original file suggests that)
    - Output frame rate 50000/1001 (as in your encoding)
    - Renamed the file to jockey.yuv and jockey.webm - gives a better overview

    1st pass:
    Code:
    ffmpeg -f rawvideo -c:v rawvideo -s 3840x2160 -r 120 -pix_fmt yuv420p10le -i jockey.yuv -vf fps=fps=49.950 -keyint_min 50 -g 50 -pass 1 -passlogfile jockey-2160 -c:v libvpx-vp9 -threads 8 -cpu-used 4 -tile-columns 3 -frame-parallel 1 -b:v 0 -crf 32 -an -f webm -y NUL
    2nd pass:
    Code:
    ffmpeg -f rawvideo -c:v rawvideo -s 3840x2160 -r 120 -pix_fmt yuv420p10le -i jockey.yuv -vf fps=fps=49.950 -keyint_min 50 -g 50 -pass 2 -passlogfile jockey-2160 -c:v libvpx-vp9 -threads 8 -cpu-used 3 -tile-columns 3 -frame-parallel 1 -auto-alt-ref 1 -b:v 0 -crf 32 -an -f webm -y jockey.webm
    Seems to work fine. Please find the result attached.
    Image
    [Attachment 46159 - Click to enlarge]
    actually, I'm working on a project about VP9,AV1,HEVC,AVC , do you think FFmpeg better that webmproject libvpx , i found the source in webmproject website

    when I use the first command for pass 1 I got :

    Code:
    siraj@RouterX:~/Desktop/Project/Samples$ ffmpeg -f rawvideo -c:v rawvideo -s 3840x2160 -r 120 -pix_fmt yuv420p10le -i Jockey_3840x2160_120fps_420_10bit_YUV.yuv -vf fps=fps=49.950 -keyint_min 50 -g 50 -pass 1 -passlogfile jockey-2160 -c:v libvpx-vp9 -threads 8 -cpu-used 4 -tile-columns 3 -frame-parallel 1 -b:v 0 -crf 32 -an -f webm -y NUL
    ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers
      built with gcc 7 (Ubuntu 7.3.0-16ubuntu2)
      configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
      libavutil      55. 78.100 / 55. 78.100
      libavcodec     57.107.100 / 57.107.100
      libavformat    57. 83.100 / 57. 83.100
      libavdevice    57. 10.100 / 57. 10.100
      libavfilter     6.107.100 /  6.107.100
      libavresample   3.  7.  0 /  3.  7.  0
      libswscale      4.  8.100 /  4.  8.100
      libswresample   2.  9.100 /  2.  9.100
      libpostproc    54.  7.100 / 54.  7.100
    [rawvideo @ 0x558ea8680c40] Stream #0: not enough frames to estimate rate; consider increasing probesize
    [rawvideo @ 0x558ea8680c40] Estimating duration from bitrate, this may be inaccurate
    Input #0, rawvideo, from 'Jockey_3840x2160_120fps_420_10bit_YUV.yuv':
      Duration: 00:00:05.00, start: 0.000000, bitrate: 23887872 kb/s
        Stream #0:0: Video: rawvideo (Y3[11][10] / 0xA0B3359), yuv420p10le, 3840x2160, 23887872 kb/s, 120 tbr, 120 tbn, 120 tbc
    Stream mapping:
      Stream #0:0 -> #0:0 (rawvideo (native) -> vp9 (libvpx-vp9))
    Press [q] to stop, [?] for help
    [libvpx-vp9 @ 0x558ea868e5e0] v1.7.0
    Output #0, webm, to 'NUL':
      Metadata:
        encoder         : Lavf57.83.100
        Stream #0:0: Video: vp9 (libvpx-vp9), yuv420p, 3840x2160, q=-1--1, 49.95 fps, 1k tbn, 49.95 tbc
        Metadata:
          encoder         : Lavc57.107.100 libvpx-vp9
        Side data:
          cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    frame=  250 fps=0.9 q=0.0 Lsize=       1kB time=00:00:00.00 bitrate=N/A speed=   0x    
    video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Output file is empty, nothing was encoded
    I don't know whats the problem, I'm using Intel® Core™ i7-3610QM ,6GB ram


    and for the pass 2 :


    Code:
    siraj@RouterX:~/Desktop/Project/Samples$ ffmpeg -f rawvideo -c:v rawvideo -s 3840x2160 -r 120 -pix_fmt yuv420p10le -i Jockey_3840x2160_120fps_420_10bit_YUV.yuv -vf fps=fps=49.950 -keyint_min 50 -g 50 -pass 2 -c:v libvpx-vp9 -threads 8 -cpu-used 4 -tile-columns 3 -frame-parallel 1 -auto-alt-ref 1 -b:v 0 -crf 32 -an -f webm -y jockey.webm
    ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers
      built with gcc 7 (Ubuntu 7.3.0-16ubuntu2)
      configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
      libavutil      55. 78.100 / 55. 78.100
      libavcodec     57.107.100 / 57.107.100
      libavformat    57. 83.100 / 57. 83.100
      libavdevice    57. 10.100 / 57. 10.100
      libavfilter     6.107.100 /  6.107.100
      libavresample   3.  7.  0 /  3.  7.  0
      libswscale      4.  8.100 /  4.  8.100
      libswresample   2.  9.100 /  2.  9.100
      libpostproc    54.  7.100 / 54.  7.100
    [rawvideo @ 0x55da0e388c20] Stream #0: not enough frames to estimate rate; consider increasing probesize
    [rawvideo @ 0x55da0e388c20] Estimating duration from bitrate, this may be inaccurate
    Input #0, rawvideo, from 'Jockey_3840x2160_120fps_420_10bit_YUV.yuv':
      Duration: 00:00:05.00, start: 0.000000, bitrate: 23887872 kb/s
        Stream #0:0: Video: rawvideo (Y3[11][10] / 0xA0B3359), yuv420p10le, 3840x2160, 23887872 kb/s, 120 tbr, 120 tbn, 120 tbc
    Error opening file ffmpeg2pass-0.log.
    Error reading log file 'ffmpeg2pass-0.log' for pass-2 encoding
    siraj@RouterX:~/Desktop/Project/Samples$ ffmpeg -f rawvideo -c:v rawvideo -s 3840x2160 -r 120 -pix_fmt yuv420p10le -i Jockey_3840x2160_120fps_420_10bit_YUV.yuv -vf fps=fps=49.950 -keyint_min 50 -g 50 -pass 2 -passlogfile jockey-2160 -c:v libvpx-vp9 -threads 8 -cpu-used 4 -tile-columns 3 -frame-parallel 1 -auto-alt-ref 1 -b:v 0 -crf 32 -an -f webm -y jockey.webm
    ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers
      built with gcc 7 (Ubuntu 7.3.0-16ubuntu2)
      configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
      libavutil      55. 78.100 / 55. 78.100
      libavcodec     57.107.100 / 57.107.100
      libavformat    57. 83.100 / 57. 83.100
      libavdevice    57. 10.100 / 57. 10.100
      libavfilter     6.107.100 /  6.107.100
      libavresample   3.  7.  0 /  3.  7.  0
      libswscale      4.  8.100 /  4.  8.100
      libswresample   2.  9.100 /  2.  9.100
      libpostproc    54.  7.100 / 54.  7.100
    [rawvideo @ 0x556b2d70ac60] Stream #0: not enough frames to estimate rate; consider increasing probesize
    [rawvideo @ 0x556b2d70ac60] Estimating duration from bitrate, this may be inaccurate
    Input #0, rawvideo, from 'Jockey_3840x2160_120fps_420_10bit_YUV.yuv':
      Duration: 00:00:05.00, start: 0.000000, bitrate: 23887872 kb/s
        Stream #0:0: Video: rawvideo (Y3[11][10] / 0xA0B3359), yuv420p10le, 3840x2160, 23887872 kb/s, 120 tbr, 120 tbn, 120 tbc
    Stream mapping:
      Stream #0:0 -> #0:0 (rawvideo (native) -> vp9 (libvpx-vp9))
    Press [q] to stop, [?] for help
    [libvpx-vp9 @ 0x556b2d7187e0] v1.7.0
    Output #0, webm, to 'jockey.webm':
      Metadata:
        encoder         : Lavf57.83.100
        Stream #0:0: Video: vp9 (libvpx-vp9), yuv420p, 3840x2160, q=-1--1, 49.95 fps, 1k tbn, 49.95 tbc
        Metadata:
          encoder         : Lavc57.107.100 libvpx-vp9
        Side data:
          cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    frame=  250 fps=0.8 q=0.0 Lsize=   18395kB time=00:00:04.98 bitrate=30222.2kbits/s speed=0.015x     
    video:18392kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.014676%
    siraj@RouterX:~/Desktop/Project/Samples$
    the pass 2 command works great, Thank you

    but do you know how I can enable profile 2 vpxenc
    Quote Quote  
  12. Originally Posted by rockerovo View Post
    actually, I'm working on a project about VP9,AV1,HEVC,AVC , do you think FFmpeg better that webmproject libvpx , i found the source in webmproject website
    ffmpeg is something like the swiss army knife of video encoding

    Originally Posted by rockerovo View Post
    I don't know whats the problem, I'm using Intel® Core™ i7-3610QM ,6GB ram
    There isn't a problem. The message "Output file is empty, nothing was encoded" is normal after the 1st pass. It only writes the log file in the 1st pass.

    Originally Posted by rockerovo View Post
    but do you know how I can enable profile 2 vpxenc
    Please check if your version of ffmpeg supports 10 bit with VP9:

    ffmpeg -h encoder=libvpx-vp9

    At the top there is a line named "supported pixel formats". Look for: yuv420p10le -> if it's not there, then you need a more current version of ffmpeg. The newer versions have 8 bit and 10 bit support.

    With 10 bit support for VP9 simply repeat the pixel format behind the input file. "Profile 2" will then be selected automatically. This makes the encoding strings looking as follows.

    1st pass
    Code:
    ffmpeg -f rawvideo -c:v rawvideo -s 3840x2160 -r 120 -pix_fmt yuv420p10le -i jockey.yuv -pix_fmt yuv420p10le -vf fps=fps=49.950 -keyint_min 50 -g 50 -pass 1 -passlogfile jockey-2160 -c:v libvpx-vp9 -threads 8 -cpu-used 4 -tile-columns 3 -frame-parallel 1 -b:v 0 -crf 32 -an -f webm -y NUL
    2nd pass
    Code:
    ffmpeg -f rawvideo -c:v rawvideo -s 3840x2160 -r 120 -pix_fmt yuv420p10le -i jockey.yuv -pix_fmt yuv420p10le -vf fps=fps=49.950 -keyint_min 50 -g 50 -pass 2 -passlogfile jockey-2160 -c:v libvpx-vp9 -threads 8 -cpu-used 3 -tile-columns 3 -frame-parallel 1 -auto-alt-ref 1 -b:v 0 -crf 32 -an -f webm -y jockey.webm
    Last edited by fornit; 23rd Jul 2018 at 07:06.
    Quote Quote  
  13. Member
    Join Date
    Oct 2016
    Location
    Spain
    Search PM
    Originally Posted by rockerovo View Post
    When using the first code i got :
    i cant enable the profile 2

    Code:
    siraj@RouterX:~/Desktop/Project/VP9/libvpx-master$ ./vpxenc --codec=vp9  --profile=2  --fps=50000/1001 --static-thresh=0 --drop-frame=0 --good --auto-alt-ref=1  --kf-min-dist=50 --kf-max-dist=50 --min-q=32 --max-q=32 --max-intra-rate=50 -w 3840 -h 2160 --limit=1 --i420 --input-bit-depth=10 --bit-depth=10 Jockey_3840x2160_120fps_420_10bit_YUV.yuv -o siraj.webm
    Error: Unrecognized option --input-bit-depth=10
    
    Usage: ./vpxenc <options> -o dst_filename src_filename 
    Use --help to see the full list of options.
    It appear that the build of vpxenc don't support 10 bits.

    Originally Posted by rockerovo View Post
    and output for the second command :

    Code:
    siraj@RouterX:~/vp9$ ffmpeg -f rawvideo -vcodec rawvideo -s 3840x2160 -r 50000/1001 -pix_fmt yuv420p10le -i "/home/siraj/Desktop/Project/Samples/Jockey_3840x2160_120fps_420_10bit_YUV.yuv" -vframes 1 -pix_fmt yuv420p -strict -1 -f yuv4mpegpipe -an -sn - | vpxenc --codec=vp9  --profile=0  --static-thresh=0 --drop-frame=0 --good --auto-alt-ref=1  --kf-min-dist=50 --kf-max-dist=50 --max-intra-rate=50 --passes=1 --end-usage=q --cq-level=32 -o siraj.webm 
    No input file specified!
    Usage: vpxenc <options> -o dst_filename src_filename 
    Use --help to see the full list of options.
    ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers
      built with gcc 7 (Ubuntu 7.3.0-16ubuntu2)
      configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
      libavutil      55. 78.100 / 55. 78.100
      libavcodec     57.107.100 / 57.107.100
      libavformat    57. 83.100 / 57. 83.100
      libavdevice    57. 10.100 / 57. 10.100
      libavfilter     6.107.100 /  6.107.100
      libavresample   3.  7.  0 /  3.  7.  0
      libswscale      4.  8.100 /  4.  8.100
      libswresample   2.  9.100 /  2.  9.100
      libpostproc    54.  7.100 / 54.  7.100
    [rawvideo @ 0x55a7f0ed5ae0] Estimating duration from bitrate, this may be inaccurate
    Input #0, rawvideo, from '/home/siraj/Desktop/Project/Samples/Jockey_3840x2160_120fps_420_10bit_YUV.yuv':
      Duration: 00:00:12.01, start: 0.000000, bitrate: 9943336 kb/s
        Stream #0:0: Video: rawvideo (Y3[11][10] / 0xA0B3359), yuv420p10le, 3840x2160, 9943336 kb/s, 49.95 tbr, 49.95 tbn, 49.95 tbc
    Stream mapping:
      Stream #0:0 -> #0:0 (rawvideo (native) -> wrapped_avframe (native))
    Press [q] to stop, [?] for help
    Output #0, yuv4mpegpipe, to 'pipe:':
      Metadata:
        encoder         : Lavf57.83.100
        Stream #0:0: Video: wrapped_avframe, yuv420p, 3840x2160, q=2-31, 200 kb/s, 49.95 fps, 49.95 tbn, 49.95 tbc
        Metadata:
          encoder         : Lavc57.107.100 wrapped_avframe
    siraj@RouterX:~/vp9$
    Yo didn't add the"-" add the end that indicates to read the pipe to the encoder.

    For you question fornit had responded quite well, but in the case of av1 the av1enc is far superior as the ffmpeg integration is quite lacking for now.
    Quote Quote  
  14. Originally Posted by fornit View Post
    Originally Posted by rockerovo View Post
    actually, I'm working on a project about VP9,AV1,HEVC,AVC , do you think FFmpeg better that webmproject libvpx , i found the source in webmproject website
    ffmpeg is something like the swiss army knife of video encoding

    Originally Posted by rockerovo View Post
    I don't know whats the problem, I'm using Intel® Core™ i7-3610QM ,6GB ram
    There isn't a problem. The message "Output file is empty, nothing was encoded" is normal after the 1st pass. It only writes the log file in the 1st pass.

    Originally Posted by rockerovo View Post
    but do you know how I can enable profile 2 vpxenc
    Please check if your version of ffmpeg supports 10 bit with VP9:

    ffmpeg -h encoder=libvpx-vp9

    At the top there is a line named "supported pixel formats". Look for: yuv420p10le -> if it's not there, then you need a more current version of ffmpeg. The newer versions have 8 bit and 10 bit support.

    With 10 bit support for VP9 simply repeat the pixel format behind the input file. "Profile 2" will then be selected automatically. This makes the encoding strings looking as follows.

    1st pass
    Code:
    ffmpeg -f rawvideo -c:v rawvideo -s 3840x2160 -r 120 -pix_fmt yuv420p10le -i jockey.yuv -pix_fmt yuv420p10le -vf fps=fps=49.950 -keyint_min 50 -g 50 -pass 1 -passlogfile jockey-2160 -c:v libvpx-vp9 -threads 8 -cpu-used 4 -tile-columns 3 -frame-parallel 1 -b:v 0 -crf 32 -an -f webm -y NUL
    2nd pass
    Code:
    ffmpeg -f rawvideo -c:v rawvideo -s 3840x2160 -r 120 -pix_fmt yuv420p10le -i jockey.yuv -pix_fmt yuv420p10le -vf fps=fps=49.950 -keyint_min 50 -g 50 -pass 2 -passlogfile jockey-2160 -c:v libvpx-vp9 -threads 8 -cpu-used 3 -tile-columns 3 -frame-parallel 1 -auto-alt-ref 1 -b:v 0 -crf 32 -an -f webm -y jockey.webm

    Thank you! everything works like a charm, I was using the old version for FFmpeg, I followed this guide and now I'm using the latest version with 10-12 bit support
    the guide :
    https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

    and when I type ffmpeg -h encoder=libvpx-vp9 i got :

    Code:
    iraj@RouterX:~/bin$ ffmpeg -h encoder=libvpx-vp9
    ffmpeg version N-91510-gd134b8d Copyright (c) 2000-2018 the FFmpeg developers
      built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
      configuration: --prefix=/home/siraj/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/siraj/ffmpeg_build/include --extra-ldflags=-L/home/siraj/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/siraj/bin --enable-gpl --enable-libaom --enable-libass --enable-libfreetype --enable-libopus --enable-libvorbis --enable-libvpx --enable-nonfree
      libavutil      56. 18.102 / 56. 18.102
      libavcodec     58. 21.106 / 58. 21.106
      libavformat    58. 17.101 / 58. 17.101
      libavdevice    58.  4.101 / 58.  4.101
      libavfilter     7. 26.100 /  7. 26.100
      libswscale      5.  2.100 /  5.  2.100
      libswresample   3.  2.100 /  3.  2.100
      libpostproc    55.  2.100 / 55.  2.100
    Encoder libvpx-vp9 [libvpx VP9]:
        General capabilities: delay threads 
        Threading capabilities: auto
        Supported pixel formats: yuv420p yuva420p yuv422p yuv440p yuv444p yuv420p10le yuv422p10le yuv440p10le yuv444p10le yuv420p12le yuv422p12le yuv440p12le yuv444p12le gbrp gbrp10le gbrp12le
    libvpx-vp9 encoder AVOptions:
      -auto-alt-ref      <int>        E..V..... Enable use of alternate reference frames (2-pass only) (from -1 to 2) (default -1)
      -lag-in-frames     <int>        E..V..... Number of frames to look ahead for alternate reference frame selection (from -1 to INT_MAX) (default -1)
      -arnr-maxframes    <int>        E..V..... altref noise reduction max frame count (from -1 to INT_MAX) (default -1)
      -arnr-strength     <int>        E..V..... altref noise reduction filter strength (from -1 to INT_MAX) (default -1)
      -arnr-type         <int>        E..V..... altref noise reduction filter type (from -1 to INT_MAX) (default -1)
         backward                     E..V.....
         forward                      E..V.....
         centered                     E..V.....
      -tune              <int>        E..V..... Tune the encoding to a specific scenario (from -1 to INT_MAX) (default -1)
         psnr                         E..V.....
         ssim                         E..V.....
      -deadline          <int>        E..V..... Time to spend encoding, in microseconds. (from INT_MIN to INT_MAX) (default good)
         best                         E..V.....
         good                         E..V.....
         realtime                     E..V.....
      -error-resilient   <flags>      E..V..... Error resilience configuration (default 0)
         default                      E..V..... Improve resiliency against losses of whole frames
         partitions                   E..V..... The frame partitions are independently decodable by the bool decoder, meaning that partitions can be decoded even though earlier partitions have been lost. Note that intra predicition is still done over the partition boundary.
      -max-intra-rate    <int>        E..V..... Maximum I-frame bitrate (pct) 0=unlimited (from -1 to INT_MAX) (default -1)
      -crf               <int>        E..V..... Select the quality for constant quality mode (from -1 to 63) (default -1)
      -static-thresh     <int>        E..V..... A change threshold on blocks below which they will be skipped by the encoder (from 0 to INT_MAX) (default 0)
      -drop-threshold    <int>        E..V..... Frame drop threshold (from INT_MIN to INT_MAX) (default 0)
      -noise-sensitivity <int>        E..V..... Noise sensitivity (from 0 to 4) (default 0)
      -undershoot-pct    <int>        E..V..... Datarate undershoot (min) target (%) (from -1 to 100) (default -1)
      -overshoot-pct     <int>        E..V..... Datarate overshoot (max) target (%) (from -1 to 1000) (default -1)
      -cpu-used          <int>        E..V..... Quality/Speed ratio modifier (from -8 to 8) (default 1)
      -lossless          <int>        E..V..... Lossless mode (from -1 to 1) (default -1)
      -tile-columns      <int>        E..V..... Number of tile columns to use, log2 (from -1 to 6) (default -1)
      -tile-rows         <int>        E..V..... Number of tile rows to use, log2 (from -1 to 2) (default -1)
      -frame-parallel    <boolean>    E..V..... Enable frame parallel decodability features (default auto)
      -aq-mode           <int>        E..V..... adaptive quantization mode (from -1 to 4) (default -1)
         none                         E..V..... Aq not used
         variance                     E..V..... Variance based Aq
         complexity                   E..V..... Complexity based Aq
         cyclic                       E..V..... Cyclic Refresh Aq
         equator360                   E..V..... 360 video Aq
      -level             <float>      E..V..... Specify level (from -1 to 6.2) (default -1)
      -row-mt            <boolean>    E..V..... Row based multi-threading (default auto)
      -tune-content      <int>        E..V..... Tune content type (from -1 to 2) (default -1)
         default                      E..V..... Regular video content
         screen                       E..V..... Screen capture content
         film                         E..V..... Film content; improves grain retention
      -corpus-complexity <int>        E..V..... corpus vbr complexity midpoint (from -1 to 10000) (default -1)
      -speed             <int>        E..V.....  (from -16 to 16) (default 1)
      -quality           <int>        E..V.....  (from INT_MIN to INT_MAX) (default good)
         best                         E..V.....
         good                         E..V.....
         realtime                     E..V.....
      -vp8flags          <flags>      E..V.....  (default 0)
         error_resilient              E..V..... enable error resilience
         altref                       E..V..... enable use of alternate reference frames (VP8/2-pass only)
      -arnr_max_frames   <int>        E..V..... altref noise reduction max frame count (from 0 to 15) (default 0)
      -arnr_strength     <int>        E..V..... altref noise reduction filter strength (from 0 to 6) (default 3)
      -arnr_type         <int>        E..V..... altref noise reduction filter type (from 1 to 3) (default 3)
      -rc_lookahead      <int>        E..V..... Number of frames to look ahead for alternate reference frame selection (from 0 to 25) (default 25)
    Quote Quote  
  15. Originally Posted by gdx View Post
    Originally Posted by rockerovo View Post
    When using the first code i got :
    i cant enable the profile 2

    Code:
    siraj@RouterX:~/Desktop/Project/VP9/libvpx-master$ ./vpxenc --codec=vp9  --profile=2  --fps=50000/1001 --static-thresh=0 --drop-frame=0 --good --auto-alt-ref=1  --kf-min-dist=50 --kf-max-dist=50 --min-q=32 --max-q=32 --max-intra-rate=50 -w 3840 -h 2160 --limit=1 --i420 --input-bit-depth=10 --bit-depth=10 Jockey_3840x2160_120fps_420_10bit_YUV.yuv -o siraj.webm
    Error: Unrecognized option --input-bit-depth=10
    
    Usage: ./vpxenc <options> -o dst_filename src_filename 
    Use --help to see the full list of options.
    It appear that the build of vpxenc don't support 10 bits.

    Originally Posted by rockerovo View Post
    and output for the second command :

    Code:
    siraj@RouterX:~/vp9$ ffmpeg -f rawvideo -vcodec rawvideo -s 3840x2160 -r 50000/1001 -pix_fmt yuv420p10le -i "/home/siraj/Desktop/Project/Samples/Jockey_3840x2160_120fps_420_10bit_YUV.yuv" -vframes 1 -pix_fmt yuv420p -strict -1 -f yuv4mpegpipe -an -sn - | vpxenc --codec=vp9  --profile=0  --static-thresh=0 --drop-frame=0 --good --auto-alt-ref=1  --kf-min-dist=50 --kf-max-dist=50 --max-intra-rate=50 --passes=1 --end-usage=q --cq-level=32 -o siraj.webm 
    No input file specified!
    Usage: vpxenc <options> -o dst_filename src_filename 
    Use --help to see the full list of options.
    ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers
      built with gcc 7 (Ubuntu 7.3.0-16ubuntu2)
      configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
      libavutil      55. 78.100 / 55. 78.100
      libavcodec     57.107.100 / 57.107.100
      libavformat    57. 83.100 / 57. 83.100
      libavdevice    57. 10.100 / 57. 10.100
      libavfilter     6.107.100 /  6.107.100
      libavresample   3.  7.  0 /  3.  7.  0
      libswscale      4.  8.100 /  4.  8.100
      libswresample   2.  9.100 /  2.  9.100
      libpostproc    54.  7.100 / 54.  7.100
    [rawvideo @ 0x55a7f0ed5ae0] Estimating duration from bitrate, this may be inaccurate
    Input #0, rawvideo, from '/home/siraj/Desktop/Project/Samples/Jockey_3840x2160_120fps_420_10bit_YUV.yuv':
      Duration: 00:00:12.01, start: 0.000000, bitrate: 9943336 kb/s
        Stream #0:0: Video: rawvideo (Y3[11][10] / 0xA0B3359), yuv420p10le, 3840x2160, 9943336 kb/s, 49.95 tbr, 49.95 tbn, 49.95 tbc
    Stream mapping:
      Stream #0:0 -> #0:0 (rawvideo (native) -> wrapped_avframe (native))
    Press [q] to stop, [?] for help
    Output #0, yuv4mpegpipe, to 'pipe:':
      Metadata:
        encoder         : Lavf57.83.100
        Stream #0:0: Video: wrapped_avframe, yuv420p, 3840x2160, q=2-31, 200 kb/s, 49.95 fps, 49.95 tbn, 49.95 tbc
        Metadata:
          encoder         : Lavc57.107.100 wrapped_avframe
    siraj@RouterX:~/vp9$
    Yo didn't add the"-" add the end that indicates to read the pipe to the encoder.

    For you question fornit had responded quite well, but in the case of av1 the av1enc is far superior as the ffmpeg integration is quite lacking for now.

    yeah "-" , Thank you
    Quote Quote  



Similar Threads

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