FAQ  •  Register  •  Login

Allow audio track switching by TV

<<

MarkusW

Serviio newbie

Posts: 9

Joined: Thu Jul 03, 2014 9:09 pm

Post Sat Aug 02, 2014 6:33 pm

Allow audio track switching by TV

Serviio is great, but unfortunately the feature of allowing audio track selection on the TV is still not implemented.

I have realized now, that all that is needed to be changed, is the command "-map 0:1" in the parameter list to ffmpeg (where the 1 stands for the first audio track).
By changing it to "-map 0:a", ALL audio tracks are automatically included, so that one can switch the audio track with the TV!

I suppose, that most modern TVs support this feature. I can only tell, that it works really well on my 2010 Sony TV, which has a rather poor DLNA support in general...

I would really appreciate this feature a lot! I guess, that the "-map 0:a" option should also work for TVs, that dont allow audio track selection. (I suppose they will just use the first audio track - like before).

So, my hope is that this could be really easy and quick to implement. It would maybe be just one letter in the source code.
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Sun Aug 03, 2014 4:24 pm

Re: Allow audio track switching by TV

It's been an open ticket for a long time, but I agree it's the most needed enhancement to Serviio:

I think the reason it hasn't yet been implemented is that it's actually a pretty complex issue. Especially now that subtitle support is thrown into the mix.
viewtopic.php?f=11&t=6688&p=48290#p48290
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

MarkusW

Serviio newbie

Posts: 9

Joined: Thu Jul 03, 2014 9:09 pm

Post Sun Aug 03, 2014 10:46 pm

Re: Allow audio track switching by TV

Thanks for your answer.

But I think, the suggestion I gave isn't complex at all.
The audio track switching works anyway nice for videos, which are not transcoded. I can easily switch the audio track with the remote of my TV.

It just needs to be fixed for the transcoded videos.
At the moment, only the first audio track is included to the transcoded video (because ffmpeg is called with "-map 0:1").
By calling ffmpeg with "-map 0:a", all audio tracks are included, hence one can switch them with the TV remote. At least that works with my Sony 2010 TV ;) and the latest ffmpeg release. This method should also be independent of subtitles.

Of course, later one could implement also a more complex solution, for TVs which dont allow audio track switching.

But for now, this should be a quick solution for many users. And in the end, also the best solution, since one can change the language directly during watching (which I like to do sometimes, eg. rewind and watch a scene again with the original language).

Maybe zip can give some feedback on this. I might also be missing a point, and the issue is more complicated, but I think that the "-map 0:a" option should really do the job and solve this issue.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Aug 07, 2014 7:59 pm

Re: Allow audio track switching by TV

This might be a quick win for you, but we have to take into account:

- that the other tracks are often encoded using different codecs, so this would be useless (if the other codec cannot be played by the TV)
- not all TVs support client-side audio switching
- I might do some 'magic' to show subtitles when the preferred audio is not the user's language - so some logic is required there
- and probably something I forgot
<<

Wixie

Serviio newbie

Posts: 16

Joined: Wed Aug 13, 2014 7:44 pm

Post Thu Aug 14, 2014 1:01 pm

Re: Allow audio track switching by TV

At least it would be nice if you can set serviio to prefer a specific language not always the first one.
<<

thenamelessthing

User avatar

DLNA master

Posts: 126

Joined: Tue Dec 04, 2012 4:45 am

Location: Canada

Post Sat Aug 16, 2014 2:47 pm

Re: Allow audio track switching by TV

please work on this issue !!!! :!:
My Setup : BDT220 Panasonic Bluray player, TC-L55ET5 and TC-L42ET5 Panasonic TV. My home media server run Serviio 1.4.2 Pro under GNU/Linux Ubuntu 14.04 LTS server x64 and the hardware is Amd 1045t Phenom II X6, 6Gb DDR3 1333 mhz on SSD and data on soft raid 5 (3x1tb).
<<

MarkusW

Serviio newbie

Posts: 9

Joined: Thu Jul 03, 2014 9:09 pm

Post Sat Aug 16, 2014 4:14 pm

Re: Allow audio track switching by TV

Wixie wrote:At least it would be nice if you can set serviio to prefer a specific language not always the first one.

I strongly support this request ;) In the simplest version, one should be able to tell serviio: Use audio track No. x (if availible), where x is directly the number of the audio track. This would be one checkbox and a text field in the GUI. In addition, there should be a option to include all audio tracks, as I have already proposed.
This would then help all users quickly and easy.
A more fancy version of this feature can always be added later. But I would prefer to have a quick & dirty solution soon, rather than wait some more years for the fancy solution.
<<

thenamelessthing

User avatar

DLNA master

Posts: 126

Joined: Tue Dec 04, 2012 4:45 am

Location: Canada

Post Sat Aug 16, 2014 4:27 pm

Re: Allow audio track switching by TV

I agree with MarkusW
My Setup : BDT220 Panasonic Bluray player, TC-L55ET5 and TC-L42ET5 Panasonic TV. My home media server run Serviio 1.4.2 Pro under GNU/Linux Ubuntu 14.04 LTS server x64 and the hardware is Amd 1045t Phenom II X6, 6Gb DDR3 1333 mhz on SSD and data on soft raid 5 (3x1tb).
<<

