[FFmpeg-trac] #11683(avcodec:new): Error encoding to H265 (H264 is ok)
FFmpeg
trac at avcodec.org
Thu Jul 24 20:16:38 EEST 2025
#11683: Error encoding to H265 (H264 is ok)
-------------------------------------+-------------------------------------
Reporter: rgr | Type: defect
Status: new | Priority: important
Component: avcodec | Version: 7.1
Keywords: h265 | Blocked By:
encoding |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
The encoded MP4/H265 file doesn't play correctly and is 2 frames shorter.
When I change the codec to H264, everything works fine.
ffmpeg reports 465 frames encoded:
encoded 465 frames in 46.29s (10.05 fps), 8883.04 kb/s, Avg QP:25.39
[aac @ 000001c87a123040] Qavg: 881.112
In VirtualDub with the latest ffmpeg libraries, the last frames are
displayed in random order. Seek-by-frame often causes jumps to the wrong
frame (each frame has a label with its number). Magix Vegas only reads 463
frames.
After changing the codec in the ffmpeg command to libx264, all problems
disappear.
https://gcdnb.pbrd.co/images/ZSD7tRo9KuG7.png?o=1
How to reproduce:
{{{
% ffmpeg -avisynth_flags +all -i "2025_04_10 20_44_52
(PXL_20250410_204452830).avs" -c:v libx265 -preset slow -crf 19 -pix_fmt
yuv420p -c:a aac -b:a 192k "2025_04_10 20_44_52
(PXL_20250410_204452830)(H265).mp4"
ffmpeg version 2025-07-23-git-829680f96a-full_build-www.gyan.dev
built on 2025-07-23
}}}
Files: https://files.fm/u/jq3yzf4za7 (output H265 included)
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11683>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list