It may not be very elegant, but it works.
First, install rtmpdump:
sudo yum install -y rtmpdump
Then, create this script somewhere handy:
#!/bin/bash
sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -j REDIRECT
echo starting
rtmpsrv | tee rtmp.txt
echo ended
sudo iptables -t nat -D OUTPUT -p tcp --dport 1935 -j REDIRECT
Run the script, then, while it is running, try to watch the video in your browser. If it is an RTMP stream, the terminal should show some capture information. Ctrl+C in the terminal.
Now, you may have to edit the rtmp.txt output file to remove extra text, but leave the "rtmpdump" commandlines.
Finally, execute:
sh ./rtmp.txt
...to download the video.
(Create an alias: alias capture='~/path/to/rtmpdump/script.sh')
Notes and things that I can't remember when I need them. Mostly technical stuff. Linux-ish. VERY likely things that nobody else will find useful at all. Hence the title...
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment