Ticket #204 (closed Bugs: worksforme)

Opened 22 months ago

Last modified 20 months ago

Metadata vanish

Reported by: ~ok| Owned by: mrpingouin
Priority: 5 Milestone: 0.9.0
Component: Liquidsoap Version: 0.3.8+svn
Keywords: metadata Cc:
Mac OSX: yes Linux: yes
NetBSD: yes Other Operating System: yes
FreeBSD: yes

Description

Hello, it is almost the same problem as the one described in ticket #189. Metadata are sometimes eaten out, except that they may disappear between different request.dynamic calls.

With the same script (enclosed), metadata are broadcast using the SVN revision number 5946 whereas they disappear with SVN 6184 (I didn't check out interim builds).

Attachments

854465875.liq Download (5.9 KB) - added by ~ok| 22 months ago.
Configuration file

Change History

Changed 22 months ago by ~ok|

Configuration file

Changed 22 months ago by toots

  • milestone set to NEXT RELEASE

Thanks for the report !

Could you test using on_metadata((fun (m) -> print(m))...) at which operator medatada is lost ? This would speed up debugging a lot..

Changed 22 months ago by ~ok|

hello,

Two on_metadata callbacks are already defined in the script:
1) one is used to call the lastfm plugin, which outputs the accurate tags each time,
2) the other one sends one single piece of info back to the external application and it gathers the right data too.

Do you want me to put another on_metadata call after the rewrite_metadata function in the script (i.e. line 174)?

P.S. I use the ${X} formalism in the rewrite_metadata function, instead of manipulating the 'meta' array directly: is it bothering?

cheers

Changed 22 months ago by toots

Hi !

Thanks for the details.

If I read the script correctly, the only two operators on top of your stream are the fallback and mkpop operator (which turns to be compress).

Could you add a on_metadata on top of the fallback and on top of the mkpop on line 223, to check what comes out of these operators ?

Changed 22 months ago by ~ok|

alright. In the meantime I added the logging procedure just after rewrite_metadata and here's the output:

2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("display_title","Complete tracklisting available at XXX") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("album","") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("genre","Italo Disco") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("comment","") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("filename","/home/XXX/radio/resources/pool/1660.mp3") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("file_id","1660") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("status","playing") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("year","2006") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("source","dyn_Global") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("length","368.562") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("type","songs") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("initial_uri","annotate:file_id=\"1660\",display_title=\"Complete tracklisting available at XXX\",display_artist=\"The Archives\",type=\"songs\",canal=\"Global\",length=\"368.562\":/home/XXX/radio/resources/pool/1660.mp3") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("display_artist","The Archives") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("on_air","2008/11/17 00:06:50") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("rid","4") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("track","0") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("artist","The Archives") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("canal","Global") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("temporary","false") 2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("title","Complete tracklisting available at XXX") 2008/11/17 00:06:54 [src_4089:3] Inserting missing metadata. 2008/11/17 00:06:54 [lang:1] Debug metadata for src_4089: ("comment","") 2008/11/17 00:06:54 [lang:1] Debug metadata for src_4089: ("album","") 2008/11/17 00:06:54 [lang:1] Debug metadata for src_4089: ("artist","") 2008/11/17 00:06:54 [lang:1] Debug metadata for src_4089: ("title","")

Changed 22 months ago by ~ok|

2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("display_title","Complete tracklisting available at XXX")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("album","")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("genre","Italo Disco")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("comment","")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("filename","/home/XXX/radio/resources/pool/1660.mp3")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("file_id","1660")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("status","playing")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("year","2006")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("source","dyn_Global")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("length","368.562")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("type","songs")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("initial_uri","annotate:file_id=\"1660\",display_title=\"Complete tracklisting available at XXX\",display_artist=\"The Archives\",type=\"songs\",canal=\"Global\",length=\"368.562\":/home/XXX/radio/resources/pool/1660.mp3")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("display_artist","The Archives")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("on_air","2008/11/17 00:06:50")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("rid","4")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("track","0")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("artist","The Archives")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("canal","Global")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("temporary","false")
2008/11/17 00:06:52 [lang:1] Debug metadata for src_4089: ("title","Complete tracklisting available at XXX")
2008/11/17 00:06:54 [src_4089:3] Inserting missing metadata.
2008/11/17 00:06:54 [lang:1] Debug metadata for src_4089: ("comment","")
2008/11/17 00:06:54 [lang:1] Debug metadata for src_4089: ("album","")
2008/11/17 00:06:54 [lang:1] Debug metadata for src_4089: ("artist","")
2008/11/17 00:06:54 [lang:1] Debug metadata for src_4089: ("title","")

Changed 22 months ago by mrpingouin

  • owner changed from admin to mrpingouin

Thanks for the bug report,

I have simplified the issue. Rather than fallback() and compress(), which seem harmless, I thought the skip_blank(), eat_blank() and smartcross() are much more error prone. So I designed a simple test with these three. In fact, smartcross() seems to be guilty. I can reproduce the bug in seconds now, so I'll fix it within short.

# run with liquidsoap - < this.liq
set("root.sync",false)

source = playlist("~/media/audio/jingle")
source = map_metadata(fun (_) -> [("title","XXX")], source)

# source = skip_blank(source, length=3., threshold=-30.)
# source = eat_blank(threshold=-30., source)
source = smart_crossfade(conservative=true,
                         start_next=1.5,fade_in=0.5,fade_out=1.,
                         source)

source = on_track(fun (m) -> begin
                    log("TITLE ==> #{m['title']}")
                    if m["title"] != "XXX" then
                      log("*** BUG ***")
                      shutdown()
                    end
                  end, source)

output.dummy(mksafe(source))

Just a few words about my minimal bug. First, it's a simple script, in which you can easily turn on/off a feature to see if it's interfering or not. Then, in order to test it faster, I run in without root.sync, and a dummy output: this means that liq decodes and streams (in the void) as fast as possible. These tips are often useful. As I said, I obtain the bug quickly at every run, so I should be able to fix it easily -- probably tonight, no time now.

Changed 22 months ago by ~ok|

ok, thanks to both of you. I'll try your fix as soon as you're able to commit it. cheers.

Changed 22 months ago by mrpingouin

I have progressed on that issue. The explanation would be rather technical, and I haven't polished a fix -- actually I need to make up my mind about several under-specified/broken things that I noticed in that area of the code. But, in case you're curious, you can look at my current patch:

 http://dolebrai.net/~dbaelde/savonet_patches/204-metadata-vanish

Basically, the fixes are in sequence.ml and aFrame.ml, the rest is just debug and extra checks.

Changed 21 months ago by mrpingouin

Have a look at http://savonet.rastageeks.org/changeset/6232, which fixes the minimized bug but (probably) not the initial one.

Changed 20 months ago by toots

Hi !

Any news about this issue ? Are you able to test with a recent SVN or daily package ?

Changed 20 months ago by ~ok|

  • status changed from new to closed
  • resolution set to worksforme

hello, sorry for the very late feedback but since liquidsoap is stable on my end I don't pay a visit to the bug tracking system as frequently as before. Regarding this issue, the ticket should be closed. It appeared to be the result of a scripting issue. Re-arranging the order of the operators fixed this problem, entirely and permanently. No need for the patches enclosed.

Note: See TracTickets for help on using tickets.