Jump to content

Cannot play media with subtitles


drengelsk

Recommended Posts

drengelsk

Hello

 

I finally got my Emby Server up running on Windows Server 2012, but I have a problem with streaming movies and series with subtitles. I stream my content via Chromecast (3rd genereation), but movies and series will only play, if I turn the subtitles off, otherwise I will just get a black TV screen. The subtitles are already incorporated in the MKV files, and also the media are not transcoded, when the subtitles are off.

 

Best Regards

Link to comment
Share on other sites

Happy2Play

What kind of subtitles are in your mkv files?  But you will most likely need to post a server log and ffmpeg log if present when trying to play a item with subtitles.

Link to comment
Share on other sites

Happy2Play

@@Luke @@softworkz

 

Is the syntax correct?

 

 

C:\Users\DrEngelsk\Desktop\Emby Server\system\ffmpeg.exe -f matroska -i file:"F:\Udenlandske Film\Deadpool.1080p-Danishbits.mkv" -map 0:0 -map 0:1 -c:v:0 libx264 -force_key_frames "expr:gte(t,n_forced*5)" -copyts -filter_complex "[0:0]scale=trunc(min(max(iw\,ih*dar)\,1920)/2)*2:trunc(ow/dar/2)*2,subtitles='F\:/Udenlandske Film/Deadpool.1080p-Danishbits.mkv:si=0':force_style='FontName=Droid Sans Fallback':fontsdir='C\:/Users/DrEngelsk/Desktop/Emby Server/programdata/fonts'" -avoid_negative_ts disabled -start_at_zero -pix_fmt yuv420p  -maxrate 10076743 -bufsize 20153486 -preset veryfast -profile:v:0 high -level:v:0 4.1 -crf 20 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -vsync -1 -map_metadata -1 -map_chapters -1 -threads 1 -codec:a:0 ac3 -metadata:s:a:0 language=eng -disposition:a:0 default -ac:a:0 6 -ab:a:0 384000 -ar:a:0 48000  -y "C:\Users\DrEngelsk\Desktop\Emby Server\programdata\transcoding-temp\a8d7351d29092d62830538ad08e5b5e5.mkv"

Link to comment
Share on other sites

@@Luke @@softworkz

 

Is the syntax correct?

 

Inside a filter string, there are special escaping requirements. 

I don't know these rules  from the top of my head, but I still spotted something.

 

Could you post the complete ffmpeg log?

Edited by softworkz
Link to comment
Share on other sites

Happy2Play

Inside a filter string, there are special escaping requirements. 

I don't know these rules  from the top of my head, but I still spotted something.

 

Could you post the complete ffmpeg log?

That was from the log in post 4.

Edited by Happy2Play
Link to comment
Share on other sites

Thanks happy!

 

I would think that the :si=0  part needs to be outside of the single-quoted filename.

 

But I just looked at the code and it hasn't changed for 1.5 years..

 

@@Luke - any ideas ?

Edited by softworkz
Link to comment
Share on other sites

Happy2Play

I don't see how subtitles='F\:/ and fontsdir='C\:/ can be correct.  

Link to comment
Share on other sites

I don't see how subtitles='F\:/ and fontsdir='C\:/ can be correct.  

 

 

Inside a filter string, there are special escaping requirements. 

 

Read the ffmpeg docs..

Link to comment
Share on other sites

Happy2Play

I guess I don't know were to look as that Window path looks wrong but looking a other OS logs it would appear correct.
 

subtitles='F\:/Udenlandske Film/Deadpool.1080p-Danishbits.mkv:si=0':force_style='FontName=Droid Sans Fallback':fontsdir='C\:/Users/DrEngelsk/Desktop/Emby Server/programdata/fonts'
subtitles='/media/nas/1080p/incoming/movie/movie.mkv:si=0':force_style='FontName=Droid Sans Fallback':fontsdir='/var/lib/emby/fonts'
Link to comment
Share on other sites

@@softworkz

 

should it not be something like this with backslashes?

 

https://superuser.com/questions/1247197/ffmpeg-absolute-path-error

 

Open a command line on Windows and type the following:

c:/windows/win.ini
It is not commonly known but Windows accepts forward slashes as well as path separator .

Using forward slashes instead of backslashes avoids the excessive escaping that would be required otherwise.

 

That's the one side.

 

 

The other side is, that a colon ( : ) is a special character inside an ffmpeg filter spec string.

 

That's why it needs to be escaped with a backslash.

Edited by softworkz
Link to comment
Share on other sites

Happy2Play

Thanks, there is not way I got any of that out of that documentation.

Edited by Happy2Play
Link to comment
Share on other sites

Emby is installer on the C drive and the F drive is just an external drive.

Could you please try to run this command manually from the command line?

 

