Page 1 of 1

Is there a way to stop imem access from overwriting TS service name with "item://"

Posted: 17 Feb 2019 15:04
by oviano
I'm encoding my source using FFmpeg libraries, output format is TS, and as a test I'm setting the service_name meta to "ServiceNameGoesHere" and service_provider to "ServiceProviderGoesHere".

When I look up the corresponding meta data (Title and Publisher) I find Title has been changed to the somewhat useless "imem://". The publisher correctly comes across as "ServiceProviderGoesHere".

Is there a way to avoid this, or do I need to get my hacking gloves on and make changes to libVLC again?

Re: Is there a way to stop imem access from overwriting TS service name with "item://"

Posted: 17 Feb 2019 17:50
by Jean-Baptiste Kempf
If you force --title it does not help?

Re: Is there a way to stop imem access from overwriting TS service name with "item://"

Posted: 17 Feb 2019 19:33
by oviano
I can't see such an option. Did you mean --video-title? Wouldn't that just override it to a specific string?

I want it just to pick up the service_name from the TS data.

Re: Is there a way to stop imem access from overwriting TS service name with "item://"

Posted: 17 Feb 2019 21:05
by Jean-Baptiste Kempf
I don't think this is supported.

Re: Is there a way to stop imem access from overwriting TS service name with "item://"

Posted: 18 Feb 2019 11:57
by oviano
Ok, no problem. I think I saw somewhere in the code it was setting the title meta from the TS stream, so I am guessing imem, file etc later overwrite it. Maybe I will figure out where that happens and disable it for my build.

Thanks.

Re: Is there a way to stop imem access from overwriting TS service name with "item://"

Posted: 23 Feb 2019 07:44
by oviano
If someone could point me towards how/where the title gets set to imem:// that would help, I can't find it.

Re: Is there a way to stop imem access from overwriting TS service name with "item://"

Posted: 07 Mar 2019 13:22
by oviano
I figured out I needed to modify the function EsOutProgramMeta() to propagate the psz_title to the meta too.

So the code looks like this:

Code: Select all

/* */ char **ppsz_all_keys = vlc_meta_CopyExtraNames(p_meta ); info_category_t *p_cat = NULL; if( psz_title || psz_provider || ( ppsz_all_keys[0] && *ppsz_all_keys[0] ) ) { char *psz_cat = EsOutProgramGetMetaName( p_pgrm ); if( psz_cat ) p_cat = info_category_New( psz_cat ); free( psz_cat ); } for( i = 0; ppsz_all_keys[i]; i++ ) { if( p_cat ) info_category_AddInfo( p_cat, vlc_gettext(ppsz_all_keys[i]), "%s", vlc_meta_GetExtra( p_meta, ppsz_all_keys[i] ) ); free( ppsz_all_keys[i] ); } free( ppsz_all_keys ); if( psz_title ) { if( p_sys->p_pgrm == p_pgrm ) { input_item_SetTitle( input_priv(p_input)->p_item, psz_title ); input_SendEventMeta( p_input ); } if( p_cat ) info_category_AddInfo( p_cat, vlc_meta_TypeToLocalizedString(vlc_meta_Title), "%s",psz_title ); } if( psz_provider ) { if( p_sys->p_pgrm == p_pgrm ) { input_item_SetPublisher( input_priv(p_input)->p_item, psz_provider ); input_SendEventMeta( p_input ); } if( p_cat ) info_category_AddInfo( p_cat, vlc_meta_TypeToLocalizedString(vlc_meta_Publisher), "%s",psz_provider ); }
I'm unsure if you would want it to always overwrite the input item title meta with the vlc title meta as above; I'm happy to make a patch for the above if you do.

Re: Is there a way to stop imem access from overwriting TS service name with "item://"

Posted: 10 Mar 2019 11:48
by Jean-Baptiste Kempf
I'm unsure if you would want it to always overwrite the input item title meta with the vlc title meta as above; I'm happy to make a patch for the above if you do.
I think we do.

Re: Is there a way to stop imem access from overwriting TS service name with "item://"

Posted: 11 Mar 2019 19:16
by oviano
Deleted - will send patch to the mailing list.

Re: Is there a way to stop imem access from overwriting TS service name with "item://"

Posted: 12 Mar 2019 13:24
by Jean-Baptiste Kempf
Cool