MarkusW

Serviio newbie

Posts: 9

Joined: Thu Jul 03, 2014 9:09 pm

Post Wed Sep 10, 2014 2:30 pm

Re: Allow audio track switching by TV

Hi again, I have finally managed to de-compile the source code, and make the small change myself. (If I have understood it correctly, de-compiling should be okay for personal usage)

ffmpeg is now always called with the "-map 0:a" option.
I have tested that now for two weeks, and it works flawlessly. I can now switch the audio track with the remote of my Sony Bravia TV. Great! :)

Up to now, all files which I have tested have worked, I have not encountered any problems yet.
<<

thenamelessthing

User avatar

DLNA master

Posts: 126

Joined: Tue Dec 04, 2012 4:45 am

Location: Canada

Post Wed Sep 10, 2014 3:05 pm

Re: Allow audio track switching by TV

Wow! Great news! I'm REALLY REALLY REALLY interested by that! Can you give me the step to do the same thing
My Setup : BDT220 Panasonic Bluray player, TC-L55ET5 and TC-L42ET5 Panasonic TV. My home media server run Serviio 1.4.2 Pro under GNU/Linux Ubuntu 14.04 LTS server x64 and the hardware is Amd 1045t Phenom II X6, 6Gb DDR3 1333 mhz on SSD and data on soft raid 5 (3x1tb).
<<

atc98092

User avatar

DLNA master

Posts: 5212

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Wed Sep 10, 2014 10:13 pm

Re: Allow audio track switching by TV

It would be very interesting to see how it might work on my Panasonic TV, which has almost everything transcoded. My Sony players play most native, and I can select audio tracks with ease.

I doubt there's anything in the Roku that would support multiple audio tracks, though. They have a toggle for captions, but of course transcoding removes those tracks from the stream. Might be worth the Roku developers to work this into it somehow, if they knew this was possible. I'm part of their beta group, so can at least bring it up. Of course, this has to be included within the standard Serviio install before they'd likely even consider it.
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: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

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

MarkusW

Serviio newbie

Posts: 9

Joined: Thu Jul 03, 2014 9:09 pm

Post Sun Sep 14, 2014 2:52 pm

Re: Allow audio track switching by TV

Unfortunately, I didn't know anything about de-compiling, so it was mainly a trial-and-error approach ;)
But I hope I can recall the steps somehow:

1. Decompile all .jar files from F:\Programme\Serviio\lib .
I have used jd-gui. There, you can click "Save all sources" to get .zip files with the source code.
2. Unpack those .zip files in a new folder.
3. Setup a project in Eclipse, I think there is an option that eclipse checks the source folder structure, and creates the project automatically.

Then, you can try to recompile it (Project->Build All). I had lots of compilation errors, but the file which is important (org\serviio\external\FFMPEGWrapper.java), was compiled anyhow into bin\org\serviio\external\FFMPEGWrapper.class

Maybe you can check first if this works, before changing something in the source code.

I hope it is ok to post this stuff here.
<<

JohnleouF

Serviio newbie

Posts: 2

Joined: Fri Jun 17, 2016 2:31 pm

Post Fri Jun 17, 2016 2:43 pm

Re: Allow audio track switching by TV

Bonjour,

Je suis français et quelques lacunes pour traduire l'anglais.

Je suis très intéressé par votre méthode de décompilation. J'ai moi même une tv Samsung (UE55C7700) et je ne peux pas changer la langue depuis la telecommande. J'ai quelques films qui sont en anglais en 1ere langue donc coincé.
J'ai bien réussi les étapes 1 et 2 mais je bloque à l’étape 3. J'ai installé le logiciel Eclipse mais je ne comprend pas comment créer un projet. Quel fichier faut-il choisir ?


Pour résumer :

1. Decompile all .jar files from F:\Programme\Serviio\lib . ==> OK
I have used jd-gui. There, you can click "Save all sources" to get .zip files with the source code.
2. Unpack those .zip files in a new folder. ==> OK
3. Setup a project in Eclipse, I think there is an option that eclipse checks the source folder structure, and creates the project automatically. ==> Quel fichier prendre ? Pouvez vous approfondir svp ?


Merci beaucoup de votre soutien.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Jun 19, 2016 6:51 pm

Re: Allow audio track switching by TV

This is coming in 1.7
<<

JohnleouF

Serviio newbie

Posts: 2

Joined: Fri Jun 17, 2016 2:31 pm

Post Tue Jun 21, 2016 7:32 am

Re: Allow audio track switching by TV

zip wrote:This is coming in 1.7



Oh yeahhhhh !

Avez-vous une date approximative de sortie de cette version 2.7 ?
Je suis super impatient !!

Cela va en ravir plus d'un je pense :)


Encore merci pour votre boulot et votre réponse très rapide

Return to Feature requests

Who is online

Users browsing this forum: No registered users and 19 guests

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