Panasonic x30 profile coding
1) Is there a specifically good tutorial related to the profile building in Serviio?
2) Considering the possible number of vcodec/acode combinations in containers mp4/mkv that are not supported by the X30 set, is there a way to create a match on the container/vcodec/acodec combinations that are supported with an action that has Serviio do nothing? If I could strip the 2 supported format out first, I could then apply a general match to the mp4/mkv containers to transcode the remaining streams to mpeg2ps/ts. This would eliminate many lines of match tests.
3) Similarly there are containers that are not supported by the X30, however the existing vcodec (/acodec) is supported in another container. Doing a container swap with at most, transcoding the audio, seems to lessen the CPU cycles. While the number of source containers I have identified in Serviio profiles.xml is not overly extensive, having the ability to glob all containers and/or vcodecs and/or acodes together in a single test would reduce the number of lines in the profile. Is there a way to do this in the current code?
4) I am having some problems identifying the connection between the names of containers/vcodec/acodec to the supported formats "SD video v1.3" and "avchd". Are these supported and if so where could I have located the information that would have clarified this for me?
5) There seems to be a limited number of target containers and codecs that have been used in the various profiles.xml. Is there support for other combinations that have not been used yet? What limits the container codec choice, is it ffdshow or the Serviio code.
6) Has anyone suggested the addition of an option to Serviio that forces a transcoded stream to be saved as a file for future use?
Below is the profile for the Panasonic X30 TV I have built. I started with the existing Viera profile , and ended up removing all of the match tests. Because I have found no way of efficiently managing the containers/codecs the X30 supports (question 2 & 3), I have had to do match tests on a more specific combination basis. This means the resulting profile is much larger than I would have liked and far more difficult to follow. An extra pair of eyes (or a few hundred pairs of eyes) to review the code along with any suggestions would be appreciated.
- Code:
<Profile id="1301" name="Panasonic Viera x30 (MPEG2PS)" extendsProfileId="1">
<ContentDirectoryMessageBuilder>
org.serviio.upnp.service.contentdirectory.PacketVideoDLNAMessageBuilder
</ContentDirectoryMessageBuilder>
<SubtitlesMimeType>
text/srt
</SubtitlesMimeType>
<!-- the following tests will attempt to deal with transcoding so that valid formats are ignored -->
<Transcoding>
<!-- x30 unsupported containers, these can be fixed with a vcodec and acodec swap -->
<Video targetContainer="mpeg">
<Matches container="3gp" vCodec="h264" aCodec="ac3" />
<Matches container="3gp" vCodec="h264" aCodec="lpcm" />
<Matches container="3gp" vCodec="h264" aCodec="mp3" />
<Matches container="3gp" vCodec="mpeg2video" aCodec="ac3" />
<Matches container="3gp" vCodec="mpeg2video" aCodec="lpcm" />
<Matches container="3gp" vCodec="mpeg2video" aCodec="mp3" />
<Matches container="asf" vCodec="h264" aCodec="ac3" />
<Matches container="asf" vCodec="h264" aCodec="lpcm" />
<Matches container="asf" vCodec="h264" aCodec="mp3" />
<Matches container="asf" vCodec="mpeg2video" aCodec="ac3" />
<Matches container="asf" vCodec="mpeg2video" aCodec="lpcm" />
<Matches container="asf" vCodec="mpeg2video" aCodec="mp3" />
<Matches container="avi" vCodec="h264" aCodec="ac3" />
<Matches container="avi" vCodec="h264" aCodec="lpcm" />
<Matches container="avi" vCodec="h264" aCodec="mp3" />
<Matches container="avi" vCodec="mpeg2video" aCodec="ac3" />
<Matches container="avi" vCodec="mpeg2video" aCodec="lpcm" />
<Matches container="avi" vCodec="mpeg2video" aCodec="mp3" />
<Matches container="flv" vCodec="h264" aCodec="ac3" />
<Matches container="flv" vCodec="h264" aCodec="lpcm" />
<Matches container="flv" vCodec="h264" aCodec="mp3" />
<Matches container="flv" vCodec="mpeg2video" aCodec="ac3" />
<Matches container="flv" vCodec="mpeg2video" aCodec="lpcm" />
<Matches container="flv" vCodec="mpeg2video" aCodec="mp3" />
<Matches container="ogg" vCodec="h264" aCodec="ac3" />
<Matches container="ogg" vCodec="h264" aCodec="lpcm" />
<Matches container="ogg" vCodec="h264" aCodec="mp3" />
<Matches container="ogg" vCodec="mpeg2video" aCodec="ac3" />
<Matches container="ogg" vCodec="mpeg2video" aCodec="lpcm" />
<Matches container="ogg" vCodec="mpeg2video" aCodec="mp3" />
<Matches container="mpegvideo" vCodec="h264" aCodec="ac3" />
<Matches container="mpegvideo" vCodec="h264" aCodec="lpcm" />
<Matches container="mpegvideo" vCodec="h264" aCodec="mp3" />
<Matches container="mpegvideo" vCodec="mpeg2video" aCodec="ac3" />
<Matches container="mpegvideo" vCodec="mpeg2video" aCodec="lpcm" />
<Matches container="mpegvideo" vCodec="mpeg2video" aCodec="mp3" />
<Matches container="wtv" vCodec="h264" aCodec="ac3" />
<Matches container="wtv" vCodec="h264" aCodec="lpcm" />
<Matches container="wtv" vCodec="h264" aCodec="mp3" />
<Matches container="wtv" vCodec="mpeg2video" aCodec="ac3" />
<Matches container="wtv" vCodec="mpeg2video" aCodec="lpcm" />
<Matches container="wtv" vCodec="mpeg2video" aCodec="mp3" />
</Video>
<!-- x30 unsupported containers, these can be fixed with a vcodec swap and a new acodec -->
<Video targetContainer="mpeg" targetACodec="ac3" aBitrate="384">
<Matches container="3gp" vCodec="h264" />
<Matches container="3gp" vCodec="mpeg2video" />
<Matches container="asf" vCodec="h264" />
<Matches container="asf" vCodec="mpeg2video" />
<Matches container="avi" vCodec="h264" />
<Matches container="avi" vCodec="mpeg2video" />
<Matches container="flv" vCodec="h264" />
<Matches container="flv" vCodec="mpeg2video" />
<Matches container="ogg" vCodec="h264" />
<Matches container="ogg" vCodec="mpeg2video" />
<Matches container="mpegvideo" vCodec="h264" />
<Matches container="mpegvideo" vCodec="mpeg2video" />
<Matches container="wtv" vCodec="h264" />
<Matches container="wtv" vCodec="mpeg2video" />
</Video>
<!-- x30 unsupported containers, these can be fixed by full transcode -->
<Video targetContainer="mpeg" targetVCodec="mpeg2video" maxVBitrate="17000" targetACodec="ac3" aBitrate="384">
<Matches container="3gp" />
<Matches container="asf" />
<Matches container="avi" />
<Matches container="flv" />
<Matches container="ogg" />
<Matches container="mpegvideo" />
<Matches container="wtv" />
</Video>
<!-- x30 supported containers, these can be fixed with a vcodec swap and a new acodec -->
<Video targetContainer="mpeg" targetACodec="ac3" aBitrate="384">
<Matches container="matroska" vCodec="h264" aCodec="aac" />
<Matches container="matroska" vCodec="h264" aCodec="amrnb" />
<Matches container="matroska" vCodec="h264" aCodec="dca" />
<Matches container="matroska" vCodec="h264" aCodec="flac" />
<Matches container="matroska" vCodec="h264" aCodec="mp2" />
<Matches container="matroska" vCodec="h264" aCodec="truehd" />
<Matches container="matroska" vCodec="h264" aCodec="vorbis" />
<Matches container="matroska" vCodec="h264" aCodec="wmapro" />
<Matches container="matroska" vCodec="h264" aCodec="wmav2" />
<Matches container="mp4" vCodec="h264" aCodec="aac" />
<Matches container="mp4" vCodec="h264" aCodec="amrnb" />
<Matches container="mp4" vCodec="h264" aCodec="dca" />
<Matches container="mp4" vCodec="h264" aCodec="flac" />
<Matches container="mp4" vCodec="h264" aCodec="mp2" />
<Matches container="mp4" vCodec="h264" aCodec="truehd" />
<Matches container="mp4" vCodec="h264" aCodec="vorbis" />
<Matches container="mp4" vCodec="h264" aCodec="wmapro" />
<Matches container="mp4" vCodec="h264" aCodec="wmav2" />
<Matches container="mpeg" vCodec="h264" aCodec="aac" />
<Matches container="mpeg" vCodec="h264" aCodec="amrnb" />
<Matches container="mpeg" vCodec="h264" aCodec="dca" />
<Matches container="mpeg" vCodec="h264" aCodec="flac" />
<Matches container="mpeg" vCodec="h264" aCodec="mp2" />
<Matches container="mpeg" vCodec="h264" aCodec="truehd" />
<Matches container="mpeg" vCodec="h264" aCodec="vorbis" />
<Matches container="mpeg" vCodec="h264" aCodec="wmapro" />
<Matches container="mpeg" vCodec="h264" aCodec="wmav2" />
<Matches container="mpeg" vCodec="mpeg2video" aCodec="aac" />
<Matches container="mpeg" vCodec="mpeg2video" aCodec="amrnb" />
<Matches container="mpeg" vCodec="mpeg2video" aCodec="dca" />
<Matches container="mpeg" vCodec="mpeg2video" aCodec="flac" />
<Matches container="mpeg" vCodec="mpeg2video" aCodec="truehd" />
<Matches container="mpeg" vCodec="mpeg2video" aCodec="vorbis" />
<Matches container="mpeg" vCodec="mpeg2video" aCodec="wmapro" />
<Matches container="mpeg" vCodec="mpeg2video" aCodec="wmav2" />
<Matches container="mpegts" vCodec="h264" aCodec="aac" />
<Matches container="mpegts" vCodec="h264" aCodec="amrnb" />
<Matches container="mpegts" vCodec="h264" aCodec="dca" />
<Matches container="mpegts" vCodec="h264" aCodec="flac" />
<Matches container="mpegts" vCodec="h264" aCodec="mp2" />
<Matches container="mpegts" vCodec="h264" aCodec="truehd" />
<Matches container="mpegts" vCodec="h264" aCodec="vorbis" />
<Matches container="mpegts" vCodec="h264" aCodec="wmapro" />
<Matches container="mpegts" vCodec="h264" aCodec="wmav2" />
<Matches container="mpegts" vCodec="mpeg2video" aCodec="aac" />
<Matches container="mpegts" vCodec="mpeg2video" aCodec="amrnb" />
<Matches container="mpegts" vCodec="mpeg2video" aCodec="dca" />
<Matches container="mpegts" vCodec="mpeg2video" aCodec="flac" />
<Matches container="mpegts" vCodec="mpeg2video" aCodec="truehd" />
<Matches container="mpegts" vCodec="mpeg2video" aCodec="vorbis" />
<Matches container="mpegts" vCodec="mpeg2video" aCodec="wmapro" />
<Matches container="mpegts" vCodec="mpeg2video" aCodec="wmav2" />
</Video>
<!-- x30 supported containers, these can be fixed by changing everything -->
<Video targetContainer="mpeg" targetVCodec="mpeg2video" maxVBitrate="17000" targetACodec="ac3" aBitrate="384">
<Matches container="matroska" vCodec="dvvideo" />
<Matches container="matroska" vCodec="flv" />
<Matches container="matroska" vCodec="mjpeg" />
<Matches container="matroska" vCodec="mpeg1video" />
<Matches container="matroska" vCodec="mpeg4" />
<Matches container="matroska" vCodec="msmpeg4" />
<Matches container="matroska" vCodec="theora" />
<Matches container="matroska" vCodec="vc1" />
<Matches container="matroska" vCodec="vp6" />
<Matches container="matroska" vCodec="wmv2" />
<Matches container="mp4" vCodec="dvvideo" />
<Matches container="mp4" vCodec="flv" />
<Matches container="mp4" vCodec="mjpeg" />
<Matches container="mp4" vCodec="mpeg1video" />
<Matches container="mp4" vCodec="mpeg4" />
<Matches container="mp4" vCodec="msmpeg4" />
<Matches container="mp4" vCodec="theora" />
<Matches container="mp4" vCodec="vc1" />
<Matches container="mp4" vCodec="vp6" />
<Matches container="mp4" vCodec="wmv2" />
<Matches container="mpeg" vCodec="dvvideo" />
<Matches container="mpeg" vCodec="flv" />
<Matches container="mpeg" vCodec="mjpeg" />
<Matches container="mpeg" vCodec="mpeg1video" />
<Matches container="mpeg" vCodec="mpeg4" />
<Matches container="mpeg" vCodec="msmpeg4" />
<Matches container="mpeg" vCodec="theora" />
<Matches container="mpeg" vCodec="vc1" />
<Matches container="mpeg" vCodec="vp6" />
<Matches container="mpeg" vCodec="wmv2" />
<Matches container="mpegts" vCodec="dvvideo" />
<Matches container="mpegts" vCodec="flv" />
<Matches container="mpegts" vCodec="mjpeg" />
<Matches container="mpegts" vCodec="mpeg1video" />
<Matches container="mpegts" vCodec="mpeg4" />
<Matches container="mpegts" vCodec="msmpeg4" />
<Matches container="mpegts" vCodec="theora" />
<Matches container="mpegts" vCodec="vc1" />
<Matches container="mpegts" vCodec="vp6" />
<Matches container="mpegts" vCodec="wmv2" />
</Video>
<!-- x30 supported container, vcodec, and acodec
the above tests should avoid matching the X30 supported combinations as these
files do not need transcoding. The X30 manual indicates the following support
-- still needs to be tested for
SD video v1.3 - don't know what container/codecs to test for
avchd - don't know what container/codecs to test for
-- tested for
mp4 with vcodec h.264 and acodec mp3, ac3, lpcm
mkv with vcodec h.264 and acodec mp3, ac3, lpcm
mpeg2ps
mpeg2ts
-->
</Transcoding>
</Profile>