Skip to content

cut+merge issue #2356

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

Open
4 tasks done
andiandi13 opened this issue Mar 19, 2025 · 2 comments
Open
4 tasks done

cut+merge issue #2356

andiandi13 opened this issue Mar 19, 2025 · 2 comments

Comments

@andiandi13
Copy link

andiandi13 commented Mar 19, 2025

The fewer issues I have to read, the more new features I will have time to implement, so I ask that you please try these things first

Operating System

Windows 10

Steps to reproduce

There is an issue with the audio when I perform "cut + merge" (whether using "auto" or "make_non_negative"):

Near the beginning of each merged segment, there is a "click" or an audio "pause." However, if I make separate cuts, extract the audio from each segment, and merge them with MKVToolnix without the video, the problem disappears, and the merged audio remains in sync when I remux it with the video.

(container: mp4, codecs: x264, aac)

Expected behavior

The audio should play smoothly

Actual behavior

There are clicks or pause between merged segments

Share log from developer tools

No response

@andiandi13 andiandi13 changed the title cur+merge issue cut+merge issue Mar 21, 2025
@mifi
Copy link
Owner

mifi commented Mar 25, 2025

This is most likely a bug/shortcoming in ffmpeg, and not much that can be done in LosslessCut that I can think of, unfortunately.

@andiandi13
Copy link
Author

andiandi13 commented Mar 31, 2025

Ok. I did some more tests, in case it helps clarify the issue:

For some merged videos, the problem was resolved by setting "ffmpeg" avoid_negative_ts to "disabled" (it also worked with "auto") instead of "make_non_negative."

However, there are still some videos where the issue persists regardless of the option, and the audio track itself is not affected (verified in Audacity—no clicks or stops).

These clicks and stops are only heard when playback starts before the segment where the bug occurs. If I place the playhead at the beginning of the segment with the bug, I don’t hear it (I used MPC-HC player for the test)

Sometimes, the click and stop bug also disappears for certain segments by slightly adjusting the cut frames (in keyframe cut mode).

I tried recreating two segments where the bug occurs instead of loading the old project file, and the bug was gone. There was a small difference between the project files despite the start and end frames being exactly the same. The "end" of the first segment in the old project file was: end: 154.960421, and in the new project file, it was: end: 154.96. When I add another segment after this first one, the bug does not occur when it is .96 instead of .960421.

That's it, in case it helps (for LosslessCut or ffmpeg). I've also attached two logs (indicating the segments with the bug).

Log 2 - Make_non_negative - Bug Seg2 And Seg8.txt
Log 1 - Auto - Bug Seg2.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants