[FFmpeg-user] [OT] Unable to download a video

Moritz Barsnick barsnick at gmx.net
Wed Dec 10 09:54:21 CET 2014


On Tue, Dec 09, 2014 at 20:41:01 -0800, jd1008 wrote:
> There is a video that none of the known download
> tools are able to download. it gets streamed from
> within the url http://www.30thnovember.com/live/
> 
> If anyone can download this 3 hour video (which was
> streamed live on Nov 30th), I would really appreciate
> if I would be clued in on how it is done.
> 
> I trie youtube-dl, wget, and the firefox add-ons
> for video downloads. None of these tools worked.

This is wildly offtopic for this list. Let me hint you that there are a
couple of forums which discuss nothing but this matter.

You need to have some networking skills. My usual set of tools is
something like:

- looking at the HTML source
  - w3m -> view source
  - lynx -> view source
  - or most practical: firefox -> inspect element
- wireshark
  - launch wireshark before loading the video
  - load the video (shortly)
  - stop wireshark
  - search for .mp4, .flv, .m3u8, rtmp:// in the packet payload
  - try to reassemble a URL

Often, the difficult thing is figuring out an rtmp:// URL and its
parameters.

In your particular case, it's totally easy. Using firefox, I can see
that the video element is in an iframe, and that has this URL:
http://origin-qps.onstreammedia.com/origin/stratosphere/yogi/YogiEVENT_1.html

The source of that page contains two obvious strings:
url:'http://stratoshd-lh.akamaihd.net/z/YogiEVENT_1@108755/manifest.f4m',
ipadUrl:'http://stratoshd-lh.akamaihd.net/i/YogiEVENT_1@108755/master.m3u8'

I thought both URLs could be fed to ffmpeg directly (the former can't,
as we will figure out).
"ffmpeg -i" on the second one gives me:

Input #0, hls,applehttp, from 'http://stratoshd-lh.akamaihd.net/i/YogiEVENT_1@108755/master.m3u8':
  Duration: 01:29:41.12, start: 32892.432000, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 532000
    Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv), 640x360 [SAR 1:1 DAR 16:9], 30 tbr, 90k tbn, 60 tbc
    Metadata:
      variant_bitrate : 532000
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 16000 Hz, stereo, fltp, 31 kb/s
    Metadata:
      variant_bitrate : 532000
    Stream #0:2: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 532000
  Program 1
    Metadata:
      variant_bitrate : 532000
    Stream #0:3: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv), 640x360 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
    Metadata:
      variant_bitrate : 532000
    Stream #0:4: Audio: aac (LC) ([15][0][0][0] / 0x000F), 16000 Hz, stereo, fltp, 29 kb/s
    Metadata:
      variant_bitrate : 532000
    Stream #0:5: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 532000
At least one output file must be specified

You may want to select only one of the two program streams, such as program 1:
-map 0:p:1 -dn -c copy
("-dn" to disable the data stream)
or
-map 0:p:1:v -map 0:p:1:a -c copy

The other URL, the .f4m probably provides a stream with a higher
resolution. I needed wireshark to figure out how to access that
manifest file (turned out to be
'http://stratoshd-lh.akamaihd.net/z/YogiEVENT_1@108755/manifest.f4m?g=RPKZVCMKETWW&hdcore=3.2.0&plugin=flowplayer-3.2.0.1'
in my case). Furthermore, that is format is Adobe HTTP Dynamic
Streaming (HDS), which was mentioned on this list recently. Here is the
URL of a tool to handle that:
https://github.com/K-S-V/Scripts/wiki

Using it seems to work for me (but see below):
$ php AdobeHDS.php --quality high --manifest 'http://stratoshd-lh.akamaihd.net/z/YogiEVENT_1@108755/manifest.f4m?g=RPKZVCMKETWW&hdcore=3.2.0&plugin=flowplayer-3.2.0.1' --delete

                            KSV Adobe HDS Downloader

Processing manifest info....
Quality Selection:
 Available: 532
 Selected : 532
Fragments Total: 236229583, First: 236227839, Start: 236227839, Parallel: 8
Downloading 236229583/236229583 fragments
Found 0 fragments
Finished

Unfortunately, "Found 0 fragments" does not help.

Hope this helps a little,
have fun googling your way from this,
Moritz


More information about the ffmpeg-user mailing list