-
-
Save pon13y/d759ab9bd5fe63594a4790851eb6b64c to your computer and use it in GitHub Desktop.
Revisions
-
max-mapper revised this gist
May 24, 2015 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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. 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 example video created using above method: https://www.youtube.com/watch?v=Xn4yNavjdR4&t=28m0s -
max-mapper revised this gist
May 24, 2015 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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. note: it might work with `libav-tools` instead of `ffmpeg` (ffmpeg isnt on apt-get in raspbian) but I haven't tested it -
max-mapper created this gist
May 24, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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.