[FFmpeg-user] copyts with m4s segments

Chris Hiszpanski chris at liburtc.org
Thu Mar 30 09:37:03 EEST 2023


I'm trying to transcode MP4 segments from H.265 to H.264 -- .m4s files that
each contain an, styp, moof, and mdat atom. The ftyp and moov atoms are in
a separate init.mp4 file.

However, the sequence number in the output mfhd atom, and the base media
decode time in the output tfdt atom start from 0 with each .m4s. Is there
a way to copy the sequence number and base media decode time from the
input .m4s, and use the same timescales?

I've tried the -copyts and -copytb flags, although they seem to have no


More information about the ffmpeg-user mailing list