ffmpeg with libopenh264 to get profile high422

313 Views Asked by At

I have raw MJPEG video file. 3840x2160, 25fps, YUYV 4:2:2. I want use ffmpeg with encoder libopenh264. Why I can't use profile high422?

ffmpeg -framerate 25 -i inFile.yuvj422p -profile:v high422 -c:v libopenh264 -q 2 -b 2500000 -allow_skip_frames 1 -maxrate 3500000 outFile.mkv

Log

...
[libopenh264enc @ 0x56077580ed80] [Eval @ 0x7ffe78457230] Undefined constant or missing '(' in 'high422'

Let's know encoder's capability

# ffmpeg -h encoder=libopenh264
Encoder libopenh264 [OpenH264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10]:
    General capabilities: threads 
    Threading capabilities: other
    Supported pixel formats: yuv420p
libopenh264enc AVOptions:
  -slice_mode        <int>        E..V......P set slice mode, use slices/max_nal_size (from 0 to 4) (default fixed)
     fixed           1            E..V....... a fixed number of slices
     dyn             3            E..V....... Size limited (compatibility name)
     sizelimited     3            E..V....... Size limited
  -loopfilter        <int>        E..V....... enable loop filter (from 0 to 1) (default 1)
  -profile           <int>        E..V....... set profile restrictions (from -99 to 65535) (default -99)
     constrained_baseline 578          E..V.......
     main            77           E..V.......
     high            100          E..V.......
  -max_nal_size      <int>        E..V....... set maximum NAL size in bytes (from 0 to INT_MAX) (default 0)
  -allow_skip_frames <boolean>    E..V....... allow skipping frames to hit the target bitrate (default false)
  -cabac             <int>        E..V......P Enable cabac(deprecated, use coder) (from 0 to 1) (default 0)
  -coder             <int>        E..V....... Coder type (from -1 to 1) (default default)
     default         -1           E..V.......
     cavlc           0            E..V.......
     cabac           1            E..V.......
     vlc             0            E..V.......
     ac              1            E..V.......
  -rc_mode           <int>        E..V....... Select rate control mode (from -1 to 3) (default quality)
     off             -1           E..V....... bit rate control off
     quality         0            E..V....... quality mode
     bitrate         1            E..V....... bitrate mode
     buffer          2            E..V....... using buffer status to adjust the video quality (no bitrate control)
     timestamp       3            E..V....... bit rate control based on timestamp

Looks like there is no high422 profile in libopenh264. But I can find PRO_HIGH422 in several places of source code...

ffmpeg version

# ffmpeg -v
ffmpeg version N-111611-g5b11ee9429 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --prefix=/home/a/Downloads/myGitHub/FFmpeg_fixing/ffmpeg_openh264/ffmpeg_build/ --pkg-config-flags=--static --extra-cflags=-I/home/a/Downloads/myGitHub/FFmpeg_fixing/ffmpeg_openh264/ffmpeg_build/include --extra-ldflags=-L/home/a/Downloads/myGitHub/FFmpeg_fixing/ffmpeg_openh264/ffmpeg_build/lib --extra-libs='-lpthread -lm' --ld=g++ --bindir=/home/a/bin --enable-gpl --enable-libopenh264

Why I can't use profile high422?

0

There are 0 best solutions below