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

end of recordings getting cut off #9

Open
mcfiredrill opened this issue May 26, 2020 · 6 comments · May be fixed by #11
Open

end of recordings getting cut off #9

mcfiredrill opened this issue May 26, 2020 · 6 comments · May be fixed by #11

Comments

@mcfiredrill
Copy link
Member

mcfiredrill commented May 26, 2020

No description provided.

@dudethatbe
Copy link

dudethatbe commented May 26, 2020

User story:

The tail end of recordings from streampusher appear to be missing when they are downloaded. This does not include the processing that sox takes care of (trimming, silence-removal, merging,...). During my last session I left maybe < 5 seconds of intentionally deadair. After disconnecting I monitored the livestream on datafruits. It never reached the deadair and cut off seemingly right before it. I think I could have waited longer to get the rest of the audio to go through to datafruits. The next day I downloaded the recording without processing it and even less of the audio than I remembered from the ending was there (it cut off earlier than from what the stream had played back). Here's a graph that I hope explains what was experienced if the story was hard to follow:

Comparison of played back audio locally vs. stream vs. download

I'll try it out again and see how much is getting removed. Maybe its a client side issue with altacast? Maybe the sleep timer has to be increased? https://github.com/streampusher/radio/blob/master/liquidsoap/radio.liq#L177
Is everyone else experiencing this or just a few? 🤔

@mcfiredrill
Copy link
Member Author

mcfiredrill commented May 26, 2020

I've definitely seen it on other recordings as well, so I don't think its just you.
I don't think it was happening before I made those changes to how recordings work, so I don't think its a client issue either.

@mcfiredrill
Copy link
Member Author

Maybe I should bump up the sleep time to 120 or more? Worse case, we end up with extra silence in the recording I guess? Which should be taken care of by processing anyway.

@mcfiredrill
Copy link
Member Author

mcfiredrill commented May 27, 2020

toots gave me an idea in the liquidsoap slack.

Hi @freedrull I think the best would be to use reopen_when and a string getter. You could do something like:
current_file = ref "some-file-name"
next_file = ref "some-file-name"
def reopen_when () =
  if !current_file != !next_file then
    current_file := !next_file
    true
  else
    false
  end
end
output.file(..., {"/path/to/#{!current_file}.mp3"}, ...)
(edited)





7:48
Then you should be able to trigger a re-open simply by setting next_file and waiting for the output to pick it up through reopen_when.





7:49
(code not tested but that should give you an idea..)

@bradwbradw
Copy link

i wonder what would happen if you wrote an automated test that makes a 5 second recording, or a 2 minute long recording, then verifies the length of the resulting file ?

@mcfiredrill mcfiredrill linked a pull request Sep 17, 2020 that will close this issue
@mcfiredrill
Copy link
Member Author

There is another issue now, where recording files do not seem to get closed properly, and several DJs recordings get mixed together into often very large files. I'm not sure if using the new technique will solve this as well but it may be a start.

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

Successfully merging a pull request may close this issue.

3 participants