Skip to content

Instantly share code, notes, and snippets.

@legnaleurc
Last active July 26, 2017 05:10
Show Gist options
  • Select an option

  • Save legnaleurc/155979e76601adcf58a026035798587c to your computer and use it in GitHub Desktop.

Select an option

Save legnaleurc/155979e76601adcf58a026035798587c to your computer and use it in GitHub Desktop.

Revisions

  1. legnaleurc revised this gist Jul 20, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion stream.cgi
    Original file line number Diff line number Diff line change
    @@ -3,4 +3,4 @@
    echo 'Content-Type: video/mp4'
    echo

    ffmpeg -i '/tmp/stream.mp4' -c:v copy -c:a copy -f mp4 -movflags frag_keyframe+empty_moov -
    ffmpeg -i 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov' -c:v copy -c:a copy -f mp4 -movflags frag_keyframe+empty_moov -
  2. legnaleurc created this gist Jul 20, 2017.
    6 changes: 6 additions & 0 deletions stream.cgi
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #! /bin/sh

    echo 'Content-Type: video/mp4'
    echo

    ffmpeg -i '/tmp/stream.mp4' -c:v copy -c:a copy -f mp4 -movflags frag_keyframe+empty_moov -
    13 changes: 13 additions & 0 deletions stream.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    <!DOCTYPE html>
    <html>
    <head>
    </head>
    <body>
    <video src="/cgi-bin/stream.cgi" controls id="v">
    </video>
    <script>
    var v = document.querySelector('#v');
    //v.playbackRate = 1.5;
    </script>
    </body>
    </html>