[FFmpeg-trac] #5758(undetermined:new): [Subtitle Problem] ffmpeg can't load the subtitle file that isn't located in the same directory with ffmpeg.exe
FFmpeg
trac at avcodec.org
Fri Aug 5 13:56:37 EEST 2016
#5758: [Subtitle Problem] ffmpeg can't load the subtitle file that isn't located
in the same directory with ffmpeg.exe
-------------------------------------+-------------------------------------
Reporter: bordon | Owner:
Type: defect | Status: new
Priority: normal | Component:
Version: git-master | undetermined
Keywords: subtitle | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Description changed by cehoyos:
Old description:
> '''Summary of the bug:'''
> ffmpeg can't load the subtitle file that isn't located in the same
> directory with ffmpeg.exe
> '''How to reproduce:'''
> '''You can execute the following command:'''
> D:\ffmpeg\bin>ffmpeg.exe -i E:\电影\KB11-20-00.卡贾基
> .Kajaki.2014.1080p.BluRay.x264.DTS-WiKi\Kajaki.2014.1080p.BluRay.x264
> .DTS-WiKi.mkv -vf "subtitles=:file=E:\电影\KB11-20-00.卡贾基
> .Kajaki.2014.1080p.BluRay.x264.DTS-WiKi\Kajaki.2014.1080p.BluRay.x264
> .DTS-WiKi.srt" -c:v
> h264_nvenc -s 1280X720 -gpu 0 -b:v 1400k -c:a aac -b:a 65k -f mp4
> E:\output\Kajaki.2014.1080p.BluRay.x264.DTS-WiKi.mp4
>
> '''My environment is as follows:'''
> ffmpeg version: the offical 64-bit static for windows
> https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20160718-a49ed9e-
> win64-static.zip
>
> OS: Win2008 x64
> Language: chs
> CPU: Intel i7 4770K with iGPU driver
> GPU: Nvidia Geforce GTX 750 Ti with 368.81 driver
>
> '''The output:'''
> D:\ffmpeg\bin>ffmpeg.exe -i E:\电影\KB11-20-00.卡贾基
> .Kajaki.2014.1080p.BluRay.x264.DTS-WiKi\Kajaki.2014.1080p.BluRay.x264
> .DTS-WiKi.mkv -vf "subtitles=filename=E:\电影\KB11-20-00.卡贾基
> .Kajaki.2014.
> 1080p.BluRay.x264.DTS-WiKi\Kajaki.2014.1080p.BluRay.x264.DTS-WiKi.srt"
> -c:v h264_nvenc -s 1280X720 -gpu 0 -b:v 1400k -c:a aac -b:a 65k -f mp4
> E:\output\Kajaki.2014.1080p.BluRay.x264.DTS-WiKi.mp4
> ffmpeg version N-81043-ga49ed9e Copyright (c) 2000-2016 the FFmpeg
> developers
> built with gcc 5.4.0 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-
> bzlib --enable-libebur128 --enable-fontconfig --enable-fre
> i0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
> --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
> --enable-libgsm --enable-libilbc --enable-libmodplug --enab
> le-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-
> libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspee
> x --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-
> libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack
> --enable-libwebp --enable-libx264 --enable-libx265 --enable-
> libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink
> --enable-zlib
> libavutil 55. 28.100 / 55. 28.100
> libavcodec 57. 50.100 / 57. 50.100
> libavformat 57. 42.100 / 57. 42.100
> libavdevice 57. 0.102 / 57. 0.102
> libavfilter 6. 47.100 / 6. 47.100
> libswscale 4. 1.100 / 4. 1.100
> libswresample 2. 1.100 / 2. 1.100
> libpostproc 54. 0.100 / 54. 0.100
> Input #0, matroska,webm, from 'E:\鐢靛奖\KB11-20-00.鍗¤淳鍩
> ?Kajaki.2014.1080p.BluRay.x264.DTS-WiKi\Kajaki.2014.1080p.BluRay.x264
> .DTS-WiKi.mkv':
> Metadata:
> encoder : libebml v1.3.0 + libmatroska v1.4.1
> creation_time : 2015-06-06 05:57:02
> Duration: 01:48:15.21, start: 0.000000, bitrate: 12761 kb/s
> Chapter #0:0: start 0.000000, end 633.208000
> Metadata:
> title : 00:00:00.000
> Chapter #0:1: start 633.208000, end 910.125000
> Metadata:
> title : 00:10:33.208
> Chapter #0:2: start 910.125000, end 1393.500000
> Metadata:
> title : 00:15:10.125
> Chapter #0:3: start 1393.500000, end 1867.208000
> Metadata:
> title : 00:23:13.500
> Chapter #0:4: start 1867.208000, end 2518.458000
> Metadata:
> title : 00:31:07.208
> Chapter #0:5: start 2518.458000, end 3264.500000
> Metadata:
> title : 00:41:58.458
> Chapter #0:6: start 3264.500000, end 3805.667000
> Metadata:
> title : 00:54:24.500
> Chapter #0:7: start 3805.667000, end 4290.583000
> Metadata:
> title : 01:03:25.667
> Chapter #0:8: start 4290.583000, end 4715.708000
> Metadata:
> title : 01:11:30.583
> Chapter #0:9: start 4715.708000, end 5224.667000
> Metadata:
> title : 01:18:35.708
> Chapter #0:10: start 5224.667000, end 5737.750000
> Metadata:
> title : 01:27:04.667
> Chapter #0:11: start 5737.750000, end 6495.211000
> Metadata:
> title : 01:35:37.750
> Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x802 [SAR 1:1 DAR
> 960:401], 24 fps, 24 tbr, 1k tbn, 48 tbc (default)
> Metadata:
> BPS : 11990786
> BPS-eng : 11990786
> DURATION : 01:48:15.209000000
> DURATION-eng : 01:48:15.209000000
> NUMBER_OF_FRAMES: 155885
> NUMBER_OF_FRAMES-eng: 155885
> NUMBER_OF_BYTES : 9735332999
> NUMBER_OF_BYTES-eng: 9735332999
> _STATISTICS_WRITING_APP: mkvmerge v7.0.0 ('Where We Going') 32bit
> built on Jun 9 2014 15:08:34
> _STATISTICS_WRITING_APP-eng: mkvmerge v7.0.0 ('Where We Going')
> 32bit built on Jun 9 2014 15:08:34
> _STATISTICS_WRITING_DATE_UTC: 2015-06-06 05:57:02
> _STATISTICS_WRITING_DATE_UTC-eng: 2015-06-06 05:57:02
> _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 768
> kb/s (default)
> Metadata:
> title : English
> BPS : 768000
> BPS-eng : 768000
> DURATION : 01:48:15.211000000
> DURATION-eng : 01:48:15.211000000
> NUMBER_OF_FRAMES: 608926
> NUMBER_OF_FRAMES-eng: 608926
> NUMBER_OF_BYTES : 623540292
> NUMBER_OF_BYTES-eng: 623540292
> _STATISTICS_WRITING_APP: mkvmerge v7.0.0 ('Where We Going') 32bit
> built on Jun 9 2014 15:08:34
> _STATISTICS_WRITING_APP-eng: mkvmerge v7.0.0 ('Where We Going')
> 32bit built on Jun 9 2014 15:08:34
> _STATISTICS_WRITING_DATE_UTC: 2015-06-06 05:57:02
> _STATISTICS_WRITING_DATE_UTC-eng: 2015-06-06 05:57:02
> _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> [subtitles @ 00000000005a9400] Unable to parse option value "鐢靛奖
> KB11-20-00.鍗¤淳鍩?Kajaki.2014.1080p.BluRay.x264.DTS-
> WiKiKajaki.2014.1080p.BluRay.x264.DTS-WiKi.srt" as image size
> Last message repeated 1 times
> [subtitles @ 00000000005a9400] Error setting option original_size to
> value 鐢靛奖KB11-20-00.鍗¤淳鍩?Kajaki.2014.1080p.BluRay.x264.DTS-
> WiKiKajaki.2014.1080p.BluRay.x264.DTS-WiKi.srt.
> [Parsed_subtitles_0 @ 00000000005a9320] Error applying options to the
> filter.
> [AVFilterGraph @ 0000000002cacf60] Error initializing filter 'subtitles'
> with args 'filename=E:鐢靛奖KB11-20-00.鍗¤淳鍩
> ?Kajaki.2014.1080p.BluRay.x264.DTS-WiKiKajaki.2014.1080p.BluRay.x264.DTS-
> WiKi.sr
> t'
> Error opening filters!
>
> '''Another test:'''
> I transcode a video file with a seperate subtile file.
> When I put the subtitle file in the same directory with the ffmpeg.exe
> program,it work correctly. But when I put the subtitle file in a
> different directory with the ffmpeg.exe program,it didn't work and return
> the above errors.
New description:
'''Summary of the bug:'''
ffmpeg can't load the subtitle file that isn't located in the same
directory with ffmpeg.exe
'''How to reproduce:'''
'''You can execute the following command:'''
{{{
D:\ffmpeg\bin>ffmpeg.exe -i E:\电影\KB11-20-00.卡贾基
.Kajaki.2014.1080p.BluRay.x264.DTS-WiKi\Kajaki.2014.1080p.BluRay.x264.DTS-
WiKi.mkv -vf "subtitles=:file=E:\电影\KB11-20-00.卡贾基
.Kajaki.2014.1080p.BluRay.x264.DTS-WiKi\Kajaki.2014.1080p.BluRay.x264.DTS-
WiKi.srt" -c:v
h264_nvenc -s 1280X720 -gpu 0 -b:v 1400k -c:a aac -b:a 65k -f mp4
E:\output\Kajaki.2014.1080p.BluRay.x264.DTS-WiKi.mp4
}}}
'''My environment is as follows:'''
ffmpeg version: the offical 64-bit static for windows
https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20160718-a49ed9e-
win64-static.zip
OS: Win2008 x64
Language: chs
CPU: Intel i7 4770K with iGPU driver
GPU: Nvidia Geforce GTX 750 Ti with 368.81 driver
'''The output:'''
{{{
D:\ffmpeg\bin>ffmpeg.exe -i E:\电影\KB11-20-00.卡贾基
.Kajaki.2014.1080p.BluRay.x264.DTS-WiKi\Kajaki.2014.1080p.BluRay.x264.DTS-
WiKi.mkv -vf "subtitles=filename=E:\电影\KB11-20-00.卡贾基.Kajaki.2014.
1080p.BluRay.x264.DTS-WiKi\Kajaki.2014.1080p.BluRay.x264.DTS-WiKi.srt"
-c:v h264_nvenc -s 1280X720 -gpu 0 -b:v 1400k -c:a aac -b:a 65k -f mp4
E:\output\Kajaki.2014.1080p.BluRay.x264.DTS-WiKi.mp4
ffmpeg version N-81043-ga49ed9e Copyright (c) 2000-2016 the FFmpeg
developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-
bzlib --enable-libebur128 --enable-fontconfig --enable-fre
i0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-libilbc --enable-libmodplug --enab
le-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-librtmp --enable-
libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspee
x --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-
libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-
libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink
--enable-zlib
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 50.100 / 57. 50.100
libavformat 57. 42.100 / 57. 42.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, matroska,webm, from 'E:\鐢靛奖\KB11-20-00.鍗¤淳鍩
?Kajaki.2014.1080p.BluRay.x264.DTS-WiKi\Kajaki.2014.1080p.BluRay.x264.DTS-
WiKi.mkv':
Metadata:
encoder : libebml v1.3.0 + libmatroska v1.4.1
creation_time : 2015-06-06 05:57:02
Duration: 01:48:15.21, start: 0.000000, bitrate: 12761 kb/s
Chapter #0:0: start 0.000000, end 633.208000
Metadata:
title : 00:00:00.000
Chapter #0:1: start 633.208000, end 910.125000
Metadata:
title : 00:10:33.208
Chapter #0:2: start 910.125000, end 1393.500000
Metadata:
title : 00:15:10.125
Chapter #0:3: start 1393.500000, end 1867.208000
Metadata:
title : 00:23:13.500
Chapter #0:4: start 1867.208000, end 2518.458000
Metadata:
title : 00:31:07.208
Chapter #0:5: start 2518.458000, end 3264.500000
Metadata:
title : 00:41:58.458
Chapter #0:6: start 3264.500000, end 3805.667000
Metadata:
title : 00:54:24.500
Chapter #0:7: start 3805.667000, end 4290.583000
Metadata:
title : 01:03:25.667
Chapter #0:8: start 4290.583000, end 4715.708000
Metadata:
title : 01:11:30.583
Chapter #0:9: start 4715.708000, end 5224.667000
Metadata:
title : 01:18:35.708
Chapter #0:10: start 5224.667000, end 5737.750000
Metadata:
title : 01:27:04.667
Chapter #0:11: start 5737.750000, end 6495.211000
Metadata:
title : 01:35:37.750
Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x802 [SAR 1:1 DAR
960:401], 24 fps, 24 tbr, 1k tbn, 48 tbc (default)
Metadata:
BPS : 11990786
BPS-eng : 11990786
DURATION : 01:48:15.209000000
DURATION-eng : 01:48:15.209000000
NUMBER_OF_FRAMES: 155885
NUMBER_OF_FRAMES-eng: 155885
NUMBER_OF_BYTES : 9735332999
NUMBER_OF_BYTES-eng: 9735332999
_STATISTICS_WRITING_APP: mkvmerge v7.0.0 ('Where We Going') 32bit
built on Jun 9 2014 15:08:34
_STATISTICS_WRITING_APP-eng: mkvmerge v7.0.0 ('Where We Going')
32bit built on Jun 9 2014 15:08:34
_STATISTICS_WRITING_DATE_UTC: 2015-06-06 05:57:02
_STATISTICS_WRITING_DATE_UTC-eng: 2015-06-06 05:57:02
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 768
kb/s (default)
Metadata:
title : English
BPS : 768000
BPS-eng : 768000
DURATION : 01:48:15.211000000
DURATION-eng : 01:48:15.211000000
NUMBER_OF_FRAMES: 608926
NUMBER_OF_FRAMES-eng: 608926
NUMBER_OF_BYTES : 623540292
NUMBER_OF_BYTES-eng: 623540292
_STATISTICS_WRITING_APP: mkvmerge v7.0.0 ('Where We Going') 32bit
built on Jun 9 2014 15:08:34
_STATISTICS_WRITING_APP-eng: mkvmerge v7.0.0 ('Where We Going')
32bit built on Jun 9 2014 15:08:34
_STATISTICS_WRITING_DATE_UTC: 2015-06-06 05:57:02
_STATISTICS_WRITING_DATE_UTC-eng: 2015-06-06 05:57:02
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[subtitles @ 00000000005a9400] Unable to parse option value "鐢靛奖
KB11-20-00.鍗¤淳鍩?Kajaki.2014.1080p.BluRay.x264.DTS-
WiKiKajaki.2014.1080p.BluRay.x264.DTS-WiKi.srt" as image size
Last message repeated 1 times
[subtitles @ 00000000005a9400] Error setting option original_size to value
鐢靛奖KB11-20-00.鍗¤淳鍩?Kajaki.2014.1080p.BluRay.x264.DTS-
WiKiKajaki.2014.1080p.BluRay.x264.DTS-WiKi.srt.
[Parsed_subtitles_0 @ 00000000005a9320] Error applying options to the
filter.
[AVFilterGraph @ 0000000002cacf60] Error initializing filter 'subtitles'
with args 'filename=E:鐢靛奖KB11-20-00.鍗¤淳鍩
?Kajaki.2014.1080p.BluRay.x264.DTS-WiKiKajaki.2014.1080p.BluRay.x264.DTS-
WiKi.sr
t'
Error opening filters!
}}}
'''Another test:'''
I transcode a video file with a seperate subtile file.
When I put the subtitle file in the same directory with the ffmpeg.exe
program,it work correctly. But when I put the subtitle file in a different
directory with the ffmpeg.exe program,it didn't work and return the above
errors.
--
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5758#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list