Skip to content

Instantly share code, notes, and snippets.

@pon13y
Forked from max-mapper/readme.md
Created September 18, 2018 15:38
Show Gist options
  • Save pon13y/d759ab9bd5fe63594a4790851eb6b64c to your computer and use it in GitHub Desktop.
Save pon13y/d759ab9bd5fe63594a4790851eb6b64c to your computer and use it in GitHub Desktop.

Revisions

  1. @max-mapper max-mapper revised this gist May 24, 2015. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,8 @@
    raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<SESSION>
    ```

    you can tweak `-b` and `-fps` to your liking. the settings above work well for 1080p.
    you can tweak `-b` and `-fps` to your liking. the settings above work well for 1080p. by not specifying width or height we get the full 1920x1080 resolution from the raspi camera

    note: it might work with `libav-tools` instead of `ffmpeg` (ffmpeg isnt on apt-get in raspbian) but I haven't tested it
    note: it might work with `libav-tools` instead of `ffmpeg` (ffmpeg isnt on apt-get in raspbian) but I haven't tested it

    example video created using above method: https://www.youtube.com/watch?v=Xn4yNavjdR4&t=28m0s
  2. @max-mapper max-mapper revised this gist May 24, 2015. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -6,4 +6,6 @@
    raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<SESSION>
    ```

    you can tweak `-b` and `-fps` to your liking. the settings above work well for 1080p.
    you can tweak `-b` and `-fps` to your liking. the settings above work well for 1080p.

    note: it might work with `libav-tools` instead of `ffmpeg` (ffmpeg isnt on apt-get in raspbian) but I haven't tested it
  3. @max-mapper max-mapper created this gist May 24, 2015.
    9 changes: 9 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    1. compile ffmpeg for arm https://github.com/fiorix/ffmpeg-arm
    2. create youtube 'live event'. get rtmp url + session id
    3. run this:

    ```
    raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<SESSION>
    ```

    you can tweak `-b` and `-fps` to your liking. the settings above work well for 1080p.