Requires: ffmpeg, node.js |
If running windows, install cygwin to run the commands on this page. |
To live stream, run the following command, replacing abcd-efgh-ijkl-mnop-qrst with your youtube live streaming key found on your live dashboard page.
ffmpeg -nostats -loglevel 0 \ -f dshow \ -i audio="virtual-audio-capturer" \ -f s16le -acodec pcm_s16le -ar 44100 -ac 2 - \ | ffmpeg -nostats -loglevel 0 \ -f s16le -ar 44100 -ac 2 -i - \ -acodec libmp3lame \ -b:a 128k -f mp3 - \ | pitahaya --tx mp3 \ | ffmpeg -nostats -loglevel 0 \ -f lavfi \ -i anullsrc=channel_layout=stereo:sample_rate=11025 \ -framerate 8 -f rawvideo \ -pixel_format rgba -video_size 640x360 \ -i - -shortest -c:v libx264 \ -crf 32 -pix_fmt yuv420p -preset slow \ -r 8 -g 16 -f flv \ "rtmp://a.rtmp.youtube.com/live2/abcd-efgh-ijkl-mnop-qrst"
ffmpeg -nostats -loglevel 0 \ -f alsa -ac 2 -i hw:0 \ -f s16le -acodec pcm_s16le -ar 44100 -ac 2 - \ | ffmpeg -nostats -loglevel 0 \ -f s16le -ar 44100 -ac 2 -i - \ -acodec libmp3lame \ -b:a 128k -f mp3 - \ | pitahaya --tx mp3 \ | ffmpeg -nostats -loglevel 0 \ -f lavfi \ -i anullsrc=channel_layout=stereo:sample_rate=11025 \ -framerate 8 -f rawvideo \ -pixel_format rgba -video_size 640x360 \ -i - -shortest -c:v libx264 \ -crf 32 -pix_fmt yuv420p -preset slow \ -r 8 -g 16 -f flv \ "rtmp://a.rtmp.youtube.com/live2/abcd-efgh-ijkl-mnop-qrst"pulse
ffmpeg -nostats -loglevel 0 \ -f pulse -ac 2 -i default \ -f s16le -acodec pcm_s16le -ar 44100 -ac 2 - \ | ffmpeg -nostats -loglevel 0 \ -f s16le -ar 44100 -ac 2 -i - \ -acodec libmp3lame \ -b:a 128k -f mp3 - \ | pitahaya --tx mp3 \ | ffmpeg -nostats -loglevel 0 \ -f lavfi \ -i anullsrc=channel_layout=stereo:sample_rate=11025 \ -framerate 8 -f rawvideo \ -pixel_format rgba -video_size 640x360 \ -i - -shortest -c:v libx264 \ -crf 32 -pix_fmt yuv420p -preset slow \ -r 8 -g 16 -f flv \ "rtmp://a.rtmp.youtube.com/live2/abcd-efgh-ijkl-mnop-qrst"avfoundation
ffmpeg -nostats -loglevel 0 \ -f avfoundation -i ":0" \ -acodec libmp3lame \ -b:a 128k -f mp3 - \ | pitahaya --tx mp3 \ | ffmpeg -nostats -loglevel 0 \ -f lavfi \ -i anullsrc=channel_layout=stereo:sample_rate=11025 \ -framerate 8 -f rawvideo \ -pixel_format rgba -video_size 640x360 \ -i - -shortest -c:v libx264 \ -crf 32 -pix_fmt yuv420p -preset slow \ -r 8 -g 16 -f flv \ "rtmp://a.rtmp.youtube.com/live2/abcd-efgh-ijkl-mnop-qrst"