Page 1 of 1

Transcoding question

PostPosted: Fri Mar 29, 2013 1:33 pm
by Seeman
Hi,

I'm quite new to this forum, to Serviio, but not new to computer stuff at all :-)

My question is a distinct one and I hope you can help me with it.

I have a Denon 1713 AVR running on my network, Serviio is running on my Ubuntu PC. Sharing music and videos over the LAN is working fine. Now I'ld like to configure Serviio to transcode a video (.mp4) file for the Denon receiver to help him playing the audio part only. In case of a concert I've downloaded from Youtube, this may be helpful, because sometimes the visual elements aren#t that important.

I found the config file "profiles.xml" and the description on how to edit the XML to manage it, but this isn't suppose to work. As far as I understand this, the .mp4 should be transcoded into lpcm, as .mp3 is doing either.

  Code:
   <Profile id="22" name="Denon AVR" extendsProfileId="1">
      <Detection>
         <UPnPSearch>
           <FriendlyName>Denon:\[AVR:.*</FriendlyName>
           <Manufacturer>Denon</Manufacturer>
         </UPnPSearch>
      </Detection>
      <Transcoding>
         <Audio targetContainer="lpcm">
            <Matches container="mp3" />
            <Matches container="mp4" />
            <Matches container="ogg" />
         </Audio>
      </Transcoding>
   </Profile>


Do you have any idea what's wrong with this setting? The Denon still refuses to play the video file.

Thanks for your help in advance,

Chris

Re: Transcoding question

PostPosted: Fri Mar 29, 2013 2:22 pm
by slyguy42o
can you do a "ffmpeg -i" on the video your trying to play and post the results please?

You have the right section, but your specifying the video container (mp4) and when converting audio, you need to tell it what kind of audio stream is embedded in the mp4.

Re: Transcoding question

PostPosted: Fri Mar 29, 2013 2:29 pm
by Seeman
slyguy42o wrote:can you do a "ffmpeg -i" on the video your trying to play and post the results please?


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Pink Floyd- Shine On You Crazy Diamond (Subtitulada EspaƱol).mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2012-12-05 05:02:36
Duration: 00:13:22.48, start: 0.000000, bitrate: 2376 kb/s
Stream #0.0(und): Video: h264 (High), yuv420p, 1280x720, 2181 kb/s, 30 fps, 30 tbr, 60 tbn, 60 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 192 kb/s
Metadata:
creation_time : 2012-12-05 05:02:41
At least one output file must be specified

slyguy42o wrote:You have the right section, but your specifying the video container (mp4) and when converting audio, you need to tell it what kind of audio stream is embedded in the mp4.


Ah, I see, thanks!

Re: Transcoding question

PostPosted: Fri Mar 29, 2013 2:36 pm
by slyguy42o
cool, so add AAC to the list and you should be set.

Re: Transcoding question

PostPosted: Fri Mar 29, 2013 3:41 pm
by Seeman
slyguy42o wrote:cool, so add AAC to the list and you should be set.


Unfortunately it does not. First there were no changes in behaviour. I killed the serviio.sh process and restarted it again, but without any success on being the file played. To be sure to completely get rid of the process, I restarted the PC. Now serviio is completely refusing to run. Then I deleted the complete folder and unpacked it again from the tar.gz file, but even with the unchanged profiles.xml the service doesn't run. Well, it is running, but just for half a minute or so. Then it's terminating itself without any message.

I was starting it from the console window after changing the working folder:

  Code:
$ ./serviio.sh


The java process then is gone, too, as expected. Oh, by the way ...

  Code:
$ java -version
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.3) (6b27-1.12.3-0ubuntu1~12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)


Can this be a licence issue? I'm not sure when I started testing serviio, but thought it was just one week ago.

Edit:
  Code:
$ diff profiles-original.xml profiles.xml
1271a1272
>             <Matches container="aac" />

Re: Transcoding question

PostPosted: Fri Mar 29, 2013 4:15 pm
by slyguy42o
what do your logs say?

Re: Transcoding question

PostPosted: Fri Mar 29, 2013 5:26 pm
by Seeman
slyguy42o wrote:what do your logs say?


Great idea, thanks!

java.lang.RuntimeException: org.serviio.profile.ProfilesDefinitionException: Profiles XML file is not valid (according to the schema).


Ok, I restored the original profile.xml and things are running again now. I suppose it's not enough to click "stop server" and "start server" to reload the config file. Good.

Coming back to my original problem, I again edited the xml file and added the tag with the "aac". But this leads to the schema error again:

  Code:
   <Profile id="22" name="Denon AVR" extendsProfileId="1">
      <Detection>
         <UPnPSearch>
           <FriendlyName>Denon:\[AVR:.*</FriendlyName>
           <Manufacturer>Denon</Manufacturer>
         </UPnPSearch>
      </Detection>
      <Transcoding>
         <Audio targetContainer="lpcm">
            <Matches container="aac" />
            <Matches container="mp4" />
            <Matches container="ogg" />
         </Audio>
      </Transcoding>
   </Profile>


So what can I do to tell serviio to extract audio only for the Denon?

Re: Transcoding question

PostPosted: Fri Mar 29, 2013 5:56 pm
by slyguy42o
it seems ok syntax wise. Maybe try removing mp4 and ogg and just have aac in there?

Re: Transcoding question

PostPosted: Fri Mar 29, 2013 6:16 pm
by Illico
Audio Container Matches supported by serviio: http://www.serviio.org/index.php?option ... icle&id=24
container possible values: * (any), mp4, asf, mp3, lpcm, flac, ogg, flv, rtp, rtsp, adts


Suggest to try adts or asf

Zip, I saw too instances of (name.equals("aac")) on your AudioContainer.class code..is it normal ?

Re: Transcoding question

PostPosted: Sat Mar 30, 2013 12:44 am
by slyguy42o
arg! didn't realize that aac wasn't a valid option.. sorry!!!

Re: Transcoding question

PostPosted: Sat Mar 30, 2013 1:47 am
by zip
Illico wrote:
Zip, I saw too instances of (name.equals("aac")) on your AudioContainer.class code..is it normal ?

aac =mp4 (for audio)

Re: Transcoding question

PostPosted: Sat Mar 30, 2013 1:10 pm
by Seeman
Illico wrote:Suggest to try adts or asf


None of them worked.

BTW, I see the video folder beeing displayed as "Videos (not playing") on the Denon AVR, while the folder was named barely "Videos" on the disc. Is there any setting that prohibits playback with an audio-only device?

  Code:
<Transcoding>
   <Audio targetContainer="lpcm">
      <Matches container="adts" />
      <Matches container="mp4" />
      <Matches container="ogg" />
   </Audio>
</Transcoding>

Re: Transcoding question

PostPosted: Sun Mar 31, 2013 10:46 am
by zip
You can't transcode video to audio only.

Re: Transcoding question

PostPosted: Sun Mar 31, 2013 11:07 am
by Seeman
zip wrote:You can't transcode video to audio only.


That explains pretty well, why it doesn't work :-)

Thanks!