zackronixxx / get-flash-videos

Automatically exported from code.google.com/p/get-flash-videos
0 stars 0 forks source link

pbs.pm failed to work #484

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
$ ./get_flash_videos http://video.pbs.org/video/2355017821/
Using method 'pbs' for http://video.pbs.org/video/2355017821/
Downloading http://video.pbs.org/video/2355017821/
RTMPDump 2.4pl2
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO:   duration              783.60
INFO:   moovPosition          32.00
INFO:   width                 640.00
INFO:   height                360.00
INFO:   videocodecid          avc1
INFO:   audiocodecid          mp4a
INFO:   avcprofile            77.00
INFO:   avclevel              31.00
INFO:   aacaot                2.00
INFO:   videoframerate        29.97
INFO:   audiosamplerate       44100.00
INFO:   audiochannels         2.00
INFO: trackinfo:
INFO:   length                23506483.00
INFO:   timescale             30000.00
INFO:   language              und
INFO: sampledescription:
INFO:   sampletype            avc1
INFO:   length                34556928.00
INFO:   timescale             44100.00
INFO:   language              und
INFO: sampledescription:
INFO:   sampletype            mp4a
Shields_and_Brooks_on_Obama_in_the_Mideast,_GOP_in_Overhaul.flv: 3% (2657.72 / 
80537.09 KiB)^C

That works from here without the use of a proxy.

The other url also works from here.
$ perl get_flash_videos http://video.pbs.org/video/2360819929                   

Using method 'pbs' for http://video.pbs.org/video/2360819929
Downloading http://video.pbs.org/video/2360819929
RTMPDump 2.4pl2
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO:   duration              3280.00
INFO:   moovPosition          32.00

This is using OpenBSD amd64 current. With the latest versions.

Try this site without the proxy.

Original issue reported on code.google.com by morrla...@gmail.com on 27 Mar 2013 at 3:32

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
That suggests you need a proxy but why, if available on internet for me, maybe 
accessing from work? Could try a socks proxy if one is available. Using --debug 
the rtmpdump command is this:-

Running rtmpdump --verbose --pageUrl 'http://video.pbs.org/video/2355017821/' 
--rtmp 
'rtmp://sdwfchwqitj2v.cloudfront.net/cfx/st/mp4:cove2.0/newshour/e950cc77-91c2-4
b27-9e16-c83ca10fd6d7/hd-mezzanine-16x9/20130322_shieldsbrooksYT-16x9-mp4-800k.m
p4' --flv 'Shields_and_Brooks_on_Obama_in_the_Mideast,_GOP_in_Overhaul.flv' 
--swfUrl 'http://www-tc.pbs.org/video/media/swf/PBSPlayer.swf?18809'

If I use a socks proxy, then rtmpdump uses a socks proxy for the download...

$ perl get_flash_videos --debug --proxy socks://127.0.0.1:8087 
http://video.pbs.org/video/2355017821/
......
Using proxy server socks://127.0.0.1:8087
FlashVideo::RTMPDownloader=HASH(0xcfb4b354d30)
Running rtmpdump --verbose --resume --pageUrl 
'http://video.pbs.org/video/2355017821/' --rtmp 
'rtmp://sdwfchwqitj2v.cloudfront.net/cfx/st/mp4:cove2.0/newshour/e950cc77-91c2-4
b27-9e16-c83ca10fd6d7/hd-mezzanine-16x9/20130322_shieldsbrooksYT-16x9-mp4-800k.m
p4' --flv 'Shields_and_Brooks_on_Obama_in_the_Mideast,_GOP_in_Overhaul.flv' 
--socks '127.0.0.1:8087' --swfUrl 
'http://www-tc.pbs.org/video/media/swf/PBSPlayer.swf?18809'
......

You can't use a http proxy for rtmpdump.

I used ssh -D 8087 host to create my socks proxy.

From the F: that looks to be windows. Some things to check
1. Version of rtmpdump - ensure you have a recent version, some older 2.4 
versions fail. Run with debug, and upload output to a site, and provide a link.
2. get_flash_videos which version, there have been changes to the proxy code a 
few months ago.
3. Does the site work from a browser.
4. Try the rtmpdump commands direct

Original comment by njtaylor...@gmail.com on 4 Apr 2013 at 3:59

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
What is the difference between the rtmpdump used by get_flash_videos and the 
parameters your using from rtmpdumphelper.

Some sites may work using the Generic method, there is nothing specific for 
National Geographic, there may have been past requests.

This doesn't work...

