[SOLVED] FFMpeg command + Subtitles won't work
Version 1.3.1 seems to have fixed this problem.
Hi,
I'm experiencing a strange problem with subtitles. Here's the output from the log file:
- Code:
2013-08-10 21:10:47,377 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: /media/Storage/Serier/True.Blood/True.Blood.S06E03.Youre.No.Good.WEB-DL.x264.AAC.mp4
2013-08-10 21:10:47,378 DEBUG [ProcessExecutor] Starting /home/martin/.myprograms/serviio/bin/ffmpeg -threads 4 -i /media/Storage/Serier/True.Blood/True.Blood.S06E03.Youre.No.Good.WEB-DL.x264.AAC.mp4 -y -threads 4 -c:v mpeg2video -b:v 17000k -maxrate:v 17000k -bufsize:v 17000k -vf subtitles=filename="/media/Storage/Serier/True.Blood/True.Blood.S06E03.Youre.No.Good.WEB-DL.x264.AAC.srt":original_size=720x404:charenc=UTF-8 -r 24000/1001 -g 15 -c:a ac3 -b:a 384k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts /tmp/Serviio/transcoding-temp-467-sony2010-ORIGINAL-631acdc82af1e83aa410f631d2510a6e.stf
2013-08-10 21:10:47,408 WARN [ProcessExecutor] Process /home/martin/.myprograms/serviio/bin/ffmpeg has a return code of 1! This is a possible error. Detailed output follows.
creation_time : 2013-06-30 23:37:57
handler_name : Sound Media Handler
[Parsed_subtitles_0 @ 0x1ca8cc0] Unable to open "/media/Storage/Serier/True.Blood/True.Blood.S06E03.Youre.No.Good.WEB-DL.x264.AAC.srt"
[AVFilterGraph @ 0x1c81e60] Error initializing filter 'subtitles' with args 'filename="/media/Storage/Serier/True.Blood/True.Blood.S06E03.Youre.No.Good.WEB-DL.x264.AAC.srt":original_size=720x404:charenc=UTF-8'
Error opening filters!
2013-08-10 21:10:47,408 DEBUG [TranscodingJobListener] Transcoding finished; successful: false
2013-08-10 21:10:57,389 DEBUG [TranscodingJobListener] Deleted temp file '/tmp/Serviio/transcoding-temp-467-sony2010-ORIGINAL-631acdc82af1e83aa410f631d2510a6e.stf': true
2013-08-10 21:10:57,390 DEBUG [AbstractTranscodingDeliveryEngine] Removing transcoding listener with id transcoding-temp-467-sony2010-ORIGINAL-631acdc82af1e83aa410f631d2510a6e.stf
2013-08-10 21:10:57,390 ERROR [ResourceTransportRequestHandler] Error while processing resource, sending back 500 error. Message: FFmpeg execution failed
java.io.IOException: FFmpeg execution failed
at org.serviio.delivery.resource.transcode.FileBasedTranscodingDeliveryStrategy.createInputStream(FileBasedTranscodingDeliveryStrategy.java:49)
at org.serviio.delivery.resource.transcode.AbstractTranscodingDeliveryEngine.retrieveTranscodedResource(AbstractTranscodingDeliveryEngine.java:134)
at org.serviio.delivery.resource.AbstractDeliveryEngine.deliver(AbstractDeliveryEngine.java:110)
at org.serviio.delivery.MediaResourceRetrievalStrategy.retrieveResource(MediaResourceRetrievalStrategy.java:153)
at org.serviio.delivery.GETMethodProcessor.retrieveResource(GETMethodProcessor.java:121)
at org.serviio.delivery.GETMethodProcessor.buildDeliveryContainer(GETMethodProcessor.java:48)
at org.serviio.delivery.AbstractMethodProcessor.handleRequest(AbstractMethodProcessor.java:100)
at org.serviio.delivery.ResourceDeliveryProcessor.deliverContent(ResourceDeliveryProcessor.java:81)
at org.serviio.upnp.webserver.ResourceTransportRequestHandler.handleRequest(ResourceTransportRequestHandler.java:86)
at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:61)
at org.apache.http.protocol.HttpService.doService(HttpService.java:293)
at org.serviio.upnp.webserver.ServiioHttpService.doService(ServiioHttpService.java:77)
at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:212)
at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:192)
But if I copy and paste the ffmpeg command in a Terminal, it actually works:
- Code:
martin@desktop:~$ /home/martin/.myprograms/serviio/bin/ffmpeg -threads 4 -i /media/Storage/Serier/True.Blood/True.Blood.S06E03.Youre.No.Good.WEB-DL.x264.AAC.mp4 -y -threads 4 -c:v mpeg2video -b:v 17000k -maxrate:v 17000k -bufsize:v 17000k -vf subtitles=filename="/media/Storage/Serier/True.Blood/True.Blood.S06E03.Youre.No.Good.WEB-DL.x264.AAC.srt":original_size=720x404:charenc=UTF-8 -r 24000/1001 -g 15 -c:a ac3 -b:a 384k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts /tmp/Serviio/transcoding-temp-467-sony2010-ORIGINAL-631acdc82af1e83aa410f631d2510a6e.stf
ffmpeg version 1.1.git Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 9 2013 17:19:32 with gcc 4.7 (Ubuntu/Linaro 4.7.3-1ubuntu1)
configuration: --prefix=/home/martin/.myprograms/serviio/bin/src/ffmpeg --extra-cflags=-I/home/martin/.myprograms/serviio/bin/src/ffmpeg/include --extra-ldflags=-L/home/martin/.myprograms/serviio/bin/src/ffmpeg/lib --bindir=/home/martin/.myprograms/serviio/bin/src/ffmpeg/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-x11grab
libavutil 52. 37.101 / 52. 37.101
libavcodec 55. 16.100 / 55. 16.100
libavformat 55. 9.100 / 55. 9.100
libavdevice 55. 2.100 / 55. 2.100
libavfilter 3. 77.101 / 3. 77.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/media/Storage/Serier/True.Blood/True.Blood.S06E03.Youre.No.Good.WEB-DL.x264.AAC.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2013-07-01 00:01:04
Duration: 00:57:53.41, start: 0.000000, bitrate: 1092 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x404 [SAR 1:1 DAR 180:101], 960 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
Metadata:
creation_time : 2013-07-01 00:01:04
handler_name : True.Blood.S06E03.Youre.No.Good.WEB-DL.x264.AAC.264#trackID=1:fps=23.976@GPAC0.5.1-DEV-rev4283
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s
Metadata:
creation_time : 2013-06-30 23:37:57
handler_name : Sound Media Handler
[mpeg2video @ 0x1b04e60] impossible bitrate constraints, this will fail
Output #0, mpegts, to '/tmp/Serviio/transcoding-temp-467-sony2010-ORIGINAL-631acdc82af1e83aa410f631d2510a6e.stf':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
encoder : Lavf55.9.100
Stream #0:0(und): Video: mpeg2video, yuv420p, 720x404 [SAR 1:1 DAR 180:101], q=2-31, 17000 kb/s, 90k tbn, 23.98 tbc
Metadata:
creation_time : 2013-07-01 00:01:04
handler_name : True.Blood.S06E03.Youre.No.Good.WEB-DL.x264.AAC.264#trackID=1:fps=23.976@GPAC0.5.1-DEV-rev4283
Stream #0:1(eng): Audio: ac3, 48000 Hz, stereo, fltp, 384 kb/s
Metadata:
creation_time : 2013-06-30 23:37:57
handler_name : Sound Media Handler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mpeg2video)
Stream #0:1 -> #0:1 (aac -> ac3)
Press [q] to stop, [?] for help
[Parsed_subtitles_0 @ 0x1d9b0e0] Neither PlayResX nor PlayResY defined. Assuming 384x288
frame= 784 fps=275 q=2.0 Lsize= 14291kB time=00:00:33.08 bitrate=3538.8kbits/s dup=2 drop=0
As you can see I've compiled my own ffmpeg, and I'm running a 64-bit Ubuntu Linux. The command is indeed using my own compiled ffmpeg and not using the one provided with the distribution. Since the command doesn't show any faults when running in a Terminal, I don't really get what's wrong here. I need some information on the "internals" of Serviios handling of the ffmpeg command to continue troubleshooting.
I did have to do some "improvisation" when compiling ffmpeg, but since the command runs just fine in a terminal I'm not ready to begin anew there.
Other points of information:
* I have tried opening the .stf file with VLC and it plays fine and has the subtitles burnt in.
* Other files (without subtitles) works fine with the same ffmpeg binary
* The files have the same permission, that is both the .srt and the .mp4