[FFmpeg-user] h264_mp4toannexb unable to split h264_qsv-encoded files?
Hugo Garbez
h.garbez at kol.to
Thu Mar 2 18:11:55 EET 2017
Hello,
I'm using FFmpeg 3.2.4 on Debian 8.7, and I have some problems with
h264_qsv and HLS.
I'm splitting my files for HLS with the following command:
$ ffmpeg -i example.mp4 -codec copy -map 0 -bsf:v h264_mp4toannexb
-hls_time 5 -hls_init_time 1 -hls_list_size 0 example.m3u8
When example.mp4 is created with libx264, there's no problem with
splitting files with HLS:
$ ffmpeg -i original.mp4 -codec:v libx264 example.mp4
$ [previous HLS command]
$ cat example.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:2.200000,
example-0.ts
#EXTINF:2.480000,
example-1.ts
#EXTINF:4.800000,
example-2.ts
#EXTINF:4.440000,
example-3.ts
With libx264, -hls_time 5 works (EXT-X-TARGETDURATION and EXTINF look good).
But that's not the case if example.mp4 was encoded with h264_qsv
instead of libx264:
$ ffmpeg -i original.mp4 -codec:v h264_qsv example.mp4
$ [previous HLS command]
$ cat example.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:10.000000,
example-0.ts
#EXTINF:10.000000,
example-1.ts
#EXTINF:10.000000,
example-2.ts
#EXTINF:10.000000,
example-3.ts
#EXTINF:9.640000,
As you can see, it looks like "-hls_time 5" has no effect when the
video is encoded with h264_qsv instead of libx264.
Is there anything I can do about this?
Thank you very much.
More information about the ffmpeg-user
mailing list