FAQ  •  Register  •  Login

Panasonic x30 profile coding

<<

loose.stones

Serviio newbie

Posts: 2

Joined: Thu Nov 03, 2011 4:59 pm

Post Thu Nov 03, 2011 8:09 pm

Panasonic x30 profile coding

I just purchased a Panasonic TC-L##X30 TV in Canada and to my disappointment discovered the numerous AVI files I have were not supported. I have been playing around with Serviio for the last week with some success. As my experience with transcoding and UPNP/DNLA is non existent, I am hoping you can provide some insight so I know I am heading in the right direction. My X30 manual indicates it supports: SD video v1.3, avchd, mp4|mkv with vcodec h.264 and acodecs mp3|ac3|lpcm, mpeg2ps, mpeg2ts. My desire is to only transcode if absolutely necessary and to reuse compatible codecs where ever possible. The profile I have come up with seems to work, but is quite large. I would appreciate any comments that could make on the profile and the following questions:

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>
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Nov 04, 2011 10:57 am

Re: Panasonic x30 profile coding

1) Is there a specifically good tutorial related to the profile building in Serviio?

No, only info is here: http://www.serviio.org/index.php?option ... icle&id=24

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.

Not ATM.

[
b]3)[/b] 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?

Not ATM.

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?

AVCHD is a camera format, the other one i'm not sure.

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.

Codecs/Containers are limited by what Serviio and FFmpeg can do. Combinations are defined by DLNA spec, but basically you can wrap mpeg2/4/h264 in mpegts, wmv/vc1 in asf and mpeg2 in mpegps.

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?

The file is saved during playback, you can grab it after you finish playing from the transcoding folder (.stf, rename to .mpg)

Below is the profile for the Panasonic X30 TV I have built.

There seems to be a lot of lines that will never be matched / include combinations that are not possible. If I were you I'd start with a simple profile, or even the Generic one and add lines to it as you find a file you cannot play natively.
<<

loose.stones

Serviio newbie

Posts: 2

Joined: Thu Nov 03, 2011 4:59 pm

Post Sat Nov 05, 2011 5:24 pm

Re: Panasonic x30 profile coding

Thanks for getting back to me so quickly. I guess I got caught being lazy .. I should have researched codec compatibility first and then yanked the incompatible ones before posting. Maybe it is my OCD or the years I have spent coding Telco switches to avoid hacking, but I like to start with something that covers all the possible combinations (or at least the ones I can find), then yank the redundant ones. Of course to effectively do this a person needs to fully understand what they are doing and I am far from this point. I hope this journey to build a working profile will be my teacher.

Your responses have given me two other questions. With reference to your response in question 5:
"Codecs/Containers are limited by what Serviio and FFmpeg can do. Combinations are defined by DLNA spec, but basically you can wrap
    <mpeg2/4/h264 in mpegts,
    wmv/vc1 in asf and
    mpeg2 in mpegps."


1A) I was looking at the wiki page http://en.wikipedia.org/wiki/Comparison_of_container_formats and it indicates that mpegps supports the h264 video codec. If my Interpretation of this wiki page is correct, is it the DLNA spec that prevents the wrapping of h264 into mpegps?

2A) I also noticed on the same wiki page the table shows mpegps supporting MPEG4 Part2 but mpegts shows it supports MPEG4 ASP. From what I read ASP is a profile within Part2. From your understanding of codecs does this mean mpegts will only support the mpeg4 ASP profile whereas mpegps would support the entire Part2 spec including the ASP profile ... or is this a wiki wonki problem?

Thanks again
Bruce
<<

drduck

Serviio newbie

Posts: 2

Joined: Sun Nov 06, 2011 9:24 pm

Post Sun Nov 06, 2011 9:52 pm

Re: Panasonic x30 profile coding

Hi Zip

I've searched the forum but I can't find an answer. I'm trying to play a movie file on my Panasonic G20 Viera TV using Serviio installed on a QNAP 119 II (2.0 GHz 512MB). Serviio runs great (much better than the bundled DLNA server). However, I have a load of home videos shot with a Sony Cybershot P120 camera. The ffmpeg info for a file is shown below but the file won't play. Is this something to do with ffmpeg and the dts/pts error? I've tried adding a new line in the profiles.xml file (e.g. <Matches container="mpeg" vCodec="mpeg1video" aCodec="mp2" />) but this results in "File not supported". Am I doing something wrong of is this file type unplayable?

thanks for your help.


[/] # ffmpeg -i ./share/HDA_DATA/Multimedia/Movies/HomeMovies/MOV09418.MPG
FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/opt/cross-project/arm/marvell/arm-none-linux-gnueabi/libc/marvell-f/usr --enable-cross-compile --cross-prefix=arm-none-linux-gnueabi- --disable-static --enable-shared --arch=arm --disable-optimizations
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
built on Sep 16 2011 00:57:14, gcc: 4.2.1
[mpeg @ 0x30360]invalid dts/pts combination
Last message repeated 87 times
Input #0, mpeg, from './share/HDA_DATA/Multimedia/Movies/HomeMovies/MOV09418.MPG':
Duration: 00:00:23.06, start: 0.070000, bitrate: 10464 kb/s
Stream #0.0[0x1c0]: Audio: mp2, 32000 Hz, mono, s16, 64 kb/s
Stream #0.1[0x1e0]: Video: mpeg1video, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 104857 kb/s, 30 tbr, 90k tbn, 30 tbc
At least one output file must be specified
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Mon Nov 07, 2011 7:56 am

Re: Panasonic x30 profile coding

Do you try with
<Matches container="mpeg" vCodec="mpeg1" aCodec="mp2" /> (in the last <video> element of Pana profile)
Don't forget to restart serviio services!
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

drduck

Serviio newbie

Posts: 2

Joined: Sun Nov 06, 2011 9:24 pm

Post Tue Nov 08, 2011 10:31 pm

Re: Panasonic x30 profile coding

Thank you for your help. I put:

<Matches container="mpeg" vCodec="mpeg1video" aCodec="mp2" />

in the unsupported codecs /Video section and I can finally read the files. Playback stutters a lot and ffmpeg maxes out my 2.0GHz Marvell processor. I assume that Serviio will build up a transcoded library offline eventually to help with this.

Return to Panasonic

Who is online

Users browsing this forum: No registered users and 2 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.