Skip to content
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

VOD transcoding: Video is smooth, audio may have clicks at segments? #56

Open
stevyn81 opened this issue Jul 9, 2024 · 4 comments
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@stevyn81
Copy link

stevyn81 commented Jul 9, 2024

Hello,

I have been enjoying setting up and testing the impressive go-transcode software. I am testing the VOD feature with a .MP4 file transcoding down to a smaller size and the video looks smooth and great, but with headphones on and listening very carefully I can sometimes hear a click. Monitoring with the browser "inspect" I see the click matches with the segment transition.

I am hesitant to post this as perhaps it is my computer having trouble. I have tested with the video-keyframes: false or true and seems to happen either way.

If I stream the .mp4 as a normal static file, no transcoding, the video + audio is smooth.

Searching online I find a few others researching the audio click issues.. example: https://stackoverflow.com/questions/58898638/precise-method-of-segmenting-transcoding-videoaudio-via-ffmpeg-into-an-on

Can anyone confirm this audio issue or is it just me? Thanks much for your work!

@m1k1o
Copy link
Owner

m1k1o commented Jul 11, 2024

From: https://stackoverflow.com/questions/58898638/precise-method-of-segmenting-transcoding-videoaudio-via-ffmpeg-into-an-on

I think this may be an issue with splitting using time in ffmpeg, where possibly the audio stream cannot be accurately sliced at the exact frame the video is.

This points again to the old known issue that was believed to be fixed but resurfaces again #38

So far, I've been unable to figure out a solution to this problem.

@m1k1o m1k1o added the bug Something isn't working label Jul 11, 2024
@m1k1o m1k1o added the help wanted Extra attention is needed label Sep 22, 2024
@stevyn81
Copy link
Author

Hello, I have been looking at the transcoder code in a "plex like alternative" project called Kyoo, and it appears they are transcoding the audio separately from the video and then serve up both. https://github.com/zoriya/Kyoo/tree/master/transcoder

@m1k1o
Copy link
Owner

m1k1o commented Dec 24, 2024

@stevyn81 thank you for the suggestion. I am taking a look at their implementation, and I see that they pregenerate 100 segments in advance, what is almost 20x more than what we do here by default. Meaning, even if the error would be there it would be less visible.

But the idea of having audio separate to video is a good one, as it allows having multiple audio tracks and switch between them seamlessly. I think we should move to that concept eventually.

@m1k1o
Copy link
Owner

m1k1o commented Dec 30, 2024

Further tests revealed, that alone having audio and video separate does not fix the problem. The author states, however, that they were able to fix this by producing one more extra segment at the begining of the sequence and discarding it. This offset should fix the issue, I'll perform more tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants