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

Blank frames between requests in CUE playlist #3971

Open
vitoyucepi opened this issue Jun 15, 2024 · 4 comments
Open

Blank frames between requests in CUE playlist #3971

vitoyucepi opened this issue Jun 15, 2024 · 4 comments

Comments

@vitoyucepi
Copy link
Collaborator

Describe the bug
If playlist uses a CUE file, it will produce blank frames when switching between requests.
Screenshot from Audacity with the waveform separated by the empty frames

To Reproduce

  1. ffmpeg -f lavfi -i "sine=frequency=100:duration=2" -c:a libmp3lame -b:a 16k -y 1.mp3
  2. 1.cue
    FILE "/tmp/test/1.mp3" WAVE
      TRACK 01 AUDIO
        INDEX 01 00:00:00
      TRACK 02 AUDIO
        INDEX 01 00:01:00
  3. main.liq
    s = playlist("1.cue", loop=false, mode="normal")
    
    s = clock(sync="none", s)
    # clock.assign_new(sync="none", [s])
    
    enc = %ffmpeg(format="mp3", %audio(codec="libmp3lame", b="128k"))
    output.file(enc, "out.mp3", s, fallible=true)
    

Expected behavior
No blank frames between requests, because they produce an audible click.

Version details

  • OS: debian in docker
  • Version: 2.2.5, c46726b

Install method
savonet/liquidsoap:v2.2.5

Common issues
#3937

@toots
Copy link
Member

toots commented Jun 20, 2024

Thanks for reporting. I am not sure if this is really a bug. The gap is caused by the new request taking too much time to be prepared I think. If I use prefetch=2, I get a constant sine (with a pop due to the expected discontinuity between the tracks):

Screenshot 2024-06-20 at 10 20 39 AM

@vitoyucepi
Copy link
Collaborator Author

If I use prefetch=2

This is weird. There are only two tracks in the playlist and I still see the gap even with prefetch=2.

@toots
Copy link
Member

toots commented Jun 20, 2024

What decoder are you using?

@vitoyucepi
Copy link
Collaborator Author

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