AlexxIT / go2rtc

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.
https://github.com/AlexxIT/Blog
MIT License
4.61k stars 374 forks source link

windows desktop stream #873

Closed alfredit closed 5 months ago

alfredit commented 8 months ago

hi,

I am trying to stream 2 things : a webcam and a windows desktop.

The webcam works well, for the windows desktop i used ffmpeg exec with a working ffmpeg cmd : "ffmpeg -f dshow -i video="screen-capture-recorder""

so my go2rtc.yaml is :

streams:
  windows_webcam: ffmpeg:device?video=0&video_size=1280x720#video=h264
  desk: exec:ffmpeg -f dshow -i video="screen-capture-recorder"

And i get this error :

PS C:\Program Files\ffmpeg> .\go2rtc.exe
18:27:04.491 INF go2rtc version 1.8.5 windows/amd64
18:27:04.524 INF [rtsp] listen addr=:8554
18:27:04.524 INF [api] listen addr=:1984
18:27:04.526 INF [webrtc] listen addr=:8555
18:27:20.924 ERR github.com/AlexxIT/go2rtc/internal/mjpeg/init.go:166 > error="streams: EOF"
18:33:40.882 ERR github.com/AlexxIT/go2rtc/internal/mjpeg/init.go:166 > error="streams: EOF"

Can you help me to share my desktop? I think i need an output somewhere on the exec but not shure..

thanks,

Edgar

skrashevich commented 8 months ago

Is go2rtc installed in the docker container or run directly?

AlexxIT commented 8 months ago

Wrong output for exec source. It should has supported format and codec

alfredit commented 8 months ago

Exec from windows, no container.

alfredit commented 8 months ago

Wrong output for exec source. It should has supported format and codec

Shoud i use exec or directly ffmpeg: for this?

AlexxIT commented 8 months ago

I have never saw screen capture recorder and never test it via ffmpeg source

alfredit commented 8 months ago

I finally did it with vlc cmd line, it was not a good usage of your app

Thanks for the help.