-
Notifications
You must be signed in to change notification settings - Fork 134
Open
Labels
upstreamUpstream driver or runtime issuesUpstream driver or runtime issues
Description
Transcoding an h264 video 50fps 1080p from a Canon camera on an rk3588 board.
The resulting videos has jerky motion, it feels like some frames are getting reordered, perhaps around 2 times per second. It is really nauseating to watch this.
The problem does not happen when using a sw decoder (-c:v h264
).
I also tried h264 and h265 output, no difference.
Command used:
ffmpeg -hide_banner -y -hwaccel rkmpp -hwaccel_output_format drm_prime -i in.mp4 -map_metadata 0 -c:a libopus -b:a 64k -strict -2 -c:v hevc_rkmpp -rc_mode 2 -qp_init 22 -tag:v hvc1 out.mp4
The final summary shows:
frame= 1074 fps= 77 q=-0.0 Lsize= 37349kB time=00:00:21.46 bitrate=14257.5kbits/s dup=90 drop=0 speed=1.54x
Note the dup=90. When using the software decoder, there is no dup
.
With more verbose logging the following is printed periodically
[hevc_rkmpp @ 0xaaaad1b6d680] Received a packet
[hevc_rkmpp @ 0xaaaad1b6d680] Wrote 4177920 bytes to encoder
[hevc_rkmpp @ 0xaaaad1b6d680] Received a packet
[hevc_rkmpp @ 0xaaaad1b6d680] Wrote 4177920 bytes to encoder
[hevc_rkmpp @ 0xaaaad1b6d680] Received a packet
[vost#0:0/hevc_rkmpp @ 0xaaaad1b6d1d0] *** 2 dup!
Would really appreciate any help. Running sw decoder is not really an option due to power constraints.
Thanks!
ffmpeg built like this:
# Build and install MPP
WORKDIR /tmp/mpp
RUN git clone -b jellyfin-mpp --depth=1 https://github.com/nyanmisaka/mpp.git rkmpp
WORKDIR /tmp/mpp/build
RUN cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_TEST=OFF ../rkmpp
RUN make -j$(nproc) install
# Build and install RGA
WORKDIR /tmp/rkrga
RUN git clone -b jellyfin-rga --depth=1 https://github.com/nyanmisaka/rk-mirrors.git src
WORKDIR /tmp/rkrga/build
RUN meson setup ../src --prefix=/usr/local --libdir=lib --buildtype=release --default-library=shared -Dcpp_args=-fpermissive -Dlibdrm=false -Dlibrga_demo=false
RUN ninja install
# Build and install FFmpeg
WORKDIR /tmp/ffmpeg
RUN git clone --depth=1 https://github.com/nyanmisaka/ffmpeg-rockchip.git src
WORKDIR /tmp/ffmpeg/build
RUN ../src/configure --prefix=/usr/local --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga --enable-libopus
RUN make -j$(nproc) install
Metadata
Metadata
Assignees
Labels
upstreamUpstream driver or runtime issuesUpstream driver or runtime issues