-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cutting and/or merging a file with subtitles causes corrupted output #1245
Comments
Hi! And the output file does play back successfully for me. Have you tried to experiment with the different settings? Here are mine: |
When i set cut points same as yours, then it also plays good for me. Here is my second attempt so you can quickly reproduce the issue. |
I've had identical problem with the subtitle track type embedded in MP4 file. It's the format used when downloading youtube video with |
@cunlem does it work if you disable the subtitle track like I described? |
Yes excluding the subtitle track from export produces file without errors |
Ok, then I think this is a bug in ffmpeg, and I don't know what I can do in losslesscut other than maybe warning the user that cutting/merging files with subtitles might not work and suggest them to disable subtitles. |
I have a lot of issues to go through, so in order to make it easier for me to help you, I ask that you please try these things first
Steps to reproduce
Hello,
3.46.2 AppImage on Debian stable.
### I suggest to skip these reproduction steps and follow my next post below where is also the source video file. Issue is also at trac.ffmpeg.org
I have drag & drop mp4 file, then .srt file, then click Export in aim to merge the subtitles with the video.
MOV faststart ENABLED
Leave MP4 metadata ENABLED
Now i drag&drop resulting video (here downloadable sample of first 60 seconds - sample made by ffmpeg -ss "0" -t "60" -c:v copy -c:a copy) to LC and set two fragments (using key button to jump to key frames) in the first 2 minutes of the video. Click export,
MOV faststart ENABLED (fails also when is DISABLED)
Leave MP4 metadata ENABLED (fails also when is DISABLED)
Keyframe cut
Merge fragments
Play the merged video (here uploaded) using VLC 3.0.17.4 (seems to be latest stable, is from flatpak https://www.videolan.org/vlc/#download ) and it is stuck for many seconds between the fragments, but then resume anyway.
when video freezes, this appear:
then when it "resume" playback, it shows:
MPV player does not play the file correctly too (no freeze, but second fragment not played entirely) and shows:
ffplay plays it correctly
after converting merged file to .mkv using ffmpeg (no extra parameters), mpv plays correctly and show only:
Is this something to be fixed please? Any idea on ffmpeg command that would encode file again and fix it as a workaround?
UPDATE - WORKAROUND:
It may help to first remux the file using MKVToolNix, meaning drag and drop video and external subtitle file/s to it and Multiplex (no re-encoding) into a new single video file. Then this resulting file cut in LosslessCut. It should work unlike when ext. subs are added into a LC.
Expected behavior
no freeze/pause playback
Actual behavior
freezes/pauses playback for many seconds then resumes
Provide an error report
https://bin.disroot.org/?59ddb152669bdff4#Bw4tzpCHHVU4ZzYHF65RqBkZok4agNU2KZ6opbPsr8uf
Share the file
source: https://drive.proton.me/urls/3DTPXCC724#LDbmx6W8cjPe
resulting merged file with playback errors: https://drive.proton.me/urls/ARZQD2XVA8#B77D6jQefcop
Share log
The text was updated successfully, but these errors were encountered: