[FFmpeg-user] splitting up video with high quality (HDR, 4k, Dolby Atmos+ TrueHd)

Sebbi Thueni sebastianthuener99 at gmail.com
Tue Nov 21 01:49:28 EET 2023

Hi I have a question regarding a command in ffmpeg. I have a relatively
high quality video as test.mkv which has a 4k quality and hdr. additionally
it has a truehd dolby atmos audio. so lossless and uncompressed. i'm trying
to cut the video into small snippets of 5 s now. the background is that i
can play this video better as video on demand as m3u8. if i use this :
ffmpeg -i test.mkv -f segment -segment_time 5 test%d.mkv
the desired result does not come out. ffmpeg turns the audio into sound in
vorbis. which no longer offers the quality of a pure atmos truehd sound.
but if i just copy the sound and the video with:
ffmpeg -i test.mkv -c:v copy -c:a copy -f segment -segment_time 5 test%d.mkv
ffmpeg -i test.mkv -c:v copy -c:a truehd -f segment -segment_time 5
ffmpeg -i test.mkv -map 0:v -c:v copy -map 0:a -c:a copy -f segment
-segment_time 5 test%d.mkv
ffmpeg -i test.mkv -map 0:v -c:v copy -map 0:a -c:a truehd -f segment
-segment_time 5 test%d.mkv
the sound is not played in all segments. The video is always flawless. My
question now is if someone can help me to get these segments to work.
because theoretically it is just a copy of everything and always cut off
after a few seconds.

More information about the ffmpeg-user mailing list