Video player with MKV (subtitles and audios)

Need help? Post your questions here.

Moderator: moderators

Video player with MKV (subtitles and audios)

Postby herazul » Thu May 02, 2013 10:39 am

Hi everybody !

Here is my problem :
My subsonic is working fine with both music and video, but i have many MKV with several audio language and subtitle track.
The problem is, when i read one with the video player, i cant change the subtitle or the audio language.

Is there a way to do that ? or to change the video player for a better one who can handle many subtitle or audio on a MKV file ?
herazul
 
Posts: 3
Joined: Thu May 02, 2013 9:59 am

Re: Video player with MKV (subtitles and audios)

Postby herazul » Tue May 14, 2013 2:03 pm

Still searching for an answer...

I up this thread, i hope a subsonic genius will read this :D
herazul
 
Posts: 3
Joined: Thu May 02, 2013 9:59 am

Re: Video player with MKV (subtitles and audios)

Postby ricky1252 » Mon May 20, 2013 3:09 pm

I am no subsonic genius, but I will say that it would be extremely difficult to implement due to how much possibilities mkv's have. Its can be difficult to understand but ill make this as simple as I can and give you a solution to your problem.

Mkv inputs usually have a single video stream, audio steams can be multiple as well as subtitle streams. As well you can but fonts in to the container. Well in order to switch audio as an example your video steam would be video stream 1, then audio steam would be 2, subtitle stream would be 3. This would be a basic mkv file with subtitles. it would select the default or lowest stream first to use. simple and it works.

Well when you add multiple streams to a single container basically it will do the same thing... so you have video stream 1, audio stream 2, audio stream 3, subtitle stream 4, and subtitle stream 5. By default, it will use video stream 1 and audio stream 2....(in most cases)

If this was implemented into subsonic basically the streams would have to be specified to select video stream 1, and audio stream 3. that would play the other audio stream. But what if there is no audio stream 3? like the first example? how would it detect and be implemented into subsonic to detect this problem. That is where the difficulty is mainly. This kind of error could prob show an access denied error in subsonic on your video player. As well you have to account for other containers and such in the end it would prob be best to just not implement this at all.


For subtitles, the problem is similar. As well the fact you have to account for the difficult subtitles to read that is not supported by ffmpeg. As an example ssa/ass subtitles require alot of user side set up in order for ffmpeg to properly work. Then theres the fact that ffmpeg currently cannot add subtitles within a container currently. Then there is sub/idx subtitles, what a pain they can be. Theres another that I cannot quite recall the name right now I think it starts with a p maybe? anyways. The point is there is alot of variables to consider because of how many options mkv's have.


As your solution, you can convert your mkv into multiple files... basically heres the commands...

example abc.mkv it has 2 audio streams and 2 subtitles. (well depending on the subtitle type the command may be different as well as the audio)
Code: Select all
ffmpeg -i abc.mkv -map 0:0 -map 0:1 abc.mp4

this example will make the video and 2nt audio stream into an mp4.
to extract the subtitles it would be...
Code: Select all
ffmpeg -i abc.mkv -map 0:3 abc.ass

you could also change it to 0:4 to extract the 2nt subtitle file, or make it abc.srt to make it a standard subtitle file. to stream video, audio and burn in subtitles do.
Code: Select all
ffmpeg -i abc.mkv -map 0:0 -map 0:2 -vf ass=abc.ass abc.mp4

the example above would burn in ssa/ass subtitles, if its srt do....
Code: Select all
ffmpeg -i abc.mkv -i abc.srt -map 0:0 -map 0:1 -map 1:0 abc.mp4


So basically what Im trying to say is there are so many different things you can do with mkv's, the possibilities are quite nearly endless. That is what also unfortunately the flaw that makes it difficult for streaming.

ie if you do ffmpeg -i (the file) it will tell you all the information about the file and what streams are where if you decide to do the multiple file route.

I wish you luck and I hope this post was helpful. Also want to note I am not a subsonic dev, and this information is based on what Iv learned and may not be 100% accurate. cheers =D
ricky1252
 
Posts: 9
Joined: Fri Mar 08, 2013 11:45 pm

Re: Video player with MKV (subtitles and audios)

Postby herazul » Wed May 29, 2013 2:59 pm

It's a very interesting answer, and i'm happy you take of your time to reply :)

According to your answer, i think i will just gave up addressing this issue, It's too complex and i have a wide collection of MKV.

But what i think is pretty weird is there is no very good flash player that can handle these feature (multiple audio, subtitles,...)

On OS side, you have an insane amount of video player like VLC, or media player classic,... than know how to handle audio and subtitle.
I dont understand why there is no flash player that can do the same : read the video file, deliver the video steam, and give a choice of the audio or subtitle via a button (like the youtube player for subtitle)

I dont know much about flash and streaming (i'm not very interested in, i prefer HTML5/css3/jquery) but i dont understand why it would be so difficult to develop a flash player able to read subtitle and multiple audio stream, while it's seems that's it's pretty easy for a software installed on the OS


Thx again for your answer
herazul
 
Posts: 3
Joined: Thu May 02, 2013 9:59 am


Return to Help

Who is online

Users browsing this forum: No registered users and 19 guests