Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gwparikh/ee388d1c0f25f1f9ab62 to your computer and use it in GitHub Desktop.
Save gwparikh/ee388d1c0f25f1f9ab62 to your computer and use it in GitHub Desktop.
Been wanting to figure out how to do this for a while, ended up being pretty easy once I spent a few years in the shell with ffmpeg...

On-the-fly Video Converting and End-to-End Streaming With FFMPEG and netcat

Transcoding & Sending:

ssh -R <port>:localhost:<port> <host_with_content> ffmpeg -i <input_file> -c:v libx264 -q 1 -c:a libmp3lame -f avi pipe:1 | nc localhost <port>

Playing:

nc -l <port> | ffplay -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment