Can't transcode video file with subtitles (SOLVED)

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
musta81
Posts: 11
Joined: Mon Aug 17, 2020 2:42 am

Can't transcode video file with subtitles (SOLVED)

Post by musta81 »

Hi everyone,
I am new with UMS and I have some troubles with transcoding and subtitles on MacOs High Sierra and PS3 as player device.
When I try to play mkv files, placed inside the TRANSCODE folder, if I choose a combination without subtitles I always get the file to be played correctly with every encoder (ffmpeg, mencoder, etc...)
If I choose a combination that includes subtitles (e.g: English audio and Italian subtitles or Italian audio and Italian forced subtitles) UMS returns an error (There is no stream to return...).
I've attached Trace/debug files following guidelines.
Thanks to everyone who will help me in solving this trouble
Last edited by musta81 on Sun Aug 23, 2020 12:11 pm, edited 1 time in total.
musta81
Posts: 11
Joined: Mon Aug 17, 2020 2:42 am

Re: Can't transcode video file with subtitles

Post by musta81 »

I forgot the attachment...
ums_dbg_2020-08-16-16-46.zip
(388.57 KiB) Downloaded 365 times
User avatar
SubJunk
Lead Developer
Posts: 3707
Joined: Sun May 27, 2012 4:12 pm

Re: Can't transcode video file with subtitles

Post by SubJunk »

Hi musta81, welcome to the forum. I don't see any play attempts in your logs, please make sure you reproduce the problem before saving the logs
musta81
Posts: 11
Joined: Mon Aug 17, 2020 2:42 am

Re: Can't transcode video file with subtitles

Post by musta81 »

Hi,
It sounds strange...
I've reproduced the trouble another time.
I attach the new logs.

Universal Media Server console log shows:
12:21:11 ERROR External input stream instance is null... stopping process
12:21:11 ERROR There is no inputstream to return for Batman.And.Robin.1997.iTA.ENG.BDrip.1080p.x264.mkv Batman.And.Robin.1997.iTA.ENG.BDrip.1080p.x264 {Audio: AC3/English} {Int. Sub:SubRip/Italian} [FFmpeg Video]
12:21:17 ERROR External input stream instance is null... stopping process
12:21:17 ERROR There is no inputstream to return for Batman.And.Robin.1997.iTA.ENG.BDrip.1080p.x264.mkv Batman.And.Robin.1997.iTA.ENG.BDrip.1080p.x264 {Audio: AC3/English} {Int. Sub:SubRip/Italian} [FFmpeg Video]

Ps3 shows error 800288E1

Thanks a lot
ums_dbg_2020-08-17-12-18.zip
(378.88 KiB) Downloaded 300 times
User avatar
SubJunk
Lead Developer
Posts: 3707
Joined: Sun May 27, 2012 4:12 pm

Re: Can't transcode video file with subtitles

Post by SubJunk »

Ok great, so I can see from the logs that FFmpeg is being used, but we should be using MEncoder in that situation, because FFmpeg is very slow to parse subtitles on load.
I have made a new build for you that adds more logging, that will hopefully tell me why it's not working properly. Please make logs again with https://www.universalmediaserver.com/up ... ogging.dmg
musta81
Posts: 11
Joined: Mon Aug 17, 2020 2:42 am

Re: Can't transcode video file with subtitles

Post by musta81 »

