[FFmpeg-user] Transcoding individual segments of HLS?

David Johansen davejohansen at gmail.com
Sat Mar 16 07:43:50 EET 2024


I've used ffmpeg to convert an H.264 .mp4 to segments for HLS playback and
it works. I'd like to then transcode them to H.265 so that it's available
as well, and I'd like to process them as individual segments so it can be
done in parallel.

I'm doing that by creating a manifest that has the init.mp4 and single
segment and then outputting just that segment, but when I do that, it will
only playback the first segment and then stop. I believe that something is
going wrong with the PTS and/or DTS values when I do this.

I tried using -copyts but it didn't change the output and I also disabled
B-frames because it made the PTS values of the resulting HLS appear in
sequential order as the original one does, but it still won't play in the
browser.

Really, I don't need the complexity of using the input as a "mini HLS" but
I couldn't figure out a way to use the fragmented mp4 as input to the
transcoding process. Is there a way I can do that, so I can process the
file directly?

Thanks,
Dave


More information about the ffmpeg-user mailing list