Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5754 closed defect (worksforme)

[Subtitle bug] I can't burn srt subtitles into the video

Reported by: bordon Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
When I transcode video (with a separate srt subtitle) on windows x64,it can't work correctly.

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
CPU: Intel i7 4770K with iGPU driver
GPU: Nvidia Geforce GTX 750 Ti with 368.81 driver

How to reproduce:
D:\ffmpeg\bin>ffmpeg.exe -i E:\movie\KB11-11-00.辛白林.Cymbeline.2014.1080p.BluRay.x264.DTS-WiKi\Cymbeline.2014.1080p.BluRay.x264.DTS-WiKi.mkv -vf "su
btitles=:filename=E:\movie\KB11-11-00.辛白林.Cymbeline.2014.1080p.BluRay.x264.DTS-WiKi\Cymbeline.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\Cymbeline.2014.1080p.BluRay.x264.DTS-WiKi.mp4

Return results:

[Parsed_subtitles_0 @ 0000000002c0f840] Shaper: FriBidi 0.19.6 (SIMPLE)
[Parsed_subtitles_0 @ 0000000002c0f840] Unable to open movieKB11-11-00.杈涚櫧鏋?Cymbeline.2014.1080p.BluRay.x264.DTS-WiKiCymbeline.2014.1080p.BluRay.x264.DTS-WiKi.srt
[AVFilterGraph @ 0000000002c1f040] Error initializing filter 'subtitles' with args ':filename=E:movieKB11-11-00.杈涚櫧鏋?Cymbeline.2014.1080p.BluRay.x264.DTS-WiKiCymbeline.2014.1080p.BluRay.
iKi.srt'
Error opening filters!

If transcode video only, it can work correctly.
After that, I consider perhaps i should use a slash in subtitle file path, so I try to use the following command:

D:\ffmpeg\bin>ffmpeg.exe -i E:\movie\KB11-11-00.辛白林.Cymbeline.2014.1080p.BluRay.x264.DTS-WiKi\Cymbeline.2014.1080p.BluRay.x264.DTS-WiKi.mkv -vf "su
btitles=:filename=E:/movie/KB11-11-00.辛白林.Cymbeline.2014.1080p.BluRay.x264.DTS-WiKi/Cymbeline.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\Cymbeline.2014.1080p.BluRay.x264.DTS-WiKi.mp4

But it return the following error:

[Parsed_subtitles_0 @ 0000000002bef840] Shaper: FriBidi 0.19.6 (SIMPLE)
[Parsed_subtitles_0 @ 0000000002bef840] Unable to open /movie/KB11-11-00.杈涚櫧鏋?Cymbeline.2014.1080p.BluRay.x264.DTS-WiKi/Cymbeline.2014.1080p.BluRay.x264.DTS-WiKi.srt
[AVFilterGraph @ 0000000002bff040] Error initializing filter 'subtitles' with args ':filename=E:/movie/KB11-11-00.杈涚櫧鏋?Cymbeline.2014.1080p.BluRay.x264.DTS-WiKi/Cymbeline.2014.1080p.BluRay.x264.DT
S-WiKi.srt'
Error opening filters!

Change History (8)

comment:1 by Carl Eugen Hoyos, 8 years ago

Analyzed by developer: unset
Keywords: Subtitle Bug removed
Priority: criticalnormal
Reproduced by developer: unset
Type: enhancementdefect

Is the issue reproducible if you rename the subtitle file to sub.srt? Please attach the subtitle file here.

Please provide command line including complete, uncut console output to make this a valid ticket.

in reply to:  1 comment:2 by bordon, 8 years ago

I have found the reason of the problem,It's the reason of libass library.
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 following errors:

[Parsed_subtitles_0 @ 0000000002bef840] Unable to open /movie/KB11-11-00.杈涚櫧鏋?Cymbeline.2014.1080p.BluRay?.x264.DTS-WiKi/Cymbeline?.2014.1080p.BluRay?.x264.DTS-WiKi?.srt

I'm looking forward the offical can solve the problem as soon as possible.

comment:3 by Carl Eugen Hoyos, 8 years ago

Resolution: worksforme
Status: newclosed

Please reopen this ticket if you can provide the command line you tested together with the complete, uncut console output and the subtitle file as an attachment for this ticket.

Opening subtitles files in another directory works fine here with current FFmpeg and the subtitle filter.

comment:4 by bordon, 8 years ago

My command line is as follows:
ffmpeg.exe -i E:\电影\KB11-21-00.王牌特工:特工学院.Kingsman.The.Secret.Service.2014.UNCUT.1080p.BluRay.x264.DTS-WiKi\Kingsman.The.Secret.Service.2014.UNCUT.1080p.BluRay.x264.DTS-WiKi.mkv -vf "subtitles=:filename=E:\电影\KB11-21-00.王牌特工:特工学院.Kingsman.The.Secret.Service.2014.UNCUT.1080p.BluRay.x264.DTS-WiKi\Kingsman.The.Secret.Service.2014.UNCUT.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\Kingsman.The.Secret.Service.2014.UNCUT.1080p.BluRay.x264.DTS-WiKi.mp4

comment:5 by Cigaes, 8 years ago

You need to fix the colons in your command line.

comment:6 by bordon, 8 years ago

Replying to Cigaes:
Can you give me the correct command line?
Thanks.

Last edited 8 years ago by bordon (previous) (diff)

comment:8 by bordon, 8 years ago

I execute the follow command is the same error:
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=D:/ffmpeg/bin/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-WiKi5.mp4

[subtitles @ 0000000002a9f960] Unable to parse option value "/ffmpeg/bin/Kajaki.2014.1080p.BluRay.x264.DTS-WiKi.srt" as image size

Last message repeated 1 times

[subtitles @ 0000000002a9f960] Error setting option original_size to value /ffmpeg/bin/Kajaki.2014.1080p.BluRay.x264.DTS-WiKi.srt.
[Parsed_subtitles_0 @ 0000000002ccf620] Error applying options to the filter.
[AVFilterGraph @ 0000000002aae0a0] Error initializing filter 'subtitles' with args 'filename=D:/ffmpeg/bin/Kajaki.2014.1080p.BluRay.x264.DTS-WiKi.srt'
Error opening filters!

Note: See TracTickets for help on using tickets.