C:\Users\DrEngelsk\Desktop\Emby Server\system\ffmpeg.exe -f matroska -i file:"F:\Udenlandske Film\Deadpool.1080p-Danishbits.mkv" -map 0:0 -map 0:1 -c:v:0 libx264 -force_key_frames "expr:gte(t,n_forced*5)" -copyts -filter_complex "[0:0]scale=trunc(min(max(iw\,ih*dar)\,1920)/2)*2:trunc(ow/dar/2)*2,subtitles='F\:/Udenlandske Film/Deadpool.1080p-Danishbits.mkv:si=0':force_style='FontName=Droid Sans Fallback':fontsdir='C\:/Users/DrEngelsk/Desktop/Emby Server/programdata/fonts'" -avoid_negative_ts disabled -start_at_zero -pix_fmt yuv420p  -maxrate 10076743 -bufsize 20153486 -preset veryfast -profile:v:0 high -level:v:0 4.1 -crf 20 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -vsync -1 -map_metadata -1 -map_chapters -1 -threads 1 -codec:a:0 ac3 -metadata:s:a:0 language=eng -disposition:a:0 default -ac:a:0 6 -ab:a:0 384000 -ar:a:0 48000  -y "C:\Users\DrEngelsk\Desktop\Emby Server\programdata\transcoding-temp\a8d7351d29092d62830538ad08e5b5e5.mkv"

(will probably fail)

 

And afterwards this:

C:\Users\DrEngelsk\Desktop\Emby Server\system\ffmpeg.exe -f matroska -i file:"F:\Udenlandske Film\Deadpool.1080p-Danishbits.mkv" -map 0:0 -map 0:1 -c:v:0 libx264 -force_key_frames "expr:gte(t,n_forced*5)" -copyts -filter_complex "[0:0]scale=trunc(min(max(iw\,ih*dar)\,1920)/2)*2:trunc(ow/dar/2)*2,subtitles='F\:/Udenlandske Film/Deadpool.1080p-Danishbits.mkv':si=0:force_style='FontName=Droid Sans Fallback':fontsdir='C\:/Users/DrEngelsk/Desktop/Emby Server/programdata/fonts'" -avoid_negative_ts disabled -start_at_zero -pix_fmt yuv420p  -maxrate 10076743 -bufsize 20153486 -preset veryfast -profile:v:0 high -level:v:0 4.1 -crf 20 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -vsync -1 -map_metadata -1 -map_chapters -1 -threads 1 -codec:a:0 ac3 -metadata:s:a:0 language=eng -disposition:a:0 default -ac:a:0 6 -ab:a:0 384000 -ar:a:0 48000  -y "C:\Users\DrEngelsk\Desktop\Emby Server\programdata\transcoding-temp\a8d7351d29092d62830538ad08e5b5e5.mkv"
Link to comment
Share on other sites

Happy2Play

Are there certain conditions for the existence of the /programdata/fonts folder?  None of my systems have this fonts folder.

Link to comment
Share on other sites

pwhodges

 

Could you please try to run this command manually from the command line?

 

C:\Users\DrEngelsk\Desktop\Emby Server\system\ffmpeg.exe -f matroska -i file:"F:\Udenlandske Film\Deadpool.1080p-Danishbits.mkv" -map 0:0 -map 0:1 -c:v:0 libx264 -force_key_frames "expr:gte(t,n_forced*5)" -copyts -filter_complex "[0:0]scale=trunc(min(max(iw\,ih*dar)\,1920)/2)*2:trunc(ow/dar/2)*2,subtitles='F\:/Udenlandske Film/Deadpool.1080p-Danishbits.mkv:si=0':force_style='FontName=Droid Sans Fallback':fontsdir='C\:/Users/DrEngelsk/Desktop/Emby Server/programdata/fonts'" -avoid_negative_ts disabled -start_at_zero -pix_fmt yuv420p  -maxrate 10076743 -bufsize 20153486 -preset veryfast -profile:v:0 high -level:v:0 4.1 -crf 20 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -vsync -1 -map_metadata -1 -map_chapters -1 -threads 1 -codec:a:0 ac3 -metadata:s:a:0 language=eng -disposition:a:0 default -ac:a:0 6 -ab:a:0 384000 -ar:a:0 48000  -y "C:\Users\DrEngelsk\Desktop\Emby Server\programdata\transcoding-temp\a8d7351d29092d62830538ad08e5b5e5.mkv"

 

Will fail because the path with a space in requires the actual program path/name to be surrounded by quotes...

Edited by pwhodges
Link to comment
Share on other sites

Will fail because the path with a space in requires the command to be surrounded by quotes...

 

Sorry, you're right. 

You could quote it, or you can also just navigate to that directory and then execute starting from 'ffmpeg...'

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...