Use tcpdump to download arbitrary Flash videos
I came across an interesting video on the web that I wanted to watch offline, but it played through a Flash application, there were no download links, grabbing the stream by looking through the HTML/DOM was nontrivial, and the youtube-dl mainstay didn't work. tcpdump to the rescue!
- tcpdump -v -i <interface> -w output.cap
- Load the video up and start playing. Sadly, this has to be done in real-time.
- When done, tcpflow -r output.cap
- The largest file should be your video; use an editor to strip the HTTP headers from the beginning.
- If all goes well, you should have a video.flv. For extra credit, use ffmpeg -i video.flv to see if it's H.264/AAC. If so, use ffmpeg -i video.flv -acodec copy -vcodec copy video.mp4 for lossless container conversion to a standard MPEG-4 Part 14 file.
Thanks to this post
for the tip.