Hi,
thanks for your great help.
I can't use Mencoder in this testing version because of an unknown error the engine is not available.
I have an iMac with OsX 10.13.6.
I've tried to play a trancoded subtitled file with Mencoder.
Now I can correctly play file but subtitles are not working.
I attach the results of a failed subtitles encoding with Mencoder with normal UMS.
ums_dbg_2020-08-18-11-32.zip
(327.09 KiB) Downloaded 312 times
Media infos are:
General
Unique ID : 191789589614837552344304122122241455932 (0x904954D4688F1F23AAA4E74184EA373C)
Complete name : /Volumes/DISCO_3/Video/Il.Pianeta.Delle.Scimmie.1.1968.iTA.ENG.BDrip.1080p.x264.mkv
Format : Matroska
Format version : Version 4
File size : 9.05 GiB
Duration : 1h 52mn
Overall bit rate : 11.6 Mbps
Encoded date : UTC 2016-05-19 19:26:30
Writing application : mkvmerge v9.1.0 ('Little Earthquakes') 64bit
Writing library : libebml v1.3.3 + libmatroska v1.4.4

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings : CABAC / 5 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 5 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1h 52mn
Bit rate : 8 000 Kbps
Width : 1 920 pixels
Height : 812 pixels
Display aspect ratio : 2.35:1
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.214
Stream size : 6.26 GiB (69%)
Writing library : x264 core 148 r2638 7599210
Encoding settings : cabac=1 / ref=5 / deblock=1:-2:-2 / analyse=0x3:0x133 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=230 / keyint_min=22 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=8000 / ratetol=2.0 / qcomp=0.50 / qpmin=10 / qpmax=54 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=50000 / vbv_bufsize=50000 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00
Language : English
Default : Yes
Forced : No

Audio #1
ID : 2
Format : DTS
Format/Info : Digital Theater Systems
Codec ID : A_DTS
Duration : 1h 52mn
Bit rate mode : Constant
Bit rate : 768 Kbps
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 KHz
Frame rate : 93.750 fps (512 SPF)
Bit depth : 24 bits
Compression mode : Lossy
Stream size : 616 MiB (7%)
Language : Italian
Default : Yes
Forced : No

Audio #2
ID : 3
Format : DTS
Format/Info : Digital Theater Systems
Codec ID : A_DTS
Duration : 1h 52mn
Bit rate mode : Constant
Bit rate : 1 509 Kbps
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 KHz
Frame rate : 93.750 fps (512 SPF)
Bit depth : 24 bits
Compression mode : Lossy
Stream size : 1.18 GiB (13%)
Language : English
Default : No
Forced : No

Audio #3
ID : 4
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : A_AC3
Duration : 1h 52mn
Bit rate mode : Constant
Bit rate : 640 Kbps
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 KHz
Frame rate : 31.250 fps (1536 SPF)
Compression mode : Lossy
Stream size : 513 MiB (6%)
Language : Italian
Service kind : Complete Main
Default : No
Forced : No

Audio #4
ID : 5
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : A_AC3
Duration : 1h 52mn
Bit rate mode : Constant
Bit rate : 640 Kbps
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 KHz
Frame rate : 31.250 fps (1536 SPF)
Compression mode : Lossy
Stream size : 513 MiB (6%)
Language : English
Service kind : Complete Main
Default : No
Forced : No

Text #1
ID : 6
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Duration : 45mn 11s
Bit rate : 0 bps
Count of elements : 3
Stream size : 69.0 Bytes (0%)
Title : FORCED
Language : Italian
Default : Yes
Forced : No

Text #2
ID : 7
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Duration : 1h 50mn
Bit rate : 43 bps
Count of elements : 1031
Stream size : 35.3 KiB (0%)
Language : Italian
Default : No
Forced : No

Text #3
ID : 8
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Duration : 1h 50mn
Bit rate : 43 bps
Count of elements : 1047
Stream size : 35.3 KiB (0%)
Language : English
Default : No
Forced : No

Menu
00:00:00.000 : en:00:00:00.000
00:03:26.998 : en:00:03:26.998
00:05:24.032 : en:00:05:24.032
00:11:36.487 : en:00:11:36.487
00:19:01.515 : en:00:19:01.515
00:21:10.728 : en:00:21:10.728
00:24:43.607 : en:00:24:43.607
00:27:52.379 : en:00:27:52.379
00:31:04.112 : en:00:31:04.112
00:36:14.506 : en:00:36:14.506
00:38:09.412 : en:00:38:09.412
00:42:57.450 : en:00:42:57.450
00:46:18.192 : en:00:46:18.192
00:48:08.385 : en:00:48:08.385
00:53:46.598 : en:00:53:46.598
01:00:15.612 : en:01:00:15.612
01:03:40.358 : en:01:03:40.358
01:10:58.546 : en:01:10:58.546
01:12:59.542 : en:01:12:59.542
01:16:37.718 : en:01:16:37.718
01:20:55.392 : en:01:20:55.392
01:27:04.344 : en:01:27:04.344
01:29:52.220 : en:01:29:52.220
01:34:18.027 : en:01:34:18.027
01:38:39.622 : en:01:38:39.622
01:43:44.427 : en:01:43:44.427
01:48:48.856 : en:01:48:48.856
01:51:17.671 : en:01:51:17.671

Thanks
User avatar
SubJunk
Lead Developer
Posts: 3707
Joined: Sun May 27, 2012 4:12 pm

Re: Can't transcode video file with subtitles

Post by SubJunk »

Thanks, I can see that we are sending MEncoder the following command:

Code: Select all

"/Applications/Universal Media Server.app/Contents/Resources/osx/mencoder" -ss 0 video.mkv -msglevel statusline=2 -oac copy -of mpeg -mpegopts format=mpeg2:muxrate=500000:vbuf_size=1194:abuf_size=64 -ovc lavc -channels 6 -lavdopts debug=0:threads=4 -lavcopts autoaspect=1:vcodec=mpeg2video:threads=4:keyint=25:vqscale=1:vqmin=2:vqmax=3:vrc_maxrate=499000:vrc_buf_size=7000 -ass -ass-color FFFFFF00 -ass-border-color 00000000 -ass-font-scale 1.4 -font Arial -ass-force-style FontName=Arial,Outline=1,Shadow=1,MarginV=10 -aid 3 -noautosub -sid 1 -ofps 24000/1001 -lavdopts fast -mc 0 -noskip -o - -really-quiet -msglevel statusline=2
I will try running that on my mac and see what happens
User avatar
SubJunk
Lead Developer
Posts: 3707
Joined: Sun May 27, 2012 4:12 pm

Re: Can't transcode video file with subtitles

Post by SubJunk »

The command works ok for me on another file. Can you please run this in your Terminal:

Code: Select all

"/Applications/Universal Media Server.app/Contents/Resources/osx/mencoder" -ss 0 /Volumes/DISCO_3/Video/Il.Pianeta.Delle.Scimmie.1.1968.iTA.ENG.BDrip.1080p.x264.mkv -oac copy -of mpeg -mpegopts format=mpeg2:muxrate=500000:vbuf_size=1194:abuf_size=64 -ovc lavc -channels 6 -lavdopts debug=0:threads=4 -lavcopts autoaspect=1:vcodec=mpeg2video:threads=4:keyint=25:vqscale=1:vqmin=2:vqmax=3:vrc_maxrate=499000:vrc_buf_size=7000 -ass -ass-color FFFFFF00 -ass-border-color 00000000 -ass-font-scale 1.4 -font Arial -ass-force-style FontName=Arial,Outline=1,Shadow=1,MarginV=10 -aid 3 -noautosub -sid 1 -ofps 24000/1001 -lavdopts fast -mc 0 -noskip -o output.mpg
and tell me what it responds with?
musta81
Posts: 11
Joined: Mon Aug 17, 2020 2:42 am

Re: Can't transcode video file with subtitles

Post by musta81 »

Hi,
thanks for your precious help.
I think it could be an error about fonts.
I attach you the terminal screenshot.
Schermata 2020-08-19 alle 11.36.10.png
Schermata 2020-08-19 alle 11.36.10.png (118.16 KiB) Viewed 8093 times
Thanks
musta81
Posts: 11
Joined: Mon Aug 17, 2020 2:42 am

Re: Can't transcode video file with subtitles

Post by musta81 »

I also attach the initial verbose print.
Schermata 2020-08-19 alle 11.48.19.png
Schermata 2020-08-19 alle 11.48.19.png (329.82 KiB) Viewed 8091 times
Thanks
Post Reply