[FFmpeg-user] ffmpeg repeats output to stdout

Bartek Biernacki lmrspax at gmail.com
Thu Aug 24 00:32:26 EEST 2017


I am using ffmpeg to create some m3u8 (hls) video. When I am saving
segment_list to file everything works as expected, but when I am trying to
write it to pipe it repeats whole playlist after saving each chunk file.

Command I am using:

ffmpeg.exe -nostdin -loglevel panic -hide_banner -i sample.mp4 -map 0
-codec:v libx264 -codec:a aac  -f segment -segment_list pipe:1
-segment_list_type m3u8 out%03d.ts


Expected output (this how file looks like when I am saving to file, not to
a pipe):

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:9
#EXTINF:8.480000, out000.ts
#EXTINF:4.560000, out001.ts
#EXTINF:3.120000, out002.ts
#EXTINF:5.640000, out003.ts
#EXT-X-ENDLIST


Result:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:9
#EXTINF:8.480000,
out000.ts
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:9
#EXTINF:8.480000,
out000.ts
#EXTINF:4.560000,
out001.ts
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:9
#EXTINF:8.480000,
out000.ts
#EXTINF:4.560000,
out001.ts
#EXTINF:3.120000,
out002.ts
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:9
#EXTINF:8.480000,
out000.ts
#EXTINF:4.560000,
out001.ts
#EXTINF:3.120000,
out002.ts
#EXTINF:5.640000,
out003.ts
#EXT-X-ENDLIST


Is it a bug of ffmpeg or expected behaviour? If expected how can I change
it?


More information about the ffmpeg-user mailing list