FAQ  •  Register  •  Login

Profile Building

<<

Sparky

Streaming enthusiast

Posts: 24

Joined: Sun Apr 12, 2015 8:05 am

Post Thu Apr 16, 2015 2:16 pm

Profile Building

I have an HTC phone, Android 4.4.2. Using the Generic DLNA profile it doesn't show any video files in the gallery, even those I know will play when copied onto the phone itself. Using any of the Samsung Profiles, the Toshiba Regza 2012 - or the Xbox 360 profile it will show and allow me to play videos that I know work on the phone [MP4, AVC, AAC].

I turned on transcoding in an attempt to play an Xvid [AC3] and only the Xbox 360 profile would do anything helpful. The others resulted in an error saying that the file could not be played but the Xbox 360 profile did at least render the video, without sound.

I tried editing the Xbox 360 profile which made no difference whatsoever, but how could I be sure that my edits were processed...? So I took a copy of the profile code for the Xbox 360 and edited it. Changed the ID, Name and various parameters to hopefully have the transcoding produce something that would play on the phone, I was aiming for MP4, h264, MP3. I added the code as the last profile in profiles.xml [ie above the last "</Profiles>"], stopped and started the server and didn't see my new profile in place. :(

[Edit] I stopped and started the server in the console, not via services.msc, when I used services.msc the server just stopped again, so I know I must have made a programming error [/Edit]

I'm nothing even close to an XML programmer, nor am I that clued up about the video transcoding world [you can tell I'm sure] so I suspect I did something stupid. The code is below for you to "enjoy".

  Code:
   <Profile id="HTC" name="HTC" extendsProfileId="1">
      <ResourceTransportProtocolHandler>org.serviio.upnp.protocol.http.transport.XBox360ProtocolHandler</ResourceTransportProtocolHandler>
      <ProtocolInfo>simple</ProtocolInfo>
      <Detection>
         <UPnPSearch>
            <ModelName>HTC</ModelName>
         </UPnPSearch>   
      </Detection>
      <DeviceDescription>
         <FriendlyName>Serviio ({computerName}): 2</FriendlyName>
         <ModelName>Windows Media Player Sharing</ModelName>
         <ModelNumber>12.0</ModelNumber>
      </DeviceDescription>
      <ContentDirectoryDefinitionFilter>org.serviio.upnp.service.contentdirectory.definition.XBox360ContentDirectoryDefinitionFilter</ContentDirectoryDefinitionFilter>
      <MediaFormatProfiles>
         <MediaFormatProfile mime-type="video/avi">AVI</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/x-ms-wmv">VC1_ASF_AP_L1_WMA</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/x-ms-wmv">VC1_ASF_AP_L2_WMA</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/x-ms-wmv">VC1_ASF_AP_L3_WMA</MediaFormatProfile>
      </MediaFormatProfiles>
      <Transcoding>
         <Video targetContainer="mp4" targetVCodec="h264" targetACodec="mp3" maxVBitrate="15360" forceStereo="true">
            <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" />
            <Matches container="asf" vCodec="wmv2" aCodec="wmav2" />
         </Video>
         <Audio targetContainer="mp3">
            <Matches container="flac" />
            <Matches container="ogg" />
            <Matches container="adts" />
            <Matches container="mp4" /> <!-- iTunes store m4a files need to be transcoded to play -->
            <Matches container="mp2" />
            <Matches container="wavpack" />
            <Matches container="mpc" />
               <Matches container="ape" />
         </Audio>
      </Transcoding>
      <OnlineTranscoding keepStreamOpen="false">
         <Video targetContainer="mp4" targetVCodec="h264" targetACodec="mp3" maxVBitrate="15360" forceStereo="true">
            <Matches container="*"/>
         </Video>
      </OnlineTranscoding>
      <HardSubsTranscoding>
         <Video targetContainer="mp4" targetVCodec="h264" targetACodec="mp3" maxVBitrate="15360" forceStereo="true"/>
      </HardSubsTranscoding>
      <LimitImageResolution>false</LimitImageResolution>
      <ThumbnailsResolution>HD</ThumbnailsResolution>
   </Profile>


If someone could help me with the profile to get the transcoding to work that would be great, and also to tell me how to correctly add a new profile into the list.

Thanks in advance.
Windows 10 Pro 64-bit, Asus Sabertooth P67, Core i7-2600 3.4GHz, 16Gb DDR3-14900, Nvidia GeForce 8800GT 512Mb, HL-DT-ST GH22LS50, System: Intel SSD 520 Series 240Gb, VM: Intel SSD 330 Series 240Gb, Data: Seagate Barracuda ST31500341AS 1500GB 32Mb Cache, DLNA: Hitachi Deskstar P7K500 320GB 16Mb Cache

Samsung UE48H6400, Sony BDP-S490, PlayStation 3, Xbox 360, Xbox One.
<<

Sparky

Streaming enthusiast

Posts: 24

Joined: Sun Apr 12, 2015 8:05 am

Post Fri Apr 17, 2015 7:16 am

Re: Profile Building

The log shows "Value 'mp4' is not facet-valid with respect to enumeration '[asf, mpegvideo, mpeg, mpegts, m2ts, flv, applehttp]'. It must be a value from the enumeration." but give no clue as to what line generated that error, nor can I work out where that list is or why it's being checked against.

