FAQ  •  Register  •  Login

Multiple entries for same video with multiple sound-tracks

<<

kot

User avatar

DLNA master

Posts: 104

Joined: Sat Jan 08, 2011 5:36 pm

Post Sun Jan 09, 2011 5:50 am

Multiple entries for same video with multiple sound-tracks

I download rips of my US-bought movies, because of the Ukrainian and Russian sound-tracks on them, that aren't available for sale here -- some in my family can't enjoy a movie in English, even if they can understand the language in daily life.

The MKV format, in particular, allows people to pack multiple audio-tracks in the same file. Such files will usually have the Russian soundtrack 1st (sometimes in multiple versions) and then the original in English. Unless told otherwise, however, ffmpeg will always use the 1st audio track...

I'd like to be able to choose, which audio to have with my video... The way I see it implemented would be to add the same video-file to the list multiple times -- once for each audio option. When a particular entry is requested by the device, the transcoder will be launched with explicitly specified (non-default) audio request.

This would not even be particularly heavy on the server, as no computation would be happening. The devices able to play MKV format directly, for example, will simply need to be fed the same file with modified header (what mkvpropedit can do -- no complete remux).

(The same approach can be used to allow run-time per-movie choice between "surround-sound" and simple-stereo downmix.)
FreeBSD port of Serviio is now in the tree. Please, try using it and share your experience.
<<

klaus

Serviio newbie

Posts: 18

Joined: Sun Dec 19, 2010 2:58 pm

Post Sun Jan 09, 2011 11:31 am

Re: Multiple entries for same video with multiple sound-tracks

Your renderer should be able to select the proper audio track (I assume you do not transcode?).

I am saying "should", because:
For example, on my Panasonic Viera 2010 model, it didn't work in the beginning when I watched MPEG-2 PS.
I then re-multiplexed to MPEG-2 TS, and added the ISO language codes to the audio tracks with the -alang option.
Since then I can select the language by pressing OPTIONS on the remote control.
You wouldn't believe that TV's are so picky about the format, but they are.

So far, so good. Unfortunately I need transcoding for another reason, and there serviio's ffmpeg call, at the moment, dumps all but the first audio track.

I would therefore formulate my variation of this feature request:
When transcoding, would it be possible that all audio tracks are handled?
(it would probably mean detecting the number of tracks, and adding proper -acodec ... -newaudio options at the end of the ffmpeg call)
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Jan 09, 2011 12:25 pm

Re: Multiple entries for same video with multiple sound-tracks

Please create a bitbucket ticket with an example ffmpeg command. There is already a similar one, maybe it's actually the same or extension: https://bitbucket.org/xnejp03/serviio/i ... ection-for
<<

klaus

Serviio newbie

Posts: 18

Joined: Sun Dec 19, 2010 2:58 pm

Post Mon Jan 10, 2011 8:31 pm

Re: Multiple entries for same video with multiple sound-tracks

Please create a bitbucket ticket with an example ffmpeg command. There is already a similar one, maybe it's actually the same or extension


I have just added my proposal as comment to the existing entry. Sorry, the formatting did not work out as I expected.
The most flexible solution would be if the user can specify a filter which tracks to transcode/copy.
(I personally would be happy if just all of them are handled).


I hope I made myself clear, but if there are questions, send me a personal note.
<<

kot

User avatar

DLNA master

Posts: 104

Joined: Sat Jan 08, 2011 5:36 pm

Post Fri Jan 21, 2011 6:02 am

Re: Multiple entries for same video with multiple sound-trac

zip wrote:Please create a bitbucket ticket with an example ffmpeg command.

If the ticket already exists, here is a sample ffmpeg-command. It uses the -map flag. In this example, the input file -- an MKV -- has a single video-stream (called stream 0.0 by ffmpeg) and two audio-streams: 0.1 -- Russian, and 0.2 -- English. ffplay -- ffmpeg's companion player -- itself identifies them as:
  Code:
...
    Stream #0.0: Video: h264, yuv420p, 1280x720, PAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 50 tbc
    Metadata:
      title           : XxXxX XxX
    Stream #0.1(rus): Audio: dca, 48000 Hz, 6 channels, s16
    Metadata:
      title           : Русский
    Stream #0.2(eng): Audio: dca, 48000 Hz, 6 channels, s16
    Metadata:
      title           : Английский

If I wanted to convert the above into a "DVD"-like MPG, and use the "eng" stream for audio, I'd use: ffmpeg -map 0.0:0.0 -map 0.2:0.1 -i input.mkv -target dvd output.mpg. Yes, you have to explicitly map the only video-stream to itself. ffmpeg says the following and begins conversion:
  Code:
...
    Stream #0.0: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], q=2-31, 6000 kb/s, 90k tbn, 25 tbc
    Metadata:
      title           : XxXxX XxX
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
    Metadata:
      title           : Английский
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.2 -> #0.1 [sync #0.1]

The streams may vary not by language, but by other details -- like the number of channels and the bitrate. Some of my videos have multiple tracks in Russian -- done differently. These details (along with the language code) should all be part of the entry's name, when I'm browsing my collection from a TV. And, as already stated, each movie should be listed as many times, as the stream-combination warrants.
FreeBSD port of Serviio is now in the tree. Please, try using it and share your experience.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Jan 21, 2011 9:43 am

Re: Multiple entries for same video with multiple sound-trac

This will not provide a very nice user experience, especially for people who only watch in the original language. Having the video listed 6 times (or more if it's spread over 2 original files for example) will look rubbish. How about specifying a preferred language in the console?
<<

Zek

User avatar

Serviio lover

Posts: 72

Joined: Wed Nov 24, 2010 11:03 am

Location: Boulder, Colorado, USA

Post Fri Jan 21, 2011 4:38 pm

Re: Multiple entries for same video with multiple sound-trac

You could have preferred (multi checkbox) languages if you wanted more than one to appear. Another idea would be to show the movies with multiple language tracks as folders and show the languages (or even tracks) available as files under it?

Cheers,
Zek
Sony Bravia KDL-55NX810 | Serviio 0.5 (rev. 975aa458693c) | Synology DS-1010+
<<

kot

User avatar

DLNA master

Posts: 104

Joined: Sat Jan 08, 2011 5:36 pm

Post Sat Jan 22, 2011 5:01 pm

Re: Multiple entries for same video with multiple sound-trac

zip wrote:Having the video listed 6 times (or more if it's spread over 2 original files for example) will look rubbish. How about specifying a preferred language in the console?


"Folders" is the solution I was thinking of -- a user would click on the movie and be presented with options, if any...

Also, if you are concerned with pessimising the experience of the single-language users, this behavior could be optional -- triggered via serviio-console, right next to where the transcoding is enabled/disabled.
FreeBSD port of Serviio is now in the tree. Please, try using it and share your experience.
<<

gobater

Serviio newbie

Posts: 18

Joined: Sun Jan 22, 2012 8:52 am

Post Sun Feb 01, 2015 10:28 am

Re: Multiple entries for same video with multiple sound-trac

I think this is a quite interesting request.

I've made a proposal for the implementation: having a new category folder: "by Language". That should in my opinion solve the problem without making navigation more complex.

Have a look at it and give me your feedback: viewtopic.php?f=3&t=18185


Regards

Return to Feature requests

Who is online

Users browsing this forum: No registered users and 51 guests

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