Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.44 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use strict;
  3.  
  4. my $nieuwsurl = $ARGV[0];
  5. if (!$nieuwsurl){ die "Please pass a url.\n"; }
  6. my $flvpath = `/usr/bin/curl -s $nieuwsurl|grep FLVLong|grep rtmpPath`;
  7. if ($flvpath =~ m/= '(.*)\.flv';/)
  8. {
  9.   $flvpath = $1;
  10. }
  11. else
  12. {
  13.   die "Could not extract url.\n";
  14. }
  15. my $cmd = "/usr/bin/rtmpdump -r rtmp://vrt.flash.streampower.be -a vrtnieuws -y $flvpath -o ~/nieuws.flv &";
  16. system($cmd);
  17. sleep 10;
  18. system('mplayer ~/nieuws.flv');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement