0

While transcoding I have to create m3u8 playlist manually and now on-demand I want to create .ts files. I have used FFmpeg's cut option from start to end but .ts files have audio problems while getting played.

I have a command which creates ts files as well as m3u8.

 ffmpeg -i input -g 10 -hls_time 3 -hls_list_size 0  out.m3u8

But as I said out.m3u8 I already have and the above command takes time to generate all ts files. Is there any other command in which I can generate one ts file when the start and end are given?

I have tried commands below:

ffmpeg -i input -acodec aac -vcodec h264 -ss 0 -to 3 chunk1.ts
ffmpeg -i input -acodec aac -vcodec h264 -ss 3 -to 6 chunk2.ts
...
Dinesh Kumar
  • 545
  • 4
  • 17

1 Answers1

0

It’s not possible with ffmpeg, or any existing software. AAC has something called priming samples that prevent concatenation from working properly.

szatmary
  • 29,969
  • 8
  • 44
  • 57
  • I am new to FFmpeg, what would you suggest? Should we always create chunks alongside m3u8 file? – Dinesh Kumar Jun 18 '20 at 18:00
  • 1
    Either transcode once in advance, like ffmpeg was designed to do. Or study the acc specification and develop a custom tool that can satisfy the requirement for bitstream concatenation. – szatmary Jun 18 '20 at 18:04