Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th February 2016, 18:58   #1  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 680
How to open protected hls-streams with FFMpeg?

Hello,
It's been quite some time since I last visited the forum, but now I'm having some difficulty opening protected hls-streams with FFMpeg and I was wondering if anyone knows how to open them.

The manifest-playlist opens just fine:
Code:
ffmpeg-20160127-git-9079e99.exe -hide_banner -i "https://kalturahd-vh.akamaihd.net/i/content/r71v1/entry/
data/412/112/1_yjrbfoc0_0_,e1d20ia2,r7mao8mk,ybgd4av0,439hamb1,3lu536fi,8ojsff0g,_2.mp4.csmil/master.m3u8"
Input #0, hls,applehttp, from 'https://kalturahd-vh.akamaihd.net/i/content/r71v1/entry/data/412/112/
1_yjrbfoc0_0_,e1d20ia2,r7mao8mk,ybgd4av0,439hamb1,3lu536fi,8ojsff0g,_2.mp4.csmil/master.m3u8':
  Duration: 00:21:35.00, start: 0.100511, bitrate: 0 kb/s
  Program 0
    Metadata:
      variant_bitrate : 463000
    Stream #0:0: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 480x272 [SAR 1:1 DAR 30:17], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 463000
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 70 kb/s
    Metadata:
      variant_bitrate : 463000
    Stream #0:2: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 463000
  Program 1
    Metadata:
      variant_bitrate : 663000
    Stream #0:3: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 663000
    Stream #0:4: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 70 kb/s
    Metadata:
      variant_bitrate : 663000
    Stream #0:5: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 663000
  Program 2
    Metadata:
      variant_bitrate : 960000
    Stream #0:6: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 960000
    Stream #0:7: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 70 kb/s
    Metadata:
      variant_bitrate : 960000
    Stream #0:8: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 960000
  Program 3
    Metadata:
      variant_bitrate : 1599000
    Stream #0:9: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1024x576 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 1599000
    Stream #0:10: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      variant_bitrate : 1599000
    Stream #0:11: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 1599000
  Program 4
    Metadata:
      variant_bitrate : 2620000
    Stream #0:12: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 2620000
    Stream #0:13: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      variant_bitrate : 2620000
    Stream #0:14: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 2620000
  Program 5
    Metadata:
      variant_bitrate : 3711000
    Stream #0:15: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 3711000
    Stream #0:16: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      variant_bitrate : 3711000
    Stream #0:17: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 3711000
But FFMpeg can't open the individual hls-streams, that have a base64-encoded ID behind it:
Code:
ffmpeg-20160127-git-9079e99.exe -hide_banner -i "https://kalturahd-vh.akamaihd.net/i/content/r71v1/entry/
data/412/112/1_yjrbfoc0_0_,e1d20ia2,r7mao8mk,ybgd4av0,439hamb1,3lu536fi,8ojsff0g,_2.mp4.csmil/index_4_av.m3u8
?null=&id=AgBQZTEFUl7qX/uuxFaLKgUeCYU2STy68HxQ+ser/EQsUQG/CJFYD3jQn5TTbGrQmXUxYhsCHuHn7g=="
https://kalturahd-vh.akamaihd.net/i/content/r71v1/entry/data/412/112/1_yjrbfoc0_0_,e1d20ia2,r7mao8mk,
ybgd4av0,439hamb1,3lu536fi,8ojsff0g,_2.mp4.csmil/index_4_av.m3u8?null=&id=AgBQZTEFUl7qX/uuxFaLKgUeC
YU2STy68HxQ+ser/EQsUQG/CJFYD3jQn5TTbGrQmXUxYhsCHuHn7g==: Invalid data found when processing input
The "LAV Splitter Source"-filter can open this hls-stream no problem, so obviously FFMpeg should be able to as well. Do I need to use some additional input options with FFMpeg perhaps? A custom header perhaps? Does anyone know?
__________________
My hobby website
Reino is offline   Reply With Quote
Old 17th February 2016, 20:40   #2  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,142
Try a more recent build, there was a bug a while ago that broke URLs with custom parameters.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 17th February 2016, 21:29   #3  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 680
Code:
ffmpeg-20160216-git-2e8ad2d.exe -hide_banner -i "https://kalturahd-vh.akamaihd.net/i/content/r71v1/entry/
data/412/112/1_yjrbfoc0_0_,e1d20ia2,r7mao8mk,ybgd4av0,439hamb1,3lu536fi,8ojsff0g,_2.mp4.csmil/index_4_av.m3u8
?null=&id=AgBQZTEFUl7qXkvWxFbyQnt7tU93pObXDt8XWfeC0oQFH66pw6UnxTa/Wf1HGgbfcgtlc6SFqcsapg=="
[hls,applehttp @ 035de700] Failed to open segment of playlist 0 
    Last message repeated 129 times
[hls,applehttp @ 035de700] Error when loading first segment 'http://kalturahd-vh.akamaihd.net/i/content/r71v1/
entry/data/412/112/1_yjrbfoc0_0_,e1d20ia2,r7mao8mk,ybgd4av0,439hamb1,3lu536fi,8ojsff0g,_2.mp4.csmil/
segment1_4_av.ts?null=&id=AgBQZTEFUl7qXkvWxFbyQnt7tU93pObXDt8XWfeC0oQFH66pw6UnxTa/Wf1HGgbfcgtlc6SFqcsapg=='
https://kalturahd-vh.akamaihd.net/i/content/r71v1/entry/data/412/112/1_yjrbfoc0_0_,e1d20ia2,r7mao8mk,
ybgd4av0,439hamb1,3lu536fi,8ojsff0g,_2.mp4.csmil/index_4_av.m3u8?null=&id=AgBQZTEFUl7qXkvWxFbyQnt7t
U93pObXDt8XWfeC0oQFH66pw6UnxTa/Wf1HGgbfcgtlc6SFqcsapg==: Invalid data found when processing input
__________________
My hobby website
Reino is offline   Reply With Quote
Old 18th February 2016, 18:10   #4  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 680
I'll head over to the FFMpeg bug tracker, as this is clearly still a bug then.
__________________
My hobby website
Reino is offline   Reply With Quote
Old 19th March 2016, 21:27   #5  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 680
Issue fixed and fix confirmed. Thanks, Hendrik!
__________________
My hobby website
Reino is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.