Looking at the other profiles they all seem to transcode to an mpeg based container. Could I be asking Serviio to transcode to a container it doesn't like..?
Windows 10 Pro 64-bit, Asus Sabertooth P67, Core i7-2600 3.4GHz, 16Gb DDR3-14900, Nvidia GeForce 8800GT 512Mb, HL-DT-ST GH22LS50, System: Intel SSD 520 Series 240Gb, VM: Intel SSD 330 Series 240Gb, Data: Seagate Barracuda ST31500341AS 1500GB 32Mb Cache, DLNA: Hitachi Deskstar P7K500 320GB 16Mb Cache

Samsung UE48H6400, Sony BDP-S490, PlayStation 3, Xbox 360, Xbox One.
<<

atc98092

User avatar

DLNA master

Posts: 5432

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Fri Apr 17, 2015 12:54 pm

Re: Profile Building

To my understanding, you cannot transcode to MP4 on the fly. So your error is the line with targetContainer="mp4". I'm not familiar with Android, so I'm not sure which container will work.

As you can see, you only have these options: asf, mpegvideo, mpeg, mpegts, m2ts, flv or applehttp. My first guess would be mpeg or m2ts. But that's all it is. ;)
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: AMD Ryzen 5 5600GT, 32 gig ram, Windows 11 Pro, 22 TB hard drive space | Test server: Intel i5-6400, 16 gig ram, Windows 10 Pro

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

Sparky

Streaming enthusiast

Posts: 24

Joined: Sun Apr 12, 2015 8:05 am

Post Fri Apr 17, 2015 9:37 pm

Re: Profile Building

The HTC comes with very limited codec support.

From the web site ->

Video playback: 3gp, .3g2, .mp4, .wmv (Windows Media Video 9), .avi (MP4 ASP and MP3)
Audio playback: aac, .amr, .ogg, .m4a, .mid, .mp3, .wav, .wma (Windows Media Audio 9)

So it looks like I won't be able to transcode on-the-fly to the HTC.

Shame, I'll have to stick with the "Tosh Regza 2012-" profile and manually transcode things that are to be played back. No idea why the "Generic DLNA profile" didn't show any video files on the HTC, as that would be the most sensible profile option, but it didn't.
Windows 10 Pro 64-bit, Asus Sabertooth P67, Core i7-2600 3.4GHz, 16Gb DDR3-14900, Nvidia GeForce 8800GT 512Mb, HL-DT-ST GH22LS50, System: Intel SSD 520 Series 240Gb, VM: Intel SSD 330 Series 240Gb, Data: Seagate Barracuda ST31500341AS 1500GB 32Mb Cache, DLNA: Hitachi Deskstar P7K500 320GB 16Mb Cache

Samsung UE48H6400, Sony BDP-S490, PlayStation 3, Xbox 360, Xbox One.
<<

jart352015yup

Streaming enthusiast

Posts: 35

Joined: Fri Apr 03, 2015 12:49 am

Post Tue Jun 02, 2015 7:21 am

Re: Profile Building

yeah working on that issue myself ....

as for the generic DLNA profile.... it will not use transcoding ...

a specific profile must be selected for transcoding to work.

i think i can get transcoding to work maybe, but serviio on my pc will have to transcode the whole movie first then it will stream it to my tablet ( testing it now )

not sure if there is a way for the stream to start playing while serviio is transcoding the rest. ideas anyone.??

cheers....

will post again if the transcode worked or not.
<<

jart352015yup

Streaming enthusiast

Posts: 35

Joined: Fri Apr 03, 2015 12:49 am

Post Tue Jun 02, 2015 8:30 am

Re: Profile Building

ok update..............


I got it working for my phones and tablet.

using the BubbleUPnP UPnP/DLNA app from google play.. the free one

also downloaded MX Player app from the play store.... i use that as my third party app player... ( it is recommended )

here is the profile i created for my android devices.


<Profile id="Android" name="ServiioAndroid" extendsProfileId="1" >
<Detection>
<HttpHeaders>
<User-Agent>.*ANDROID.*</User-Agent>
</HttpHeaders>
</Detection>

<Transcoding>
<Video targetContainer="mpegts" targetVCodec="h264" maxHeight="720" maxVBitrate="2500" targetACodec="mp3" forceStereo="true" aSamplerate="44100" >
<Matches container="*" />
</Video>
<Audio targetContainer="mp3">
<Matches container="flac" />
<Matches container="ogg" />
<Matches container="lpcm" />
<Matches container="adts" />
<Matches container="asf" />
</Audio>
</Transcoding>

<OnlineTranscoding>
<!-- NOTE: Other rules are inherited from profile 1 -->
<Video targetContainer="mpegts" targetVCodec="h264" maxHeight="720" maxVBitrate="2500" targetACodec="mp3" forceStereo="true" aSamplerate="44100" >
<Matches container="*" />
</Video>
</OnlineTranscoding>
</Profile>

make tweaks as you see fit... i chose the 720p max height to keep the video file size smaller and it is easier to transcode to.


in the BubbleUPnP UPnP/DLNA app left all setting default except video transcoding...

set mobile and wifi to 720p/ 128kbps ( when picking a movie i select MX Player to play the video. ( you could always use another player if you like or you find one that works better )

not sure if on your device the profile will be picked up or not.... you may have to pick the new profile ( ServiioAndroid ) manually ...which can be seen in the serviio console under the status tab

cheers

and post back if all is well or if you tried it

and to note, with this setup the movie plays fine... no issues and is transcoded on the fly for my devices to play just fine. working perfect on my LG g Pad 8.3
will be testing it later on my HTC DNA, and on my Galaxy S4 and on a LG G3 :-)

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 65 guests

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