get_flash_videos 
http://video.nationalgeographic.com/video/news/space-technology-news/predicting-
meteorite-impacts-vin/

But looking at page....

var vpOptions = new NGPlayer.Options({
.....
swfURL: ('http://images.nationalgeographic.com/wpf/' === '/static/') ? 
'http://' + window.location.host + 
'http://images.nationalgeographic.com/wpf/sites/video/swf/ngplayer_v2.5.swf': 
'http://images.nationalgeographic.com/wpf/sites/video/swf/ngplayer_v2.5.swf',
    adenabled:getQueryParam('adenabled'),
    adprogramid: '4a67dd6268de7',

    HTML5src:'/video/player/media-mp4/predicting-meteorite-impacts-vin/mp4/variant-playlist.m3u8'
....

Download playlist....

http://video.nationalgeographic.com/video/player/media-mp4/predicting-meteorite-
impacts-vin/mp4/variant-playlist.m3u8

That contains playlists for different bandwidths. Selecting one

http://h5media.nationalgeographic.com/video/player/media-mp4/predicting-meteorit
e-impacts-vin/mp4/predicting-meteorite-impacts-vin_660/index0.m3u8

That contains playlist, with chunks

predicting-meteorite-impacts-vin_220_layer0_8000000_0.ts
....
predicting-meteorite-impacts-vin_220_layer0_8000000_12.ts

chunks can be downloaded...
http://h5media.nationalgeographic.com/video/player/media-mp4/predicting-meteorit
e-impacts-vin/mp4/predicting-meteorite-impacts-vin_660/predicting-meteorite-impa
cts-vin_220_layer0_8000000_0.ts

Combining chunks gives the video, Downloading and combining m3u8 has been done 
before, for another site, using ffmpeg.

So very possible to add support. PS That chunk plays only a few seconds worth.

Original comment by njtaylor...@gmail.com on 5 Apr 2013 at 11:02

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Both would need to be supported... For the full episode... found these lines...

.......
<meta property="og:video" 
content="http://channelhd-f.akamaihd.net/mpx/video/Nat_Geo_Channels/15/408/15097
718_The_Third_Sex_B_015.flv" />

.......
  <div id="ngs_video" class="ngs_video" data-require="ngsPlayer" data-options='{ "slug": "http://channelhd-f.akamaihd.net/mpx/video/Nat_Geo_Channels/15/408/15097718_The_Third_Sex_B_015.flv", "permalink": "http://channel.nationalgeographic.com/channel/taboo/videos/the-third-sex/", "width": "610", "height": "374", "siteid": "mainplayer", "adenabled": "true", "poster": "//channel.nationalgeographic.com/exposure/content/photo/photo/435208_the-third-sex49_epsicuaitwlfo42x7yedw6mpvtncurxrbvj6lwuht2ya6mzmafma_610x374.jpg","title":"The Third Sex","cuepoints": "783,1243,1751,2192", "restricted": "US" }'>
.......

Downloading  
http://channelhd-f.akamaihd.net/mpx/video/Nat_Geo_Channels/15/408/15097718_The_T
hird_Sex_B_015.flv is what's required.
Seems to be restrictied to US. Tried and halts after 7Mb, so might be limited 
to this outside US, or splits on the cuepoints, or needs something additional 
to download the complete episode.

Example attached - does the first 7Mb(at least here). Place in either 
.get_flash_videos/plugins or lib/FlashVideo/Site.

Original comment by njtaylor...@gmail.com on 5 Apr 2013 at 5:15

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
It doesn't have a m3u8, it does have this

http://channelhd-f.akamaihd.net/channel/feed/00513/08353_00_the-medical-hero_015
.flv

With the previous attached site plugin

$ perl -Ilib ./get_flash_videos 
http://channel.nationalgeographic.com/channel/videos/the-medical-heroin-experime
nt/ 
Using method 'nationalgeographic' plugin version 0.00 for 
http://channel.nationalgeographic.com/channel/videos/the-medical-heroin-experime
nt/
Downloading 
http://channel.nationalgeographic.com/channel/videos/the-medical-heroin-experime
nt/
Downloading 
http://channelhd-f.akamaihd.net/channel/feed/00513/08353_00_the-medical-hero_015
.flv...
The_Medical_Heroin_Experiment___National_Geographic_Channel.flv: 0% (1738.48 / 
2097152.00 KiB)^C

Stops after 7.9Mb from here, doesn't appear to have restrictions, maybe needs a 
login or something. Same in browser only see around 50sec of the video.

Original comment by njtaylor...@gmail.com on 7 Apr 2013 at 12:28