# cut the video to match the time of the audio
ffmpeg -i input.mp4 -ss 0 -t -strict -2 output.mp4
# replace the audio
ffmpeg -i input.mp4 -i input.mp3 -map 0:0 -map 1 -vcodec copy -acodec copy output.mp4
# adding an overlay to the video, replace the 0:0 with x:y coords
ffmpeg -y -i input.mp4 -i image.png -filter_complex 'overlay=0:0' -strict -2 output.mp4
The utility rtmpdump comes with a helper app called rtmpsrv that can intercept RTMP requests and save them to disk. Here’s how:
# set up iptables redirect
sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -j REDIRECT
# start the server
rtmpsrv
# stop redirect
sudo iptables -t nat -D OUTPUT -p tcp --dport 1935 -j REDIRECT
# run the rtmpdump
rtmpdump -r "rtmp://tmphost.com:1935/cfx/st" -a "cfx/st" -f "LNX 11,2,202,411" -W "http://player.org/assets/swf/player.swf?programid=340179" -p "http://www.player.org" -y "mp4:trimmed/program/id/id/program.id.MP4-D20.mp4" -o program.340179.MP4-D20.flv
# use ffmpeg to cut video to part you want
ffmpeg -i 20140715085918001_hd.flv -ss 00:46:44 -to 00:48:53 -strict -2 output.mp4
Linux, Lustre, Wordpress, Etc.