Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It fails to load subtitle on occasion #2506

Closed
guopm opened this issue Nov 18, 2015 · 3 comments
Closed

It fails to load subtitle on occasion #2506

guopm opened this issue Nov 18, 2015 · 3 comments

Comments

@guopm
Copy link

guopm commented Nov 18, 2015

I am a user of bilidan, which uses mpv as backend to play videos online, loading subtitles locally (transformed by another script actually). When I use the lastest version of mpv(git-a319538) I am troubled that mpv isn't able to load subtitles anymore.

Here is the info of mpv on my computer:

mpv git-a319538 (C) 2000-2015 mpv/MPlayer/mplayer2 projects
 built on Wed Nov 18 14:19:31 CST 2015
ffmpeg library versions:
   libavutil       54.31.100
   libavcodec      56.60.100
   libavformat     56.40.101
   libswscale      3.1.101
   libavfilter     5.40.101
   libswresample   1.2.101
ffmpeg version: 2.8.2

Bilidan calls mpv like this way:

mpv --http-header-fields 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2 Fengfan/1.0' --no-video-aspect --sub-ass --sub-file /tmp/tmp-danmaku2ass-erf751eq.ass --vf 'lavfi="fps=fps=60:round=down"' -- 'http://cn-gdgz7-cmcc.acgvideo.com/vg6/2/d6/5096359-1.flv?expires=1447835100&ssig=RLY_NV4IhcCRJfdBl2AImg&oi=2028777101&appkey=85eb6835b0a1034e&or=2026199066&rate=0'

While /tmp/tmp-danmaku2ass-erf751eq.ass is the location of sub file. Then I get an error:

Can not open external file /tmp/tmp-danmaku2ass-erf751eq.ass.

But there IS that file actually:

-rw-------. 1 1000 1000 211366 Nov 18 14:26 /tmp/tmp-danmaku2ass-erf751eq.ass

Everything works fine when I downgrade to v0.13.0.

It is worth mentioning that both of them work fine with local videos and local subtiltle files.

My system info:
OS: Fedora 23 x86_64 with xfce4 DE
CPU: Intel(R) Core(TM) i5-3470
GPU: NVIDIA Geforce GTX 750 Ti, driver 352.63
MPV build options: ./waf configure --enable-libmpv-shared

Hope for fixing it as soon as possible.

@ghost
Copy link

ghost commented Nov 18, 2015

Shouldn't happen, and doesn't happen to me. Output with -v?

The file also might be broken. I recently switched the file reader from libass to ffmpeg, so that might be a reason.

@guopm
Copy link
Author

guopm commented Nov 19, 2015

Yeah you are right, I've found it contains one more blank line at the head of file.
subtitle that works fine starts with:

[Script Info]
...

subtitle converted by that script starts with:

<blank line>
[Script Info]
...

When I delete that blank line, problem solves^_^
I've fix that script and I'll try raising an issue for it. But I don't know much about the format of subtitle and doubt if a blank line at the head is bearable.

Thanks after all~

@ghost
Copy link

ghost commented Mar 7, 2016

Should work in ffmpeg 3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant