Subtitles codepage problem

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
Post Reply
zuku
Posts: 3
Joined: Thu Feb 04, 2016 9:58 am

Subtitles codepage problem

Post by zuku »

Hello,
I've started using UMS and I really excited about what it can do. However I have a problem with subtitles.
Currently I am using UMS 6 (last release available on the main page) running on CentOS Linux release 7.2.1511 (Core), which is fully updated.
The problem, based on debug log, seems to be with subtitles codepage. I have my subtitles in cp1250. When in UMS.conf nothing is set, the following is executed:

Code: Select all

DEBUG 2016-02-03 21:12:44.590 [ffmpeg64-2] Starting /opt/ums-6.0.0/linux/ffmpeg64 -y -loglevel fatal -i /home/storage/public/seriale/H/Hfull.mkv -filter_complex subtitles=/home/storage/public/seriale/H/Hfull.txt:charenc=WINDOWS-1250 -bufsize 7000000 -maxrate 44000000 -g 5 -q:v 1 -qmin 2 -qmax 3 -c:a copy -c:v mpeg2video -f vob /tmp/UMS-ums/ffmpegvideo_42_1454530364285
DEBUG 2016-02-03 21:12:44.592 [ffmpeg64-2] Reading pipe: /tmp/UMS-ums/ffmpegvideo_42_1454530364285
DEBUG 2016-02-03 21:12:44.634 [ffmpeg64-2-2] Error initializing complex filters.
DEBUG 2016-02-03 21:12:44.634 [ffmpeg64-2-2] Invalid argument
Which ends up in error. I have decided to change the codepage setting in UMS.conf to hardcode it to cp1250, but still no luck.

Code: Select all

DEBUG 2016-02-03 21:10:55.544 [ffmpeg64-2] Starting /opt/ums-6.0.0/linux/ffmpeg64 -y -loglevel fatal -i /home/storage/public/seriale/H/Hfull.mkv -filter_complex subtitles=/home/storage/public/seriale/H/Hfull.txt:charenc=cp1250 -bufsize 7000000 -maxrate 44000000 -g 5 -q:v 1 -qmin 2 -qmax 3 -c:a copy -c:v mpeg2video -f vob /tmp/UMS-ums/ffmpegvideo_38_1454530255238
DEBUG 2016-02-03 21:10:55.546 [ffmpeg64-2] Reading pipe: /tmp/UMS-ums/ffmpegvideo_38_1454530255238
DEBUG 2016-02-03 21:10:55.603 [ffmpeg64-2-2] Error initializing complex filters.
DEBUG 2016-02-03 21:10:55.604 [ffmpeg64-2-2] Invalid argument
I have encoded subtitles into utf-8, which solved the problem:

Code: Select all

DEBUG 2016-02-03 21:17:23.955 [ffmpeg64-2] Starting /opt/ums-6.0.0/linux/ffmpeg64 -y -loglevel fatal -i /home/storage/public/seriale/H/Hfull.mkv -filter_complex subtitles=/home/storage/public/seriale/H/Hfull.txt -bufsize 7000000 -maxrate 44000000 -g 5 -q:v 1 -qmin 2 -qmax 3 -c:a copy -c:v mpeg2video -f vob /tmp/UMS-ums/ffmpegvideo_42_1454530643649
DEBUG 2016-02-03 21:17:23.956 [ffmpeg64-2] Reading pipe: /tmp/UMS-ums/ffmpegvideo_42_1454530643649
DEBUG 2016-02-03 21:17:24.150 [ffmpeg64-2] Attaching thread: ffmpeg64-2
DEBUG 2016-02-03 21:17:24.152 [ffmpeg64-2] Unix process ID (/opt/ums-6.0.0/linux/ffmpeg64): 3795
Though I would like to have my subtitles in cp1250 if possible. Then, I have tried the ffmpeg command with charenc=cp1250 against local (provided by Centos/epel/nux) ffmpeg and that did work:

Code: Select all

ffmpeg -y -loglevel fatal -i /home/storage/public/seriale/H/Hfull.mkv -filter_complex subtitles=/home/storage/public/seriale/H/Hfull.txt:charenc=cp1250 -bufsize 7000000 -maxrate 44000000 -g 5 -q:v 1 -qmin 2 -qmax 3 -c:a copy -c:v mpeg2video -f vob /tmp/UMS-ums/ffmpegvideo_38_1454530255238
So I guess my question is, how do I make UMS to read the subtitles encoded in cp1250 correctly?
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Subtitles codepage problem

Post by Nadahar »

Isn't your local ffmpeg 64bit, or is it just a different name?

You can configure the ffmpeg binary to use manually by adding

Code: Select all

ffmpeg_path = 
..and the actual path in UMS.conf in your profile folder which defaults to ~/.config/UMS.
zuku
Posts: 3
Joined: Thu Feb 04, 2016 9:58 am

Re: Subtitles codepage problem

Post by zuku »

No, it's just different naming. This is 64 bit.

Code: Select all

[root@kowalski ~]# rpm -aq | grep ffmpeg
ffmpeg-2.6.5-1.el7.nux.x86_64
ffmpeg-libs-2.6.5-1.el7.nux.x86_64
I have changed the ffmpeg path and that fixed the problem. Thank you!
Though, I don't know if that was the issue in the previous versions, however, is the ffmpeg shipped with ums going to be fixed for that issue?
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Subtitles codepage problem

Post by Nadahar »

zuku wrote: Though, I don't know if that was the issue in the previous versions, however, is the ffmpeg shipped with ums going to be fixed for that issue?
There are so many potential issues related to FFmpeg that testing a new version is a huge task. Lately some major things have changed as well, so as far as I know we have to adjust our use for it to keep working if we upgrade (the version bundled with your OS probably isn't that new). FFmpeg isn't in "my area of expertice", but from what I understand we don't do that too often but I guess we have to at one stage.

To make it worse, the number of Linux users are limited so getting enough feedback to deem a version "working" can be challenging.

It would be interesting if you could print the version number from both versions. You could face other issues with the version you use now even though the character encoding issue is fixed. It would also be interesting if you could report back after using it for a while if you have experienced any issues (and if you experience other issues, try to switch the FFmpeg versions to see if that affects it).
zuku
Posts: 3
Joined: Thu Feb 04, 2016 9:58 am

Re: Subtitles codepage problem

Post by zuku »

Thank you for sharing your thoughts. I will test it for a while and be back to you with the results if I have interesting ones.
User avatar
valib
Developer
Posts: 699
Joined: Fri Feb 08, 2013 3:11 am

Re: Subtitles codepage problem

Post by valib »

The best way is to follow the Forum rules written in red above. We need the trace log to see what is wrong with FFmpeg.
Post Reply