You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FFMPEG transcoding of 4K x264 video to x265(hevc) with mediacodec hardware acceleration first video file keyframe is missing or damaged after ffmpeg update to version 7.1-1 . The video file is usable after the next keyframe(GOP). Transcoding is performed with Orange PI 5 plus device based on Rockchip RK3588 processor and running on Android 12. Thanks to the availability of another Android device with termux and an older ffmpeg by making a backup and restoring it on an Orange PI I recovered a version of ffmpeg that works. This version of ffmpeg is 6.1.2. I transcoding video from the sftp server and put back transcoded video to this sftp server. Termux command is:
I used Orange PI with termux for transcoding of video, because transcoded video quality is way better than transcoded with NVIDIA or AMD hardware acceleration. I noticed, that ffmpeg7.1-1 hardware transcoding performs much faster than ffmpeg 6.1.2 , but first keyframe problem prevents me to use it. I would be very happy if I could get a working ffmpeg 7 version for termux, without this unpleasant artifact.
Problem description
FFMPEG transcoding of 4K x264 video to x265(hevc) with mediacodec hardware acceleration first video file keyframe is missing or damaged after ffmpeg update to version 7.1-1 . The video file is usable after the next keyframe(GOP). Transcoding is performed with Orange PI 5 plus device based on Rockchip RK3588 processor and running on Android 12. Thanks to the availability of another Android device with termux and an older ffmpeg by making a backup and restoring it on an Orange PI I recovered a version of ffmpeg that works. This version of ffmpeg is 6.1.2. I transcoding video from the sftp server and put back transcoded video to this sftp server. Termux command is:
ffmpeg -c:v h264_mediacodec -i sftp://user:pass@10.0.0.21:2122/128GB_SD3/Lietuva/VID_20230809_194129.mp4 -map 0:v -c:v hevc_mediacodec -bitrate_mode 1 -b:v 32000k -pix_fmt nv12 -g 180 -map 0:a -c:a:0 copy sftp://user:pass@10.0.0.21:2122/DATA_D/foto/Lietuva/034_Vilna_0908_2023_30.mp4
I used Orange PI with termux for transcoding of video, because transcoded video quality is way better than transcoded with NVIDIA or AMD hardware acceleration. I noticed, that ffmpeg7.1-1 hardware transcoding performs much faster than ffmpeg 6.1.2 , but first keyframe problem prevents me to use it. I would be very happy if I could get a working ffmpeg 7 version for termux, without this unpleasant artifact.
What steps will reproduce the bug?
Run transcode with ffmpeg 7.1-1 on termux
ffmpeg -c:v h264_mediacodec -i sftp://user:pass@10.0.0.21:2122/128GB_SD3/Lietuva/VID_20230809_194129.mp4 -map 0:v -c:v hevc_mediacodec -bitrate_mode 1 -b:v 32000k -pix_fmt nv12 -g 180 -map 0:a -c:a:0 copy sftp://user:pass@10.0.0.21:2122/DATA_D/foto/Lietuva/034_Vilna_0908_2023_30.mp4
What is the expected behavior?
Transcoded video with normal first keyframe, same as with ffmpeg 6.1.2
System information
The text was updated successfully, but these errors were encountered: