video streaming – Persistent synchronization issues in ismindex after encoding with FFmpeg

I am constantly facing synchronization issues when creating .ism manifests using ismindex after encoding with FFmpeg. Below are the steps I’ve followed:

Segmenting the video for various resolutions:

ffmpeg.exe -i "output_cleaned.mp4" -threads 2 -c:v libx264 -crf 23 -profile:v baseline -level 3.0 -pix_fmt yuv420p -movflags +faststart -vf "scale=1280:-1, fps=30" -b:v 3400k -an "manifest_1280_3400.ismv" -vf "scale=960:-1, fps=30" -b:v 2250k -an "manifest_960_2250.ismv" -vf "scale=960:-1, fps=30" -b:v 1500k -an "manifest_960_1500.ismv" -vf "scale=640:-1, fps=30" -b:v 1000k -an "manifest_640_1000.ismv" -vf "scale=640:-1, fps=30" -b:v 650k -an "manifest_640_650.ismv" -vf "scale=320:-1, fps=30" -b:v 400k -an "manifest_320_400.ismv" -map 0:a -c:a aac -b:a 45k -ar 22050 "manifest_128.isma"

I get these messages:

[ismv @ 000001c3d6371a00] Track 0 starts with a nonzero dts -297506,
while the moov already has been written. Set the delay_moov flag to
handle this case.

[libx264 @ 000001c3d597da40] using SAR=1/1

[libx264 @ 000001c3d597da40] frame MB size (80×45) > level limit
(1620)

[libx264 @ 000001c3d597da40] MB rate (108000) > level limit (40500)

Generate indexes with ismindex:

ismindex.exe -n manifest manifest_1280_3400.ismv manifest_960_2250.ismv manifest_960_1500.ismv manifest_640_1000.ismv manifest_640_650.ismv manifest_320_400.ismv manifest_128.isma

Getting a lot of these messages:

Mismatched (start) time of video chunk 42 in manifest_1280_3400.ismv
(0) and manifest_640_650.ismv (4)

Mismatched duration of video chunk 42 in manifest_1280_3400.ismv (0)
and manifest_320_400.ismv (5)

Mismatched (start) time of video chunk 42 in manifest_1280_3400.ismv
(0) and manifest_320_400.ismv (5)

So I tried to re-encode the original video to clean it up with:

ffmpeg.exe -i "input.mp4" -c:v libx264 -crf 23 -pix_fmt yuv420p -movflags +faststart -vf "scale=1280:-1, fps=30" -b:v 3400k -c:a aac -b:a 45k -ar 22050 "output_cleaned.mp4"

But I get these messages:

[mov,mp4,m4a,3gp,3g2,mj2 @ 000001c3d37e6b40] st: 1 edit list: 1
Missing key frame while searching for timestamp: 0

[mov,mp4,m4a,3gp,3g2,mj2 @ 000001c3d37e6b40] st: 1 edit list 1 Cannot
find an index entry before timestamp: 0.

And the same messages as before trying to create ismv/isma and ism/ismc files.

Any advice or suggestions on how to resolve these synchronization issues would be greatly appreciated. Thank you!

Read more here: Source link