Requires: ffmpeg and node.js. |
If running windows, install cygwin to run the commands on this page. |
ffmpeg -nostats -loglevel 0 \ -re -i audio.flac \ -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 -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"After running the command, wait a moment and you will see the stream start to be received on the live dashboard page. It might give you a warning that the stream quality has an 'unsupported resolution' but you can ignore this warning. It is probably best to set the stream latency to 'normal latency' on the live dashboard page to ensure the highest possible quality stream.
Alternatively, if you want to live stream audio from audio playing on your desktop computer, rather than from a file, you can find the command to do that here.
Note that you can stream to different servers, e.g. Twitch, by replacing the rtmp url on the last line, e.g. "rtmp://hou.contribute.live-video.net/app/TWITCHSTREAMKEY"
Requires: ffmpeg, node.js, and streamlink. |
streamlink --quiet \ https://youtu.be/abcdefghijk 360p -o - \ | ffmpeg -nostats -loglevel 0 \ -i - -vcodec rawvideo \ -pix_fmt rgba \ -r 16 -f rawvideo - \ | pitahaya --rx 360p \ | ffplay -nostats -loglevel 0 -