Page 1 of 1

Comma separated lists in profiles

PostPosted: Wed Sep 18, 2013 12:59 am
by DenyAll
A thought - would the use of comma separated lists for aCodec make for simpler profiles. For example, when trying to transcode all unsupported audio for a container type:
  Code:
<Matches container="matroska" aCodec="aac" />
<Matches container="matroska" aCodec="ac3" />
<Matches container="matroska" aCodec="mp3" />
<Matches container="matroska" aCodec="mp2" />
<Matches container="matroska" aCodec="lpcm" />
could be simplified to:
  Code:
<Matches container="matroska" aCodec="aac, ac3, mp3, mp2, lpcm" />
I think this makes the profiles simpler and more readable, and easier to include other audio types - but I understand it adds overhead to the code that parses the profile (am hoping that as the code already exists for say the vFourCC attribute it might be easy to do for these attributes).

I also thought this principle might then also be applied to vCodec and even container level eg. from the XBox profile:
  Code:
<Matches container="matroska" />
<Matches container="mpeg" />
<Matches container="mpegts" />
<Matches container="mpegvideo" />
<Matches container="avi" vCodec="h264" />
<Matches container="avi" vCodec="msmpeg4" />
<Matches container="avi" vCodec="wmv2" />
<Matches container="avi" vCodec="dvvideo" />
<Matches container="mp4" vCodec="dvvideo" />
<Matches container="wtv" />
<Matches container="ogg" />
<Matches container="3gp" />
<Matches container="flv" /> 
<Matches container="rm" />
could simplify to:
  Code:
<Matches container="matroska, mpeg, mpegts, mpegvideo, wtv, ogg, 3gp, flv, rm" />
<Matches container="avi" vCodec="h264, msmpeg4, wmv2, dvvideo" />
<Matches container="mp4" vCodec="dvvideo" />
My concern with doing this for all three attributes though is you could end up with something like:
  Code:
<Matches container="matroska, mpeg, mpegts, mpegvideo, wtv, ogg, 3gp, flv, rm" vCodec="h264, msmpeg4, wmv2, dvvideo" aCodec="aac, ac3, mp3, mp2, lpcm"/>
which isn't readable at all (however I think even if allowed, this can be still be avoided by convention ie. by convention you only use comma separated lists on the far right attribute when in container, vCodec, aCodec order). This scheme must also be used with caution if other matching attributes are included (eg. if profile, levelgreaterthan, vFourCC, etc are included - you could still combine aCodec's but not vCodec's).

Hope this makes sense - your thoughts? Do you think it adds anything to the readability and understanding of profiles (ps the existing scheme is still supported under this model, so no need to re-write existing profiles unless you want to) or is it too complex and not worth doing (the existing scheme ain't broke...)??

Re: Comma separated lists in profiles

PostPosted: Wed Sep 18, 2013 8:25 am
by zip
It sounds ok, but I'm not sure it's a priority at the moment. You can create a bitbucket ticket, but I'm not sure when I get around to look at it.

Re: Comma separated lists in profiles

PostPosted: Thu Sep 19, 2013 11:44 am
by DenyAll
Thanks - ps. definitely not a priority - the existing system works well. I'll add a bitbucket though and will flag it as low priority (if I can).

<edit>Add: https://bitbucket.org/xnejp03/serviio/i ... dec-vcodec</edit>