Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. ###########################################
  4. # ALL CREDIT GOES TO SHAPEDOCTOR ON RIZON #
  5. ###########################################
  6.  
  7. ####################################################################################
  8. ### Configuration options
  9.  
  10. # Channel name
  11. channel="slip_stream"
  12.  
  13. # Livestream account information
  14. username="waltjesus"
  15. password="mi11axzAB"
  16.  
  17. # Immediately go live?
  18. autoLive="true"
  19.  
  20. # This automatically adds the recording to the top of the Video on Demand list
  21. autoVOD="false"
  22.  
  23. # This automatically adds the recording to the top of the auto-pilot playlist
  24. autoPilot="false"
  25.  
  26. # Automatically records this broadcast
  27. autoRecord="false"
  28.  
  29. # Allows you to set the buffer time (in seconds) of the live streaming in the player
  30. bufferTime=1
  31.  
  32. ####################################################################################
  33.  
  34. # Setup params
  35.  
  36. if [ "$1" ]
  37. then
  38. moviePath=$1
  39. else
  40. echo "Syntax: $0 videoFile [ffpreset]"
  41. exit
  42. fi
  43. if [ "$2" ]
  44. then
  45. ffpreset=$2
  46. else
  47. ffpreset="normal"
  48. fi
  49.  
  50. # Get width & height while suppressing annoying stderr output
  51. width=$(ffprobe -show_streams "$moviePath" 2> /dev/null | grep width | tr -d 'width=')
  52. height=$(ffprobe -show_streams "$moviePath" 2> /dev/null | grep height | tr -d 'height=')
  53.  
  54. # Calculate aspect ratio
  55. aspectWidth=$(echo "scale=3; $width / $height" | bc)
  56. aspectHeight=1
  57.  
  58. # Do the stuff
  59. ffmpeg -i "$moviePath" -re -acodec libfaac -ac 1 -vcodec libx264 -r 25 -vpre $ffpreset -threads 0 -f flv "rtmp://publish.livestream.com/mogulus/$channel/username=$username/password=$password/isAutoLive=$autoLive/aspectWidth=$aspectWidth/aspectHeight=$aspectHeight/bufferTime=$bufferTime/autoRecord=$autoRecord/autoVOD=$autoVOD/autoPilot=$autoPilot app=mogulus/$channel/username=$username/password=$password/isAutoLive=$autoLive/aspectWidth=$aspectWidth/aspectHeight=$aspectHeight/bufferTime=$bufferTime/autoRecord=$autoRecord/autoVOD=$autoVOD/autoPilot=$autoPilot tcurl=rtmp://publish.livestream.com/mogulus/$channel/username=$username/password=$password/isAutoLive=$autoLive/aspectWidth=$aspectWidth/aspectHeight=$aspectHeight/bufferTime=$bufferTime/autoRecord=$autoRecord/autoVOD=$autoVOD/autoPilot=$autoPilot swfUrl=rtmp://publish.livestream.com/mogulus/$channel/username=$username/password=$password/isAutoLive=$autoLive/aspectWidth=$aspectWidth/aspectHeight=$aspectHeight/bufferTime=$bufferTime/autoRecord=$autoRecord/autoVOD=$autoVOD/autoPilot=$autoPilot flashver=FME/2.5\20(compatible;\20FMSc/0.9) live=true"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement