Skip to content

Instantly share code, notes, and snippets.

@changtimwu
Created June 2, 2017 01:36
Show Gist options
  • Save changtimwu/56339929ce995e2117ba17a9447b6632 to your computer and use it in GitHub Desktop.
Save changtimwu/56339929ce995e2117ba17a9447b6632 to your computer and use it in GitHub Desktop.
pasteboard
@IS-Kuan
Copy link

IS-Kuan commented Jun 2, 2017

./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

@IS-Kuan
Copy link

IS-Kuan commented Jun 2, 2017

./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 -

@IS-Kuan
Copy link

IS-Kuan commented Jun 2, 2017

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 -

@IS-Kuan
Copy link

IS-Kuan commented Jun 2, 2017

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 -

@IS-Kuan
Copy link

IS-Kuan commented Jun 3, 2017

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

@IS-Kuan
Copy link

IS-Kuan commented Jun 3, 2017

multicast leaves the problem of LAN storming. Unicast solution requires a RTSP/RTMP server.
we should try ffserver.

@changtimwu
Copy link
Author

@IS-Kuan
Copy link

IS-Kuan commented Jun 9, 2017

./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