Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Support for subtitles while streaming #19102
Comments
|
After putting the right value for
I suspect the vlc subtitle auto-detection is buggy at the moment because I For myself, I use |
|
@alexvong1995: Augh! That's a bit long, and probably slow, since you have to request the video twice. However, I found out that it's better to watch this way, as eliminating the pipe makes it possible to jump in the video, see the video length, etc.
I'll leave the issue open for someone to suggest a way to get subtitles with this approach, or interest from the developers to add supports for this. PS! Good to know about |
|
@forthrin
forthrin <notifications@github.com> writes:
@alexvong1995: Augh! That's a bit long, and probably slow, since you have to request the
video twice.
However, I found out that it's better to watch this way, as eliminating the pipe makes it
possible to jump in the video, see the video length, etc.
vlc "$(youtube-dl --get-url 'https://www.youtube.com/watch?v=<id>')"
I'll leave the issue open for someone to suggest a way to get subtitles with this approach, or
interest from the developers to add supports for this.
I incorporate your suggestion into my last command:
id=<id>; lang=en; tmpfile=`mktemp "${TMPDIR:=/tmp}/tmp.XXXXXXXXXX"`; wget -O "$tmpfile" "https://www.youtube.com/api/timedtext?v=$id&lang=$lang&fmt=vtt" && vlc --play-and-exit --sub-file "$tmpfile" "$(youtube-dl -f best --get-url "https://www.youtube.com/watch?v=$id")"; rm -f "$tmpfile"
The command is now slightly less long. It uses 'wget' instead of
'youtube-dl' to download the sub, which is faster for me.
PS! Good to know about mpv!
I like the intuitive and minimalistic interface of mpv!
… —
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
This is much better! This should be useful for several people out there. This snippet would be very suitable for a FAQ or the manual pages. |
|
I'll close the issue, as it's probably not feasible to make |
Today you can stream videos like this:
It would be nice to be able to have subtitles when streaming. Something like: