lossless-cut icon indicating copy to clipboard operation
lossless-cut copied to clipboard

Video Freezing on Merged MKV - Not sure if authoring or playback issue

Open SuperSaiyanMusashi opened this issue 3 years ago • 12 comments

Files: https://www.mediafire.com/file/9usu4oqqel3z7uq/112_-Mini_Arc_Part%25282%2529.mkv/file https://www.mediafire.com/file/54l3zf8rhxzkmf8/112_-Mini_Arc_Part%25283%2529.mkv/file

Describe the bug I merged 2 small MKVs but when I played the resulting combined video on VLC or WMP the video stops at the split point while the sound keeps going. However If I back up or skip to a point after where it stopped, it shows the correct video. When the merged file is brought into Lossless Cut, it plays fine, albeit without the sound.

To Reproduce Merge the 2 files above, play resulting MKV in Windows Media Player or VLC.

Expected behavior I would expect the merged file to play the videos back to back smoothly.

Desktop (please complete the following information): Windows 10

Additional context Since skipping / rewinding seems to get the correct picture to show, I know the data for it must be present in the file, and I suspect this might be a playback problem as opposed to an authoring issue with Lossless Cut, so I'm open to recommendations for other players too. The stem files in the link are blu-ray grade and use TrueHD Audio, which I'd like to keep if possible.

SuperSaiyanMusashi avatar Jun 17 '21 20:06 SuperSaiyanMusashi

I was having this issue while merging several videos last night.

JasonShearer avatar Jun 18 '21 03:06 JasonShearer

I have tried OP's files and after merging using LC 3.36.0 on Linux (OP having Windows), i see the same problem as OP describe. "ffplay -loglevel verbose file" shows: [truehd @ 0x7faa0002cc00] Lossless check failed - expected 43, calculated 2c. nothing more interesting. When played using "VLC -vv file", then it shown some warnings I have tried to merge also using: ffmpeg -i "concat:112 - Mini Arc Part (2).mkv|112 - Mini Arc Part (3).mkv" -c copy out.mkv ffplay out.mkv and the result is same as LosslessCut. So merging is not the issue maybe.. but cutting or the fragments or not using fragments made by losslessCut?

slrslr avatar Jun 28 '21 15:06 slrslr

So haven't they fixed it yet???

SpencerMeow avatar Jul 09 '21 22:07 SpencerMeow

I noticed that these videos have a lot of tracks (streams). Could be worth trying to disable all tracks except video and see if it has the same issue. If it does not, then selectively re-enable tracks until it stops working. Lossless merging is really complex and is handled by ffmpeg, so not much losslesscut can do about any such issues.

mifi avatar Jul 25 '21 06:07 mifi

Ah hello!

My current version of the "whole video" has only the video and a single audio track; Along the way I noticed I could shed some dead time by parsing out the video track and the main audio track then recombining them. It still gets the choke-ups at the same spots though, forcing me to keep multiple video files and play them sequentially.

SuperSaiyanMusashi avatar Jul 25 '21 18:07 SuperSaiyanMusashi

Do OP's video parts come from losslesscut ? If so I can only suggest first exporting a file with only a few tracks (e.g. audio and video). then open that new file and try to cut+merge that.

mifi avatar Aug 23 '21 15:08 mifi

Ey. Yes all the pieces came from Losslesscut except for the original rips of the movies which came from MakeMKV. I tried removing all the tracks except for the video and a single audio track but I still got the hold up when playing the merged video.

SuperSaiyanMusashi avatar Aug 24 '21 13:08 SuperSaiyanMusashi

I can only suggest trying:

  • try the different avoid_negative_ts values in the export dialog
  • Try both Cut modes keyframe/normal
  • to cut the pieces from the command line with a newer version of ffmpeg and see if that helps. (go to the help sheet and find the commands there and use them on the command line)

mifi avatar Aug 24 '21 15:08 mifi

I will see what these do next time I work on vids.

SuperSaiyanMusashi avatar Aug 24 '21 15:08 SuperSaiyanMusashi

[truehd @ 0x7faa0002cc00] Lossless check failed - expected 43, calculated 2c.

Will be IMHO fixed in https://patchwork.ffmpeg.org/project/ffmpeg/patch/[email protected]/

Flushing when seeking and thus those lossless warnings is fixed in https://github.com/FFmpeg/FFmpeg/commit/5673a4842556b79a92a1ede6e9696506fd4161ad

ValZapod avatar Aug 30 '21 17:08 ValZapod

[truehd @ 0x7faa0002cc00] Lossless check failed - expected 43, calculated 2c.

Will be IMHO fixed in https://patchwork.ffmpeg.org/project/ffmpeg/patch/[email protected]/

Flushing when seeking and thus those lossless warnings is fixed in FFmpeg/FFmpeg@5673a48

This patch might fix the issue I'm having? How do I use it?

SuperSaiyanMusashi avatar Sep 17 '21 03:09 SuperSaiyanMusashi

This patch might fix the issue I'm having?

Sorry, I was wrong: it did not fix the issue here. The bug is in concat.

ValZapod avatar Sep 17 '21 04:09 ValZapod