Closed GoogleCodeExporter closed 8 years ago
What steps will reproduce the problem?
1.get_flash_videos
'http://presstv.com/detail/2012/09/29/264172/syria-opposition-pawn-in-foreign-ha
nds/'
2.
3.
What is the expected output? What do you see instead?
Expected: Video Downloads
Error: No URLs found at /usr/share/perl5/FlashVideo/Generic.pm line 129.
Couldn't extract Flash movie URL. This site may need specific support adding,
or fixing.
What version of the product are you using? On what operating system?
get_flash_videos version 1.24
Linux Mint; 3.2.0-31-generic
Original comment by l...@pot.com
on 30 Sep 2012 at 4:32
Look at the page source I chose - this bit looks interesting...
SWFObject('http://www.presstv.ir/player/player.swf', 'single', '650', '366',
'0');so.addVariable('streamer',
'rtmp://64.150.186.181/vod');so.addParam('allowfullscreen',
'true');so.addVariable('file',
'presstv/newsroom/20121001/mp4:02-48-16-ftp-mat-p-sanaa.mp4');so.addVariable('im
age',
'http://previous.presstv.ir/photo/20120930/reportint20120930191644753.jpg');so.a
ddParam('wmode','transparent');so.addVariable('autostart',
'true');so.addVariable('stretching', 'exactfit');so.addVariable('controlbar',
'over');so.write('mediaspace');var player;function playerReady(obj) {player =
$(obj.id);addListeners();};function addListeners()
{player.addModelListener('TIME', 'timeMonitor');};function timeMonitor(obj)
swf file, rtmp - what rtmpdump downloads, mp4 - video format.
One way to get rtmpdump parameters is to run browser with rtmpsrv listening
traffic directed to it, on linux use this...
iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner rtmp \
-j REDIRECT
then up pops a rtmpdump command line. Like so...
rtmp@stoney:~$ rtmpsrv
RTMP Server 2.4-git-20120414
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL
Streaming on rtmp://0.0.0.0:1935
WARNING: Trying different position for client digest!
rtmpdump -r "rtmp://64.150.186.181/vod" -a "vod" -f "LNX 11,3,31,331" -W
"http://www.presstv.ir/player/player.swf" -p
"http://presstv.com/detail/2012/10/01/264359/yemenisgovernmentwealthcorruption/"
-y "presstv/newsroom/20121001/mp4:02-48-16-ftp-mat-p-sanaa.mp4" -o
mp4_02-48-16-ftp-mat-p-sanaa.flv
Closing connection... done!
RTMPDump 2.4-git-20120414
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO: trackinfo:
INFO: timescale 2997.00
INFO: length 377000.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype avc1
INFO: timescale 48000.00
INFO: length 6034432.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype mp4a
INFO: audiochannels 2.00
INFO: audiosamplerate 48000.00
INFO: videoframerate 29.97
INFO: aacaot 2.00
INFO: avclevel 13.00
INFO: avcprofile 77.00
INFO: audiocodecid mp4a
INFO: videocodecid avc1
INFO: width 640.00
INFO: height 360.00
INFO: frameWidth 640.00
INFO: frameHeight 360.00
INFO: displayWidth 640.00
INFO: displayHeight 360.00
INFO: moovposition 14498198.00
Then it's a question of extracting from the source page the parts to make up
the rtmpdump command. You see what I picked out from the source pape + url
supplied give all the parameters apart from -f which is just the flash player
version for the browser and can be a fixed string. Match on SWFObject( in
source page as the starting point extract the various chunks from there on.
Original comment by njtaylor...@gmail.com
on 1 Oct 2012 at 1:13
I got an error when running quote "iptables -t nat -A OUTPUT -p tcp --dport
1935 -m owner \! --uid-owner rtmp \"
owner: Could not determine whether revision 1 is supported, assuming it is.
iptables v1.4.12: owner: Bad value for "--uid-owner" option: "rtmp"
Try `iptables -h' or 'iptables --help' for more information.
I'm a very basic linux users so, please bare with me. Thank you for your
prompt response. I can use the information you've provided and basically
switch out urls... but having a sniffer automatically grab the footage would be
preferable. Is there anything I am doing wrong here with the commands?
Original comment by l...@pot.com
on 1 Oct 2012 at 4:55
You have to create a user rtmp, any traffic to port 1935 is redirected unless
it is from the user rtmp. The rtmpsrv has to be run under the user rtmp to
avoid redirection.
Using rtmpsrv/rtmpdump is described in some of the forums, one example.
http://stream-recorder.com/forum/use-rtmpdump-rtmpsrv-linux-t7661p2.html
To remove redirection afterwards use -F to flush..
iptables -t nat -F
To list use -L
iptables -t nat -L
Original comment by njtaylor...@gmail.com
on 1 Oct 2012 at 12:17
Attached first trial plugin copy this to the directory
~/.get_flash_videos/plugins as Presstv.pm, only done some tests on a single
video download appears to work. Some installs of get_flash_videos don't support
additional plugins...
$ get_flash_videos
http://www.presstv.com/detail/2012/10/01/264500/journalistsattacksomalia/
Using method 'presstv' for
http://www.presstv.com/detail/2012/10/01/264500/journalistsattacksomalia/
Downloading
http://www.presstv.com/detail/2012/10/01/264500/journalistsattacksomalia/
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: trackinfo:
INFO: timescale 2997.00
INFO: length 511500.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype avc1
INFO: timescale 48000.00
INFO: length 8188928.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype mp4a
INFO: audiochannels 2.00
INFO: audiosamplerate 48000.00
INFO: videoframerate 29.97
INFO: aacaot 2.00
INFO: avclevel 13.00
INFO: avcprofile 77.00
INFO: audiocodecid mp4a
INFO: videocodecid avc1
INFO: width 640.00
INFO: height 360.00
INFO: frameWidth 640.00
INFO: frameHeight 360.00
INFO: displayWidth 640.00
INFO: displayHeight 360.00
INFO: moovposition 20755555.00
INFO: duration 170.67
mp4_01-25-00-ftp-aba-p-mogadishu.mp4.flv: 5% (1358.21 / 24694.69 KiB)^C
$
Original comment by njtaylor...@gmail.com
on 2 Oct 2012 at 12:55
Attachments:
get_flash_videos -debug
http://www.presstv.com/detail/2012/09/30/264213/canadianscriticaharperaward/
1 plugin installed:
- Presstv.pm
Downloading
http://www.presstv.com/detail/2012/09/30/264213/canadianscriticaharperaward/
-> GET
http://www.presstv.com/detail/2012/09/30/264213/canadianscriticaharperaward/
<- 200 text/html (16815)
Trying to open plugin ~/.get_flash_videos/plugins/Www.pm
Trying to open plugin ~/.get_flash_videos/plugins/Presstv.pm
Using method 'presstv' for
http://www.presstv.com/detail/2012/09/30/264213/canadianscriticaharperaward/
RTMP output filename 'mp4_19-05-00-ftp-jbn-p-calgary.mp4.flv' already exists,
asking to resume...
FlashVideo::RTMPDownloader=HASH(0x211c198)
Running rtmpdump --verbose --resume --pageUrl
'http://www.presstv.com/detail/2012/09/30/264213/canadianscriticaharperaward/'
--app 'vod' --rtmp 'rtmp://64.150.186.181/vod' --flv
'mp4_19-05-00-ftp-jbn-p-calgary.mp4.flv' --swfVfy
'http://www.presstv.ir/player/player.swf' --playpath
'presstv/newsroom/20120929/mp4:19-05-00-ftp-jbn-p-calgary.mp4'
RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
rtmpdump: DEBUG: Parsing...
rtmpdump: DEBUG: Parsed protocol: 0
rtmpdump: DEBUG: Protocol : RTMP
9-05-00-ftp-jbn-p-calgary.mp4
DEBUG: tcUrl : rtmp://64.150.186.181:1935/vod
DEBUG: swfUrl : http://www.presstv.ir/player/player.swf
DEBUG: pageUrl :
http://www.presstv.com/detail/2012/09/30/264213/canadianscriticaharperaward/
DEBUG: app : vod
DEBUG: live : no
DEBUG: timeout : 30 sec
DEBUG: SWFSHA256:
DEBUG: 2b c9 f7 88 93 bc de 8a 87 6a 78 f2 23 27 67 a5
DEBUG: e4 ed 84 5f 2a 10 ab 1b d9 a4 fd 81 f7 e9 0e 4e
DEBUG: SWFSize : 213641
rtmpdump: DEBUG: (object begin)
ject begin)
DEBUG: Property: <Name: timescale, NUMBER: 2997.00>
DEBUG: Property: <Name: length, NUMBER: 478400.00>
DEBUG: Property: <Name: language, STRING: eng>
DEBUG: Property: <Name: sampledescription, OBJECT>
DEBUG: (object begin)
DEBUG: (object begin)
DEBUG: Property: <Name: sampletype, STRING: avc1>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: (object end)
DEBUG: (object begin)
DEBUG: Property: <Name: timescale, NUMBER: 48000.00>
DEBUG: Property: <Name: length, NUMBER: 7658496.00>
DEBUG: Property: <Name: language, STRING: eng>
DEBUG: Property: <Name: sampledescription, OBJECT>
DEBUG: (object begin)
DEBUG: (object begin)
DEBUG: Property: <Name: sampletype, STRING: mp4a>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: (object end)
DEBUG: (object end)
DEBUG: Property: <Name: audiochannels, NUMBER: 2.00>
DEBUG: Property: <Name: audiosamplerate, NUMBER: 48000.00>
DEBUG: Property: <Name: videoframerate, NUMBER: 29.97>
DEBUG: Property: <Name: aacaot, NUMBER: 2.00>
DEBUG: Property: <Name: avclevel, NUMBER: 13.00>
DEBUG: Property: <Name: avcprofile, NUMBER: 77.00>
DEBUG: Property: <Name: audiocodecid, STRING: mp4a>
DEBUG: Property: <Name: videocodecid, STRING: avc1>
DEBUG: Property: <Name: width, NUMBER: 640.00>
DEBUG: Property: <Name: height, NUMBER: 360.00>
DEBUG: Property: <Name: frameWidth, NUMBER: 640.00>
DEBUG: Property: <Name: frameHeight, NUMBER: 360.00>
DEBUG: Property: <Name: displayWidth, NUMBER: 640.00>
DEBUG: Property: <Name: displayHeight, NUMBER: 360.00>
DEBUG: Property: <Name: moovposition, NUMBER: 18761613.00>
DEBUG: Property: <Name: duration, NUMBER: 159.63>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: File has duration: 159.626293
DEBUG: bAudioOnly: 0, size: 6672384
rtmpdump: ERROR: Last tag size must be greater/equal zero
(prevTagSize=-1507867935) and smaller then filesize, corrupt file!
to get last keyframe.
DEBUG: Closing connection.
Download failed.
Couldn't download any videos.
Original comment by ravenis...@gmail.com
on 2 Oct 2012 at 3:00
Thank you for the brilliant plugin, I loved the renaming option you included
and it really simplifies the whole process. I tried both presstv.com and
presstv.ir and I had an error with both. Using Presstv.IR allowed me to
rename, PressTV.COM did not offer that option.
get_flash_videos -debug
http://www.presstv.ir/detail/2012/09/30/264213/canadianscriticaharperaward/
1 plugin installed:
- Presstv.pm
Downloading
http://www.presstv.ir/detail/2012/09/30/264213/canadianscriticaharperaward/
-> GET
http://www.presstv.ir/detail/2012/09/30/264213/canadianscriticaharperaward/
<- 200 text/html (16815)
Trying to open plugin ~/.get_flash_videos/plugins/Www.pm
Trying to open plugin ~/.get_flash_videos/plugins/Presstv.pm
Presstv.pm no match found
Trying to open plugin ~/.get_flash_videos/plugins/Ir.pm
Trying to open plugin ~/.get_flash_videos/plugins/Brightcove.pm
Trying to open plugin ~/.get_flash_videos/plugins/Mtvnservices.pm
Trying to open plugin ~/.get_flash_videos/plugins/Gawker.pm
Using method 'generic' for
http://www.presstv.ir/detail/2012/09/30/264213/canadianscriticaharperaward/
Exists on
http://www.presstv.ir/player/player1.swf?file=newsroom/20120929/mp4:19-05-00-ftp
-jbn-p-calgary.mp4: 200
There are different suggested filenames, please choose:
1 - mp4:19-05-00-ftp-jbn-p-calgary.mp4
2 -
PressTV_-_Canadians_critical_of_Harper__World_Statesman_of_the_Year_Award.mp4
Which filename would you like to use?: 1
Downloading
http://www.presstv.ir/player/player1.swf?file=newsroom/20120929/mp4:19-05-00-ftp
-jbn-p-calgary.mp4...
-> GET
http://www.presstv.ir/player/player1.swf?file=newsroom/20120929/mp4:19-05-00-ftp
-jbn-p-calgary.mp4
Sorry, file does not look like a media file, aborting.
Original comment by ravenis...@gmail.com
on 2 Oct 2012 at 3:01
Starting with comment 6 - this message
rtmpdump: ERROR: Last tag size must be greater/equal zero
(prevTagSize=-1507867935) and smaller then filesize, corrupt file!
I have seen this a lot of times mainly on get_iplayer, what is means is the
download is coming from a different source on the resume, rtmpdump cannot
handle matching up the two streams to resume the download. Nothing can be done
with get_flash_videos, the only resolution is to delete the existing file and
start again.
comment 7 - can't claim any credit for the renaming that is in get_flash_videos
different plugin.
The matching in the plugin is for presstv.com, so will not match presstv.ir,
and a different plugin is selected.
sub can_handle {
my($self, $browser, $url) = @_;
my $host = URI->new($url)->host;
return 1 if $url && $host =~ /^presstv\.com$/;
return 1 if $url && $host =~ /\.presstv\.com$/;
debug "Presstv.pm no match found\n";
return 0;
}
Changing to match either fixes that
sub can_handle {
my($self, $browser, $url) = @_;
my $host = URI->new($url)->host;
return 1 if $url && $host =~ /^presstv\.(com|ir)$/;
return 1 if $url && $host =~ /\.presstv\.(com|ir)$/;
debug "Presstv.pm no match found\n";
return 0;
}
Attach revised plugin with the above change.
The plugin could do with selecting a better filename.
Original comment by njtaylor...@gmail.com
on 2 Oct 2012 at 5:34
Attachments:
Excellent, this plugin is working perfectly now. Thank you NJ, this will be
very useful. Are plugins archived anywhere online? I noticed there was nothing
listed at the plugins list wiki page. Will this make its way into future
versions?
Thank you!
Original comment by ravenis...@gmail.com
on 2 Oct 2012 at 7:06
This has been copied to my github repository,
https://github.com/njtaylor/get-flash-videos
So should be part of the standard set of plugins, in a future release.
I haven't created download files that include this, or sent a push request yet.
Original comment by njtaylor...@gmail.com
on 2 Oct 2012 at 8:32
Thanks for reporting this and thanks to njtaylor for the code, much
appreciated. Merged your changes in via psycotica0's pull request.
Original comment by zakflash...@gmail.com
on 3 Oct 2012 at 7:30
Thanks for reporting this and thanks to njtaylor for the code, much
appreciated. Merged your changes in via psycotica0's pull request.
Original comment by zakflash...@gmail.com
on 3 Oct 2012 at 7:30
Original issue reported on code.google.com by
l...@pot.com
on 30 Sep 2012 at 4:26