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

Forbes video download (hosted on Brigthcove) #11057

Open
thob opened this issue Oct 28, 2016 · 5 comments
Open

Forbes video download (hosted on Brigthcove) #11057

thob opened this issue Oct 28, 2016 · 5 comments

Comments

@thob
Copy link

@thob thob commented Oct 28, 2016

Possible to add? example: http://www.forbes.com/video/5118388570001/

@IDerr
Copy link

@IDerr IDerr commented Nov 1, 2016

Get the userid + token here
userid + policytoken
And then get with the header

https://edge.api.brightcove.com/playback/v1/accounts/{userid}/videos/{videoid}
ex : https://edge.api.brightcove.com/playback/v1/accounts/2097119709001/videos/5118388570001

Curl command :
curl 'https://edge.api.brightcove.com/playback/v1/accounts/2097119709001/videos/5118388570001' - -H 'Accept: application/json;pk=BCpkADawqM0-G5-DWC1YBItrQpbHMmduUmORMn1zqXbI51aL_8oYgnW6FKK6tG4YKHnTYr3j89gv68LY_J3PFJtW3hWfBV4TFF0nj1tOhpF5RqiIgeEWEij0gE1eSgiwnGWDyRJRa23G7Qjz'

Good JSON 💃
result

Just posting here as a reminder or if someone wants to implement it ;)

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 2, 2016

Here's a simipler way. Check this line in webpage source:

<meta name="twitter:player" content="https://players.brightcove.net/2097119709001/598f142b-5fda-4057-8ece-b03c43222b3f_default/index.html?videoId=5118388570001" />

And download it:

youtube-dl "https://players.brightcove.net/2097119709001/598f142b-5fda-4057-8ece-b03c43222b3f_default/index.html?videoId=5118388570001"
@IDerr
Copy link

@IDerr IDerr commented Nov 2, 2016

Yes, but if we want different sources (480p,720p), description,duration etc..

It'll be easier to parse the json.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 2, 2016

Well, those JSON parsing stuff are already in brightcove.py

$ youtube-dl -vF "https://players.brightcove.net/2097119709001/598f142b-5fda-4057-8ece-b03c43222b3f_default/index.html?videoId=5118388570001"                                      
[debug] System config: []                            
[debug] User config: []                                               
[debug] Command-line args: ['-vF', 'https://players.brightcove.net/2097119709001/598f142b-5fda-4057-8ece-b03c43222b3f_default/index.html?videoId=5118388570001']                                                              
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8                      
[debug] youtube-dl version 2016.11.02                 
[debug] Git HEAD: cc99a77                             
[debug] Python version 3.5.2 - Linux-4.8.4-1-ARCH-x86_64-with-arch                    
[debug] exe versions: ffmpeg 3.2, ffprobe 3.2, rtmpdump 2.4                           
[debug] Proxy map: {}                                 
[brightcove:new] 5118388570001: Downloading webpage   
[brightcove:new] 5118388570001: Downloading JSON metadata                              
[brightcove:new] 5118388570001: Downloading m3u8 information                           
[info] Available formats for 5118388570001:           
format code                extension  resolution note                                  
hls-meta                   mp4        multiple   Quality selection URL                        
hls-511                    mp4        480x270     511k
http-streaming-511k-270p   mp4        480x270     511k , MP4 container, H264, 29.45MiB
http-511k-270p             mp4        480x270     511k , MP4 container, H264, 29.45MiB
hls-792                    mp4        640x360     792k                                                                                  hls-993                    mp4        640x360     993k
http-streaming-994k-360p   mp4        640x360     994k , MP4 container, H264, 57.10MiB
http-994k-360p             mp4        640x360     994k , MP4 container, H264, 57.10MiB
hls-1291                   mp4        960x540    1291k
hls-1825                   mp4        960x540    1825k
http-streaming-1825k-540p  mp4        960x540    1825k , MP4 container, H264, 104.63MiB
http-1825k-540p            mp4        960x540    1825k , MP4 container, H264, 104.63MiB
hls-2623                   mp4        1280x720   2623k                                                                                  http-streaming-3123k-720p  mp4        1280x720   3123k , MP4 container, H264, 178.86MiB
http-3123k-720p            mp4        1280x720   3123k , MP4 container, H264, 178.86MiB (best)

$ youtube-dl --get-description "https://players.brightcove.net/2097119709001/598f142b-5fda-4057-8ece-b03c43222b3f_default/index.html?videoId=5118388570001"                                                                                                                  
COO and marketing chief talks Hamsters, Soul and why TV advertising still scores big for the brand.
@IDerr
Copy link

@IDerr IDerr commented Nov 2, 2016

oh, my bad, so yes it's easier 😀

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.