Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.79 KB | None | 0 0
  1.     #!/bin/bash
  2.      
  3.     echo "svtplay-ripper 0.0.4"
  4.      
  5.     read -p 'URL: ' lonk
  6.     read -p 'Output filename: ' fout
  7.     echo 'Format'
  8.     echo '1. - FLV'
  9.     echo '2. - AVI'
  10.     read -p "Select(1/2):" format
  11.    
  12.     foo=`wget  -qO-  $lonk  |  egrep -o 'rtmp[^,]*\.mp4+' | sort -ur |  head -n 1`
  13.      
  14.     kul=`echo ${foo} | egrep -o 'rtmp[^,]*\.mp4+' | sort -ur |  head -n 1`
  15.      
  16.     if [ "$kul" = "" ]
  17.             then
  18.                     echo "Sorry no URL found\n"
  19.             else
  20.                     rtmpdump --hashes -r $kul -o "${fout}"'.flv'
  21.    
  22.    fi
  23.  
  24. if [ "$format" -eq 1 ]
  25. then
  26. clear
  27. echo "Done!"
  28. fi
  29.  
  30. if [ "$format" -eq 2 ]
  31. then
  32.  
  33. ffmpeg -y -i  "${fout}"'.flv' -vcodec msmpeg4 -b 400k -acodec libmp3lame -ar 44100 "${fout}"'.avi'
  34. rm "${fout}"'.flv'
  35.  
  36. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement