-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
liq_cue_in cueing-in too far? #1291
Comments
Thanks for the report. I'll look at it shortly. |
I must beg forgiveness -- please don't investigate this yet. I've just put together the playlist I promised, and it seems my in-cue automatic detection system wasn't correctly marking the start of tracks with a fade-in. This may well NOT be a bug in your code, and I'm sorry to have troubled you with it. I also compiled your test code for Version 2 (needed to use a slightly earlier version of your FFmpeg plugin) and it is running smoothly using the .liq file that ran earlier in Version 1.4.3 with one change: This line gives an error (I've deleted it without trouble): Liquidsoap complained that "decoder.file_decoders" doesn't exist. |
Regrettably, I may have been correct. On checking the playlist and comparing the files in an audio editor, my liq_cue_in markers were correctly instructing the playback system to start the track from, or before, the correct time. I have recently switched to re-wrapping all my music files, using the original codecs and sample-rates, in Matroska, rather than re-encoding each and every track as a high bit-rate AAC at a single sample rate. I wonder how liq_cue_in is determined by Liquidsoap? I should learn more Ocaml. |
Hi! No problem, we're all experimenting. There are a couple more bugs related to crossfade duration so I strongly suspect something is up with it. Is there any chance you would be able to isolate a simple example that I could use to reproduce the issue? If needed, you could send me the file at toots@rastageeks.org. Thanks! |
Hi! We just fixed #1074 that was a crossfade-related bug. Any chance you could try with the latest Thanks! |
On Sat, Jul 25, 2020 at 4:58 PM Romain Beauxis ***@***.***> wrote:
Hi!
We just fixed #1074 <#1074>
that was a crossfade-related bug. Any chance you could try with the latest
v1.4.3-pre-release branch? You can either use opam pin mechanism or one
of the build that should appear shortly at:
https://github.com/savonet/liquidsoap/releases/tag/v1.4.3-pre-release
Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1291 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACE3E4Y5YLPGTWMDPVZKHXTR5L6K7ANCNFSM4PBSU3FA>
.
Thanks for looking into this.
Though I'm not at the system right now, I'll be delighted to try this in
the morning, on the playlist of tracks where problems were earlier observed.
With best wishes,
John
|
Great! I just pushed another commit related to cross-fade. Make sur you test the latest |
On Sun, Jul 26, 2020 at 1:26 AM Romain Beauxis ***@***.***> wrote:
Great! I just pushed another commit related to cross-fade. Make sur you
test the latest v1.4.3-pre-release. Thanks!!
Good of you to examine this.
I compiled the latest test this morning. It reports as "Liquidsoap
1.4.3+git@3075878" which is in Git with the comment as "revert this".
I have deliberately made a playlist with tracks that have liq_cue_in
durations of between 3 and 4 seconds. Here are the results of the three
most recently monitored.
Compared are the liq_cue_in duration, the observed cue-in duration (checked
by loading the same file loaded by Liquidsoap into an audio editor, and
looking and listening, by eye and ear, for the same point in the waveform
as accurately as possible).
Track: "The Man I Love"
*liq_cue_in: 3.5*
*Observed cue in: 4.9*
liq_cross_duration: 2.09
Track: "It's Obvious"
*liq_cue_in: 3.0*
*Observed cue in: 4.4*
liq_cross_duration: 9.49
Track: "Oh Lady Be Good"
*liq_cue_in: 3.7*
*Observed cue in: 5.2*
liq_cross_duration: 3.23
In all cases, as reported by the verbose log, FFmpeg is the decoder.
This is the log around the last of the cross-fade points listed above. The
cross-fade happens, that is, the two sources overlap. It's just that the
second source is cued-in too far.
There is a lot of data in this log but I'm not sure which parts are
helpful, and which parts aren't needed.
with best wishes,
John
2020/07/26 14:39:02 [cross_11573:3] Analysis: -89.539184dB / -26.562897dB
(9.47s / 9.49s)
2020/07/26 14:39:02 [crossfade:4] Before:
("id3v2_priv.wm/uniquefileidentifier",
"A\\x00M\\x00G\\x00a\\x00_\\x00i\\x00d\\x00=\\x00R\\x00 \\x00 \\x00
\\x001\\x009\\x006\\x003\\x002\\x007\\x00;\\x00A\\x00M\\x00G\\x00p\\x00_\\x00i\\x00d\\x00=\\x00P\\x00
\\x00 \\x00
\\x001\\x000\\x009\\x009\\x009\\x009\\x00;\\x00A\\x00M\\x00G\\x00t\\x00_\\x00i\\x00d\\x00=\\x00T\\x00
\\x00 \\x002\\x005\\x002\\x002\\x008\\x002\\x001\\x00\\x00\\x00")
2020/07/26 14:39:02 [crossfade:4] Before: ("composer", "Noa")
2020/07/26 14:39:02 [crossfade:4] Before: ("album", "Noa")
2020/07/26 14:39:02 [crossfade:4] Before: ("date", "1994")
2020/07/26 14:39:02 [crossfade:4] Before: ("track", "09")
2020/07/26 14:39:02 [crossfade:4] Before: ("encoded_by", "www.kapariki.ru")
2020/07/26 14:39:02 [crossfade:4] Before: ("kind",
"{audio=2;video=0;midi=0}")
2020/07/26 14:39:02 [crossfade:4] Before: ("artist", "Noa")
2020/07/26 14:39:02 [crossfade:4] Before: ("decoder", "FFMPEG")
2020/07/26 14:39:02 [crossfade:4] Before: ("liq_cross_duration", "9.490")
2020/07/26 14:39:02 [crossfade:4] Before:
("id3v2_priv.wm/wmcollectiongroupid", "<,JRb6\\xc1I\\xaa\\xd8\\x94\\xa5@
\\xa7\\x99\\xc6")
2020/07/26 14:39:02 [crossfade:4] Before: ("title", "It's Obvious")
2020/07/26 14:39:02 [crossfade:4] Before: ("liq_cue_in", "3.000")
2020/07/26 14:39:02 [crossfade:4] Before: ("filename",
"/home/john/src/radio/mez7/09. It's
Obvious.ecfda32a501a3363fe9e9e6eabdede64.mka")
2020/07/26 14:39:02 [crossfade:4] Before:
("id3v2_priv.wm/mediaclassprimaryid",
"\\xbc}`\\xd1#\\xe3\\xe2K\\x86\\xa1H\\xa4*(D\\x1e")
2020/07/26 14:39:02 [crossfade:4] Before: ("publisher", "Geffen")
2020/07/26 14:39:02 [crossfade:4] Before: ("temporary", "false")
2020/07/26 14:39:02 [crossfade:4] Before: ("source",
"bc2-30MAY2020-processed(dot)m3u8")
2020/07/26 14:39:02 [crossfade:4] Before: ("initial_uri",
"annotate:liq_cue_in=\"3.000\",liq_cross_duration=\"9.490\",duration=\"175.690\",liq_amplify=\"-6.200dB\":/home/john/src/radio/mez7/09.
It's Obvious.ecfda32a501a3363fe9e9e6eabdede64.mka")
2020/07/26 14:39:02 [crossfade:4] Before: ("id3v2_priv.wm/provider",
"A\\x00M\\x00G\\x00\\x00\\x00")
2020/07/26 14:39:02 [crossfade:4] Before: ("copyright", "www.kapariki.ru")
2020/07/26 14:39:02 [crossfade:4] Before:
("id3v2_priv.wm/mediaclasssecondaryid",
"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00")
2020/07/26 14:39:02 [crossfade:4] Before: ("playlist_length", "16")
2020/07/26 14:39:02 [crossfade:4] Before: ("encoder", "Lavf58.43.100")
2020/07/26 14:39:02 [crossfade:4] Before: ("status", "playing")
2020/07/26 14:39:02 [crossfade:4] Before: ("id3v2_priv.wm/wmcollectionid",
"<,JRb6\\xc1I\\xaa\\xd8\\x94\\xa5@\\xa7\\x99\\xc6")
2020/07/26 14:39:02 [crossfade:4] Before: ("on_air", "2020/07/26 14:36:20")
2020/07/26 14:39:02 [crossfade:4] Before: ("id3v2_priv.wm/wmcontentid",
"\\xf47\\xb3\"o\\xb4\\x8fB\\x9c\\x5c\\xbf\\x9aq\\xd9\\x1fb")
2020/07/26 14:39:02 [crossfade:4] Before: ("rid", "1")
2020/07/26 14:39:02 [crossfade:4] Before: ("genre", "Folk")
2020/07/26 14:39:02 [crossfade:4] Before: ("comment", "www.kapariki.ru")
2020/07/26 14:39:02 [crossfade:4] Before: ("duration", "175.690")
2020/07/26 14:39:02 [crossfade:4] Before: ("playlist_position", "4")
2020/07/26 14:39:02 [crossfade:4] Before: ("album_artist", "Noa")
2020/07/26 14:39:02 [crossfade:4] Before: ("liq_amplify", "-6.200dB")
2020/07/26 14:39:02 [crossfade:4] After : ("album", "Plays The George
Gershwin Song Book (1952-1959)")
2020/07/26 14:39:02 [crossfade:4] After : ("track", "06")
2020/07/26 14:39:02 [crossfade:4] After : ("kind",
"{audio=2;video=0;midi=0}")
2020/07/26 14:39:02 [crossfade:4] After : ("artist", "Oscar Peterson")
2020/07/26 14:39:02 [crossfade:4] After : ("decoder", "FFMPEG")
2020/07/26 14:39:02 [crossfade:4] After : ("liq_cross_duration", "3.230")
2020/07/26 14:39:02 [crossfade:4] After : ("title", "Oh, Lady, Be Good!")
2020/07/26 14:39:02 [crossfade:4] After : ("liq_cue_in", "3.700")
2020/07/26 14:39:02 [crossfade:4] After : ("filename",
"/home/john/src/radio/mez7/06. Oh, Lady, Be
Good!.f09bb5a1608ce02d1b93ae33a51e4fcb.mka")
2020/07/26 14:39:02 [crossfade:4] After : ("temporary", "false")
2020/07/26 14:39:02 [crossfade:4] After : ("source",
"bc2-30MAY2020-processed(dot)m3u8")
2020/07/26 14:39:02 [crossfade:4] After : ("initial_uri",
"annotate:liq_cue_in=\"3.700\",liq_cross_duration=\"3.230\",duration=\"182.430\",liq_amplify=\"-3.000dB\":/home/john/src/radio/mez7/06.
Oh, Lady, Be Good!.f09bb5a1608ce02d1b93ae33a51e4fcb.mka")
2020/07/26 14:39:02 [crossfade:4] After : ("playlist_length", "16")
2020/07/26 14:39:02 [crossfade:4] After : ("encoder", "Lavf58.43.100")
2020/07/26 14:39:02 [crossfade:4] After : ("status", "playing")
2020/07/26 14:39:02 [crossfade:4] After : ("on_air", "2020/07/26 14:39:01")
2020/07/26 14:39:02 [crossfade:4] After : ("rid", "2")
2020/07/26 14:39:02 [crossfade:4] After : ("comment", "
http://elbarberoloco.blogspot.com.ar/")
2020/07/26 14:39:02 [crossfade:4] After : ("genre", "Jazz")
2020/07/26 14:39:02 [crossfade:4] After : ("duration", "182.430")
2020/07/26 14:39:02 [crossfade:4] After : ("playlist_position", "5")
2020/07/26 14:39:02 [crossfade:4] After : ("album_artist", "Oscar Peterson")
2020/07/26 14:39:02 [crossfade:4] After : ("liq_amplify", "-3.000dB")
2020/07/26 14:39:02 [crossfade:3] Simple transition: crossed, fade-in,
fade-out.
2020/07/26 14:39:02 [source:4] Source add_12575 gets up.
2020/07/26 14:39:02 [add_12575:4] Content kind is {audio=2;video=0;midi=0}.
2020/07/26 14:39:02 [source:4] Source fade(dot)in gets up.
2020/07/26 14:39:02 [fade(dot)in:4] Content kind is
{audio=2;video=0;midi=0}.
2020/07/26 14:39:02 [source:4] Source on_track_12573 gets up.
2020/07/26 14:39:02 [on_track_12573:4] Content kind is
{audio=2;video=0;midi=0}.
2020/07/26 14:39:02 [source:4] Source on_metadata_12572 gets up.
2020/07/26 14:39:02 [on_metadata_12572:4] Content kind is
{audio=2;video=0;midi=0}.
2020/07/26 14:39:02 [source:4] Source cross_11573_after gets up.
2020/07/26 14:39:02 [cross_11573_after:4] Content kind is
{audio=2;video=0;midi=0}.
2020/07/26 14:39:02 [source:4] Source buffer_12448 gets up.
2020/07/26 14:39:02 [buffer_12448:4] Content kind is
{audio=2;video=0;midi=0}.
2020/07/26 14:39:02 [buffer_12448:4] Activations changed:
static=[cross_11573_after:on_metadata_12572:on_track_12573:fade(dot)in:add_12575:cross_11573],
dynamic=[].
2020/07/26 14:39:02 [cross_11573_after:4] Activations changed:
static=[on_metadata_12572:on_track_12573:fade(dot)in:add_12575:cross_11573],
dynamic=[].
2020/07/26 14:39:02 [on_metadata_12572:4] Activations changed:
static=[on_track_12573:fade(dot)in:add_12575:cross_11573], dynamic=[].
2020/07/26 14:39:02 [on_track_12573:4] Activations changed:
static=[fade(dot)in:add_12575:cross_11573], dynamic=[].
2020/07/26 14:39:02 [fade(dot)in:4] Activations changed:
static=[add_12575:cross_11573], dynamic=[].
2020/07/26 14:39:02 [source:4] Source fade(dot)out gets up.
2020/07/26 14:39:02 [fade(dot)out:4] Content kind is
{audio=2;video=0;midi=0}.
2020/07/26 14:39:02 [source:4] Source on_track_12570 gets up.
2020/07/26 14:39:02 [on_track_12570:4] Content kind is
{audio=2;video=0;midi=0}.
2020/07/26 14:39:02 [source:4] Source on_end_12569 gets up.
2020/07/26 14:39:02 [on_end_12569:4] Content kind is
{audio=2;video=0;midi=0}.
2020/07/26 14:39:02 [source:4] Source on_metadata_12568 gets up.
2020/07/26 14:39:02 [on_metadata_12568:4] Content kind is
{audio=2;video=0;midi=0}.
2020/07/26 14:39:02 [source:4] Source cross_11573_before gets up.
2020/07/26 14:39:02 [cross_11573_before:4] Content kind is
{audio=2;video=0;midi=0}.
2020/07/26 14:39:02 [source:4] Source buffer_12446 gets up.
2020/07/26 14:39:02 [buffer_12446:4] Content kind is
{audio=2;video=0;midi=0}.
2020/07/26 14:39:02 [buffer_12446:4] Activations changed:
static=[cross_11573_before:on_metadata_12568:on_end_12569:on_track_12570:fade(dot)out:add_12575:cross_11573],
dynamic=[].
2020/07/26 14:39:02 [cross_11573_before:4] Activations changed:
static=[on_metadata_12568:on_end_12569:on_track_12570:fade(dot)out:add_12575:cross_11573],
dynamic=[].
2020/07/26 14:39:02 [on_metadata_12568:4] Activations changed:
static=[on_end_12569:on_track_12570:fade(dot)out:add_12575:cross_11573],
dynamic=[].
2020/07/26 14:39:02 [on_end_12569:4] Activations changed:
static=[on_track_12570:fade(dot)out:add_12575:cross_11573], dynamic=[].
2020/07/26 14:39:02 [on_track_12570:4] Activations changed:
static=[fade(dot)out:add_12575:cross_11573], dynamic=[].
2020/07/26 14:39:02 [fade(dot)out:4] Activations changed:
static=[add_12575:cross_11573], dynamic=[].
2020/07/26 14:39:02 [add_12575:4] Activations changed: static=[],
dynamic=[cross_11573].
2020/07/26 14:39:02 [add_12575:4] Activations changed: static=[],
dynamic=[cross_11573, cross_11573].
2020/07/26 14:39:02 [cross_11573_after:4] Fading in..
2020/07/26 14:39:11 [buffer_12446:4] End of track.
2020/07/26 14:39:11 [buffer_12446:4] Buffer emptied, buffering needed.
2020/07/26 14:39:11 [cross_11573_before:4] Fading out with 0.0s remaining..
2020/07/26 14:39:11 [buffer_12448:4] End of track.
2020/07/26 14:39:11 [buffer_12448:4] Buffer emptied, buffering needed.
2020/07/26 14:39:11 [add_12575:4] Activations changed: static=[],
dynamic=[cross_11573].
2020/07/26 14:39:11 [cross_11573:4] Buffering end of track...
2020/07/26 14:39:11 [cross_11573:4] More buffering will be needed.
2020/07/26 14:41:55 [decoder:4] Decoding "/home/john/src/radio/mez7/06. Oh,
Lady, Be Good!.f09bb5a1608ce02d1b93ae33a51e4fcb.mka" ended:
Ffmpeg_decoder.End_of_file.
2020/07/26 14:41:56 [bc2-30MAY2020-processed(dot)m3u8:4] Finished with
"/home/john/src/radio/mez7/06. Oh, Lady, Be
Good!.f09bb5a1608ce02d1b93ae33a51e4fcb.mka".
2020/07/26 14:41:56 [amplify_11566:4] End of the current overriding.
2020/07/26 14:41:56 [bc2-30MAY2020-processed(dot)m3u8:4] Remaining: 0.0s,
queued: 140.2s, taking: 140.2s
2020/07/26 14:41:56 [bc2-30MAY2020-processed(dot)m3u8:3] Prepared
"/home/john/src/radio/mez7/09. Let's Call The Whole Thing
Off.931848863c8bf1dd8e3a37f12e94a453.mka" (RID 3).
2020/07/26 14:41:56 [cue_cut_11561:3] Cueing in..
|
Just a thought: is it possible that any timing of cueing-in is being done
by FFmpeg? And, therefore, if I force a different decoder, other things may
happen?
I'm not entirely sure of Liquidsoap's signal flow, myself
With best wishes,
John
|
Fixed in 4349470, changes backported to |
Really good of you to put this together so soon. I'm testing now.
Immediately, the tracks that were my concern are now so much closer
together I can't accurately hear where the cue_in takes place, so I'l going
to fiddle with the cross duration. There are only eight tracks in the
playlist so it's not much trouble.
with best wishes,
John
|
Yeah, thanks for reporting, I'm happy we caught this one. |
On Sun, Jul 26, 2020 at 7:49 PM Romain Beauxis ***@***.***> wrote:
Yeah, thanks for reporting, I'm happy we caught this one.
I'm sorry to be the bearer of less than idea news but the problem is still
the same. Same timings, etc.
Going back to version 1.4.0 (with the same ocaml libraries/modules) the
problem still exists (I''ve forgotten how to compile earlier versions --
something is missing in the m4 directory).
I wonder if something odd has happened with the ocaml libraries/modules
along the way?
If you have any time to look further at this, into Google Drive, I've put a
simplified case: three-track playlist, liq script, and the audio files
themselves.
https://drive.google.com/drive/folders/1zX1AJRsQqAwSPey3oaxKCWvQP91r78k0?usp=sharing
(The output lines you will naturally want to change for your own system —
the playlist allows long tails so, if you restore crossfading, you'll still
hear the odd starts.)
I have reduced my playlist to three tracks which I have tested in an editor
and believe are annotated correctly, and reduced the script to the least
that's needed to ensure FFmpeg does the decoding, and removed crossfading,
level amplification, etc.
With cue_cut in place, the cues are wrong, with the same timing as before
(roughly 1.4s too much cut from the front of each track).
With cue_cut taken out, the full tracks play, with the proper duration of
silence at the front.
I have timed the silence on playback from the stream, and found the same
timings: the track is started substantially later than the cue_cut
indication requests.
This is truly baffling me — but I know there'll be a solution in there
somewhere. If you find there isn't a problem with your own systems then, of
course, I'll look further, here.
I hope this might be of some help to you, and the development of
liquidsoap. Please let me know if I can be of any further assistance.
with best wishes,
John
|
Thanks for double checking and for the example, this will be greatly useful. I'll give this another pass shortly. |
I found out your issue. First, a little technical context, based on https://stackoverflow.com/questions/31854406/precise-seeking-with-ffmpeg/31856130#31856130:
What this means is that, if you ask ffmpeg to seek to a given timestamp, it will reach to the closest frame to that time stamp. Each format and encapsulation container can result in different frame size, leading to imprecise seek. Indeed, if I remux your files in a I have to think about what to do. There is a programatic solution to your problem, but I have to wonder how complex it is to implement for us. Meanwhile, I'd suggest remuxing your files on the fly using protocols. I'm happy to explain how to do so. |
First, thank you for your detailed and informative note this morning.
I only re-wrap files to add metadata and check that the stream can be
successfully parsed from beginning to end. It's no trouble to re-wrap as
.m4a.
But, as you have diagnosed the problem at a deeper level (looking at the
code), I can't wait to try it! Been busy with another station today, but am
going to compile this soon.
with best wishes,
John
…On Tue, Jul 28, 2020 at 4:11 PM Romain Beauxis ***@***.***> wrote:
Closed #1291 <#1291>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1291 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACE3E437K7GYW74WKGEILXTR53TCFANCNFSM4PBSU3FA>
.
|
Cool! Please note that you will need to use |
On Tue, Jul 28, 2020 at 5:36 PM Romain Beauxis ***@***.***> wrote:
Cool! Please note that you will need to use ocaml-ffmpeg on branch v0.4.3,
which will be released with this release
Thanks -- good of you to tell me. No problem, saw that in the commit notes,
pulling it from github.
with best wishes,
JW
|
Certainly, the test case has no audible problems, compared to the earlier missed timings. I'm running the full playlist to see what happens. I've so far heard no clipped introductions. Whilst I would have been happy to rewrap into a format where there are smaller frames, this is a most generous solution (seriously, most people would just edit the audio, cutting off the front) but it means I'm able to run a music stream with one less codec to cascade through — and fully automated track start/end detection. Thank you once more. |
Yeah, radio automation is all we strive for! Happy to have fixed this one, hoping to release the final |
Confirming: so far, having listened to the output for several dozen hours while writing news, I've noticed no cut-off track beginnings. Thank you for sorting this. Will be delighted to test 2.0 when you believe it's ready. |
Awesome super happy to hear that. 2.0 should come some time soon :-) |
Thank you for reading this.
Tracks in my m3u8 playlist using the "annotate" protocol and liq_cue_in seem to cue in too far when liq_cue_in is quite lengthy e.g. more than 1.0 seconds.
The system has been very stable for a long time. Running 1.4.3 pre-release has this trouble, though.
For tracks with very short, or zero, values of liq_cue_in, there isn't a problem.
FFmpeg is being used, I believe in all cases, to decode the files. They are of different codecs e.g. one exhibiting this problem is an MP3, another is an AAC file. All are encapsulated in Matroska.
Would you like some example files and an m3u8 playlist to trigger the problem?
The text was updated successfully, but these errors were encountered: