https://gist.github.com/olasd/9841772 rtmp://a.rtmp.youtube.com/live2/9gk0-rugc-zs5e-b1m5
Created
June 2, 2017 01:36
-
-
Save changtimwu/56339929ce995e2117ba17a9447b6632 to your computer and use it in GitHub Desktop.
pasteboard
./ffmpeg -y -rtbufsize 100M -hwaccel cuvid -f dshow -i video="eEver USB Video Device":audio="麥克風 (eEver USB Audio Device)" -c:v copy -r 30 -c:a copy -f asf pipe:1 | ./ffplay -i -
bypass and live
$ ./ffmpeg -y -rtbufsize 100M -hwaccel cuvid -f dshow -i video="eEver USB Video Device":audio="麥克風 (eEver USB Audio Device)" -c:v copy -r 30 -c:a copy -f asf pipe:1 -c:v h264_nvenc -r 30 -c:a aac -b:a 128k -strict -2 -ac 2 -ar 44100 -f flv rtmp://a.rtmp.youtube.com/live2/9gk0-rugc-zs5e-b1m5 | ./ffplay -i -
bypass and streaming
./ffmpeg -hwaccel cuvid -f dshow -i video="eEver USB Video Device":audio="麥克風 (eEver USB Audio Device)" -c:v copy -c:a copy -f asf pipe:1 -c:v h264_nvenc -r 30 -c:a aac -b:a 128k -strict -2 -ac 2 -ar 44100 -f flv rtmp://a.rtmp.youtube.com/live2/9gk0-rugc-zs5e-b1m5 | ./ffplay -i -
two RTP streams + SDP
address must be multicast.
$ ./ffmpeg -f dshow -i video="eEver USB Video Device":audio="麥克風 (eEver USB Audio Device)" -c:v copy -r 30 -an -f rtp rtp://236.0.1.10:2000 -vn -c:a pcm_alaw -f rtp rtp://236.0.1.10:2001 >aa.sdp
spontaneous playback
./ffplay.exe -protocol_whitelist file,udp,rtsp,rtp -i aa.sdp
multicast leaves the problem of LAN storming. Unicast solution requires a RTSP/RTMP server.
we should try ffserver.
there is local-only multicast
https://stackoverflow.com/questions/2879046/how-to-limit-traffic-using-multicast-over-localhost
./ffmpeg -f dshow -i video="eEver USB Video Device":audio="麥克風 (eEver USB Audio Device)" -c:v copy -c:a pcm_mulaw -f rtsp -rtsp_transport tcp rtsp://127.0.0.1:2000
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
./ffmpeg -y -rtbufsize 100M -hwaccel cuvid -f dshow -i video="eEver USB Video Device":audio="麥克風 (eEver USB Audio Device)" -c:v h264_nvenc -r 30 -c:a aac -b:a 128k -strict -2 -ac 2 -ar 44100 -f flv rtmp://a.rtmp.youtube.com/live2/9gk0-rugc-zs5e-b1m5