Hello,
I am trying to use ffmpeg to download subtitles from rts.ch server (without video or audio, just subtitles).
When I type the command
ffmpeg -i "https://rts-vod-amd.akamaized.net/ch/hls/11939634/c312a730-29df-37c0-bcd0-fcd591e964fb/index-f7.m3u8?aka_me_session_id=AAAAAAAAAADOQCRgAAAAAKaR 0iPtqt2nCH%2fsXwUI%2fXToRAS8en0tZY%2fka7HtqKbzD168 Fkbs8KCtxez739Dp2GN9eIEHVO9%2f"
then it gives me the result:
[..]
Duration: 01:33:00.56, bitrate: 0 kb/s
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Subtitle: webvtt
Metadata:
variant_bitrate : 0
At least one output file must be specified
when I add output.vtt at the end of the command it results in:
Output #0, webvtt, to 'output.vtt':
Metadata:
encoder : Lavf58.65.101
Stream #0:0: Subtitle: webvtt
Metadata:
variant_bitrate : 0
encoder : Lavc58.119.100 webvtt
Stream mapping:
Stream #0:0 -> #0:0 (webvtt (native) -> webvtt (native))
Press [q] to stop, [?] for help
size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Which switches I should use with ffmpeg to properly download VTT or ideally SRT file?
Thanks in advance
EC
Try DVD-Fab Video Downloader and rip Netflix video! Or Try DVD-Fab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 16 of 16
Thread
-
-
Ok,i just tried downloading subs from a random video of that site and had no problems with FFMPEG, actually all you need to do is use a built in subtitle-codec argument:
-scodec (codec)
In this case this should work with no problem:
Code:ffmpeg.exe -i "https://rts-vod-amd.../ww/hls/..m3u8" -scodec srt output_subs.srt
Code:Input #0, hls, from 'https://rts-vod-amd.akamaized.net/ww/hls/.../index-f7.m3u8': Duration: 00:44:54.24, bitrate: 0 kb/s Program 0 Metadata: variant_bitrate : 0 Stream #0:0: Subtitle: webvtt Metadata: variant_bitrate : 0 Output #0, srt, to 'output_subs.srt': Metadata: encoder : Lavf58.45.100 Stream #0:0: Subtitle: subrip (srt) Metadata: variant_bitrate : 0 encoder : Lavc58.91.100 srt Stream mapping: Stream #0:0 -> #0:0 (webvtt (native) -> subrip (srt)) Press [q] to stop, [?] for help size= 55kB time=00:44:51.04 bitrate= 0.2kbits/s speed=7.19e+04x video:0kB audio:0kB subtitle:30kB other streams:0kB global headers:0kB muxing overhead: 79.925674%
-
Hello again,
Once again, encountering issue when trying to download these subtitles:
ffmpeg -i "https://rts-vod-amd.akamaized.net/ch/hls/11997514/8f3c162a-6224-3cac-8f47-788ef9fd24dc/index-f7.m3u8" -scodec srt meurtres_en_berry_subs.srt
It just stops on segment #27 and produces a small SRT file with first lines of subtitles.
[hls @ 0x562a658ec6c0] Opening 'crypto+https://rts-vod-amd.akamaized.net/ch/hls/11997514/8f3c162a-6224-3cac-8f47-788ef9fd24dc..._hls_version=3' for reading
[webvtt @ 0x562a65c4b200] Dropping 13 duplicated subtitle events
Input #0, hls, from 'https://rts-vod-amd.akamaized.net/ch/hls/11997514/8f3c162a-6224-3cac-8f47-788ef9fd24dc/index-f7.m3u8':
Duration: 01:34:32.48, bitrate: 0 kb/s
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Subtitle: webvtt
Metadata:
variant_bitrate : 0
File 'meurtres_en_berry_subs2.srt' already exists. Overwrite ? [y/N] y
Output #0, srt, to 'meurtres_en_berry_subs2.srt':
Metadata:
encoder : Lavf58.29.100
Stream #0:0: Subtitle: subrip (srt)
Metadata:
variant_bitrate : 0
encoder : Lavc58.54.100 srt
Stream mapping:
Stream #0:0 -> #0:0 (webvtt (native) -> subrip (srt))
Press [q] to stop, [?] for help
size= 0kB time=00:02:08.92 bitrate= 0.0kbits/s speed=2.39e+05x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 294.230774%
Any suggestion, please?
Kind regards
EC -
For grabbing the subtitles I use the M3U8 file provided it in my earlier email:
ffmpeg -i "https://rts-vod-amd.akamaized.net/ch/hls/11997514/8f3c162a-6224-3cac-8f47-788ef9fd24dc/index-f7.m3u8" -scodec srt meurtres_en_berry_subs.srt
Actual URL to movie: https://www.rts.ch/play/tv/telefilm/video/meurtres-en-berry?urn=urn:rts:video:11997514
regards
ECLast edited by ecolek; 27th Feb 2021 at 01:57.
-
try running your link through the firefox extension called "the stream detector" to grab the subtitles
-
I use this extension to determine *.m3u8 components on actual page with the movie, but it doesn't have the capability to merge set of *.vtt files (here 710 segments) into one SRT file.
I was able to use FFMPEG for this purpose for previous movies at RTS, but here it breaks after collection of ~27 segments.
Actual URL to movie: https://www.rts.ch/play/tv/telefilm/video/meurtres-en-berry?urn=urn:rts:video:11997514
regds
EC -
These specific subtitles are under DRM, unlike the previous ones. I guess it depends on the video you're trying to watch.
-
Is this one also DRM protected? How do you recognize there is such protection in place?
https://www.rts.ch/play/tv/telefilm/video/meurtres-a-mulhouse?urn=urn:rts:video:12003885
At the website the movie is normally displayed with the subtitles without any limitations.
Attempt of extracting subtitles below just stops after 20 segments without any particular reason:
ffmpeg -i "https://rts-vod-amd.akamaized.net/ch/hls/12003885/cd6616a8-b1bc-39f8-b900-53ab628eba9e/index-f7.m3u8" -scodec srt subs.srt
regards
EC -
Kinda they are,they have a line of:
Code:#EXT-X-KEY:METHOD=AES-128,URI="https://rts-vod-amd.akamaized.net/ch/hls/12003885/cd6616a8-b1bc-39f8-b900-53ab628eba9e/serve.key?aka_me_session_id=AAAAAAAAAAA1YkFgAAAAAHOWOaz2ok%2ffFiM3Jv2qx4hagFzLMlw6Fh5XK5GYA438d%2fNqLEjeZYmz8S9x0b85YAST5FbTZokk"
-
how can i download this vtt correctly .. because when i opened on subtitle edit show encrypted Code .. please any help
( https://content.hilalplay.com/caption/49d4de16-ff44-49cf-8f1f-c8a7f7952c41ar.vtt?t=eyJ...JD-il0nVO52EXg) -
Download/save/open index-f7.m3u8 (notepad++), AES-128 -> encryption
#EXTM3U
#EXT-X-TARGETDURATION:8
#EXT-X-ALLOW-CACHE:YES
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-KEY:METHOD=AES-128,URI="https://rts-vod-amd.akamaized.net/ch/hls/12003885/cd6616a8-b1bc-39f8-b900-53ab628eba9e/serve.key?aka_me_session_id=AAAAAAAAAAAvEVFgAAAAAA GKpFiilT9RnTb9BhuXGQaZfDswVQEw6QIH5FWznn32uGbtoMWd dk9W+TSk9wK+caobJqjy7T%2fA"
#EXTINF:8.000,
segment-1-f7.vtt?aka_me_session_id=AAAAAAAAAAAvEVFgAAAAAAGKpFiilT9 RnTb9BhuXGQaZfDswVQEw6QIH5FWznn32uGbtoMWddk9W+TSk9 wK+caobJqjy7T%2fA&aka_msn=1&aka_hls_version=3&aka_ media_format_type=hls
#EXTINF:8.000,
...
...
segment-674-f7.vtt?aka_me_session_id=AAAAAAAAAAAvEVFgAAAAAAGKpFiilT9 RnTb9BhuXGQaZfDswVQEw6QIH5FWznn32uGbtoMWddk9W+TSk9 wK+caobJqjy7T%2fA&aka_msn=674&aka_hls_version=3&ak a_media_format_type=hls
#EXT-X-ENDLIST
Run ffmpeg again, the srt should have 1300 lines, last timestamp should be 01:29:39,840 --> 01:29:44,840. Run it 2-3 times (test1.srt, test2.srt) and see if you get the same result (~27 segments). Sometimes I get the (full) subtitles the the first time sometimes after the 2nd or 3rd try.
@jagabo @Sviests By default ffmpeg (using 4.2.3) will download the subtitles without the need to specify -scodec (codec) and/or map and/or -an -vn, just an output with the srt extension. Also ffmpeg will take care of decrypting the (encrypted) vtt files.
ffmpeg -i "https://URL/subtitle.m3u8?tokenifpresent" MyMovie.srt
BTW It also works for vtt output: ffmpeg -i "https://yourURL2sub.m3u8" test-1.vtt
Output #0, webvtt, to 'test-1.vtt':
Metadata:
encoder : Lavf58.29.100
Stream #0:0: Subtitle: webvtt
Metadata:
variant_bitrate : 0
encoder : Lavc58.54.100 webvtt
Stream mapping:
Stream #0:0 -> #0:0 (webvtt (native) -> webvtt (native))
Press [q] to stop, [?] for help
size= 75kB time=01:29:39.84 bitrate= 0.1kbits/s speed=3.5e+05x
video:0kB audio:0kB subtitle:40kB other streams:0kB global headers:0kB muxing ov
erhead: 88.028938%Last edited by jojo; 15th Mar 2021 at 16:41.
-
Subtitles for "Meurtres en Berry" are not available anymore but for "Meurtres a Mulhouse" I still get the same result:
ffmpeg -i "https://rts-vod-amd.akamaized.net/ch/hls/12003885/cd6616a8-b1bc-39f8-b900-53ab628eba9e/index-f7.m3u8?aka_me_session_id=AAAAAAAAAABXtlFgAAAAAEQK yHGHTJWpgd2gS2hxNS28qcSh%2fyZjMulBbz27LbP4I3FelMPT li3UtkxFbJU5VOZ+vz5TnSwr&aka_media_format_type=hls " meurtres_en_mulhouse_subs_1.srt
ffmpeg version 4.3.2-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
[..]
[hls @ 0xc0e3940] Skip ('#EXT-X-ALLOW-CACHE:YES')
[hls @ 0xc0e3940] Skip ('#EXT-X-VERSION:3')
[hls @ 0xc0e3940] Opening 'https://rts-vod-amd.akamaized.net/ch/hls/12003885/cd6616a8-b1bc-39f8-b900-53ab628eba9e/serve.key?aka_me_session_id=AAAAAAAAAABXtlFgAAAAAE QKyHGHTJWpgd2gS2hxNS28qcSh%2fyZjMulBbz27LbP4I3FelM PTli3UtkxFbJU5VOZ+vz5TnSwr' for reading
[hls @ 0xc0e3940] Opening 'crypto+https://rts-vod-amd.akamaized.net/ch/hls/12003885/cd6616a8-b1bc-39f8-b900-53ab628eba9e...ormat_type=hls' for reading
[...]
[hls @ 0xc0e3940] Opening 'crypto+https://rts-vod-amd.akamaized.net/ch/hls/12003885/cd6616a8-b1bc-39f8-b900-53ab628eba9e...ormat_type=hls' for reading
Input #0, hls, from 'https://rts-vod-amd.akamaized.net/ch/hls/12003885/cd6616a8-b1bc-39f8-b900-53ab628eba9e/index-f7.m3u8?aka_me_session_id=AAAAAAAAAABXtlFgAAAAAEQK yHGHTJWpgd2gS2hxNS28qcSh%2fyZjMulBbz27LbP4I3FelMPT li3UtkxFbJU5VOZ+vz5TnSwr&aka_media_format_type=hls ':
Duration: 01:29:44.84, bitrate: 0 kb/s
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Subtitle: webvtt
Metadata:
variant_bitrate : 0
File 'meurtres_en_mulhouse_subs_1.srt' already exists. Overwrite? [y/N] y
Output #0, srt, to 'meurtres_en_mulhouse_subs_1.srt':
Metadata:
encoder : Lavf58.45.100
Stream #0:0: Subtitle: subrip (srt)
Metadata:
variant_bitrate : 0
encoder : Lavc58.91.100 srt
Stream mapping:
Stream #0:0 -> #0:0 (webvtt (native) -> subrip (srt))
Press [q] to stop, [?] for help
size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
ffmpeg -i "https://rts-vod-amd.akamaized.net/ch/hls/12003885/cd6616a8-b1bc-39f8-b900-53ab628eba9e/index-f7.m3u8?aka_me_session_id=AAAAAAAAAABXtlFgAAAAAEQK yHGHTJWpgd2gS2hxNS28qcSh%2fyZjMulBbz27LbP4I3FelMPT li3UtkxFbJU5VOZ+vz5TnSwr&aka_media_format_type=hls " -scodec srt meurtres_en_mulhouse_subs_1.srt
ffmpeg version 4.3.2-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
[..]
[hls @ 0xc2eb940] Skip ('#EXT-X-ALLOW-CACHE:YES')
[hls @ 0xc2eb940] Skip ('#EXT-X-VERSION:3')
[hls @ 0xc2eb940] Opening 'https://rts-vod-amd.akamaized.net/ch/hls/12003885/cd6616a8-b1bc-39f8-b900-53ab628eba9e/serve.key?aka_me_session_id=AAAAAAAAAABXtlFgAAAAAE QKyHGHTJWpgd2gS2hxNS28qcSh%2fyZjMulBbz27LbP4I3FelM PTli3UtkxFbJU5VOZ+vz5TnSwr' for reading
[hls @ 0xc2eb940] Opening 'crypto+https://rts-vod-amd.akamaized.net/ch/hls/12003885/cd6616a8-b1bc-39f8-b900-53ab628eba9e...ormat_type=hls' for reading
[..]
[hls @ 0xc2eb940] Opening 'crypto+https://rts-vod-amd.akamaized.net/ch/hls/12003885/cd6616a8-b1bc-39f8-b900-53ab628eba9e...ormat_type=hls' for reading
Input #0, hls, from 'https://rts-vod-amd.akamaized.net/ch/hls/12003885/cd6616a8-b1bc-39f8-b900-53ab628eba9e/index-f7.m3u8?aka_me_session_id=AAAAAAAAAABXtlFgAAAAAEQK yHGHTJWpgd2gS2hxNS28qcSh%2fyZjMulBbz27LbP4I3FelMPT li3UtkxFbJU5VOZ+vz5TnSwr&aka_media_format_type=hls ':
Duration: 01:29:44.84, bitrate: 0 kb/s
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Subtitle: webvtt
Metadata:
variant_bitrate : 0
File 'meurtres_en_mulhouse_subs_1.srt' already exists. Overwrite? [y/N] y
Output #0, srt, to 'meurtres_en_mulhouse_subs_1.srt':
Metadata:
encoder : Lavf58.45.100
Stream #0:0: Subtitle: subrip (srt)
Metadata:
variant_bitrate : 0
encoder : Lavc58.91.100 srt
Stream mapping:
Stream #0:0 -> #0:0 (webvtt (native) -> subrip (srt))
Press [q] to stop, [?] for help
size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Similar Threads
-
Extract WebVTT subtitles from m3u8 playlist.
By averageuser12 in forum Video Streaming DownloadingReplies: 3Last Post: 13th Oct 2020, 17:28 -
Downloading WebVTT/VTT Subtitles from M3u8 web sites?
By vega69-ux in forum Video Streaming DownloadingReplies: 6Last Post: 29th Sep 2020, 12:45 -
Webvtt Subtitles positioning
By SubtitleNoob in forum SubtitleReplies: 1Last Post: 27th Jul 2020, 13:14 -
How to merge segmented webvtt subtitle files and output to SRT file?
By smokeweedevryday in forum SubtitleReplies: 0Last Post: 8th Mar 2020, 10:29 -
Get segments from WEBVTT Playlist
By EmilFrom in forum Video Streaming DownloadingReplies: 2Last Post: 1st Jan 2018, 18:51