mustafaakin/cast-localvideo — pull request #16 by acrefoot (2014-03-30 10:35:55+00:00)
Title: Use '-vcodec copy' on 'h264' video streams

Currently cast-localvideo tries to transcode everything to a common denominator.
This isn't very efficient when our input source is H.264@720p, for example. On
my machine, ranscoding is slower than realtime, and my video ends up pausing
every 2 seconds as the transcoder catches up.

https://developers.google.com/cast/docs/media says that (at last some versions
of) H.264 should work just fine, so when the input file has an 'h264' video
stream, we use the 'copy' target codec.

This is sort of a dirty hack, as ffmpeg is still called with extraneous options that are
ignored: `-profile baseline -level 30 -preset fast` and possibly others.
However, it makes streaming 720p video to my chromecast **fast**. Potential improvements
include adding support for audio codec passthru, allowing the V8 video codec, and
checking the profile of H.264 of the input stream before attempting to copy it.