MJPEG stream via URL to webcam device on Mac - macos

I have a video device that exposes an MJPEG stream via a URL. For windows there are utility apps that can "create" a system webcam device useable by Skype or any other application based on the URL this video device exposes.
Example: smart phone is broadcasting MJPEG URL. Windows computer can run a utility app to "create" a system webcam based off of the MJPEG stream and then that webcam be used via Skype. The video shown is what the phone is broadcasting.
I'm trying to do the same but for my Mac. I can't seem to find any utility that creates a system webcam from an MJPEG stream. Googling isn't helping either, I'm just not finding a solid solution or anything I recognize as a solution.
Thanks!

I've had success with obs-studio and its vlc and virtual camera plugins.
You can add a "Vlc Video Source" and then click "Start Virtual Camera".
If you want to use it as a web-cam I just recommend that you reduce the "Network Caching (ms)" setting in the vlc video source settings as much as possible.
The hard-coded minimal value is 100ms, you can reduce it by changing this line: https://github.com/obsproject/obs-studio/blob/7217671eb0812681a9f83858bb02065b671673e7/plugins/vlc-video/vlc-video-source.c#L1079
There is still significant delay with this method regardless, but it's better than not having it working at all.

Related

How to record PC audio output without the Stereo Mix device on Windows?

Is there API available that allows audio output capture without using the Stereo Mix virtual device?
P.S. I am aware of the suggested option to use Stereo Mix device to capture computer audio output, however on my system Stereo Mix device is silent, which also means it can not be relied on. At the same time Windows can record its own sound perfectly fine via, for example, Game Bar.

FFMPEG Directshow capture windows media player compatible

I am using an FFMPEG component in embarcadero C++ Builder to capture video from a Direct show video camera. The capture works fine and gives me good quality mp4 files which I can play back using VLC player or FFMPEG, but the video file is not compatible with windows media player and windows won't give the nice video image when you view a file list with windows explorer.
I have seen suggestions which say you simply need to set the capture format to YUV420P, however if I do this, FFMPEG raises an exception -5 (input / Output error) and the capture device will not open.
Is there any other setting I should be looking at to allow FFMPEG to open the camera and capture the stream so media player will accept it.

Capture and Record Desktop Screen with/as Webcam Video

Webcam lets others view either still pictures or motion video of a user or other object in front of it. I want to configure Webcam in a way that it start capturing desktop screen instead of what is in front of it.
I want to manipulate desktop screen captured through Webcam using FFMPEG library. Such as:
ffmpeg -f dshow -i video="Integrated Webcam" -f mp4 cam_stream.mp4
I want to use this same application to capture my Desktop Screen that will be possible just in that case when Webcam will be able to capture my Desktop Screen instead. So above command will start recording what Webcam will be capturing that I want it to capture my desktop screen.
Note: I know other ways to capture, record or stream desktop screen but I want to achieve it through Webcam.
What I tried so far: I tried some Fake/Virtual Webcam software (manycam, sparkocam etc.) but I don't think they fulfil what I exactly want.
P.S. I posted the same question in another community but didn't get any response.
Please guide me if there is any way to achieve this? Thanks
Solution to this problem would be to capture desktop directly by using ffmpeg.
Follow the link Capture Desktop using ffmpeg
Ive been searching all day for a similar thing.
Ive found this: https://streamshark.io/blog/using-obs-as-a-virtual-webcam-on-windows-and-macos/ With this software you can create a virtual cam that can utilize a portion of your screen as a fake webcam output.
Exactly what I need and what I think the OP is talking about.
So for future ref, bumped.
(Why do I need this for instance?: I dont have a smartphone, but a virtualbox android. I want to install the windows desktop app versions of certain apps. For which I need to "hold the phone (virtualbox) in front of a computer screen (main os)"...
On this forum see this post on capturing the desktop:
Capture Windows screen with ffmpeg
If I understand well, you also want to add views from your webcam. The above mentioned link on capturing the desktop shows how to use dshow. So the desktop and the webcam are both input streams for your output mp4.
I suggest to add your webcam as input:
-f dshow
-i <webcam>
Next, e.g. use the overlay filter to put both the desktop and the webcam on one view.

Playing mp3 Audio files in WP7

I want to stream an audio from server using windows phone 7
the audio extension is mp3. I have tried Mp3MediaStreamSource class but the problem was that it downloads all the audio then start playing it.
I want to know what is the best way to play audio in WP7 for platform 7.0 ( with buffering -> not waiting until the entire audio file is downloaded.
Thanks in advance
I use Background Audio agent do stream mp3 radio broadcast. Take a look at this tutorial http://msdn.microsoft.com/en-us/library/hh202978(v=VS.92).aspx

capture video from screen for stream

i am looking for differnt solutions to capture video stream from monitor screen and send it to vidoestreaming server to broadcast in web. it must occuring in "live".
i'd not like to use external services like "procaster" for broad.
OS: Windows.
it will be great to know the ideas and expirience people have to accomplish that.
Thanks all.
Recently, I build a GoLang project called ScreenStreamer, is a tool to stream current active window or full screen (Linux's or Windows's) to other device, like phone or another PC, as MJPEG over http or FLV over rtmp, it's very realtime (delay < 100ms). It works on Windows and Linux.
After building it, you can run it as:
# enter the project root directory
cd ./src/ScreenStreamer
# run it
./mjpeg or .\mjpeg.exe
# use a web browser or other video player, open http://host:port/mjpeg
./rtmp or .\rtmp.exe
# use a video player, open rtmp://host:port/live/screen
Screenshot:
Windows SDK includes Push Source Filters Sample, which in turn contains CPushSourceDesktop filter/class.
CPushSourceDesktop: Copy of current desktop image (GDI only)
It captures desktop image and pushes it into DirectShow pipeline. From there on you can process it using video compression codec and stream it to remote location. A decent screen image compression codec is included with Windows Media subsystem, network streaming will have to be a custom or third party component. Alternatively, it is possible to make the capture class a virtual camera and have Windows Media Encoder broadcast it (or, it already has a simila feature built in).
Alternatively, you can check VNC (or one of the clones) source code and see how it hooks windows and captures image updates, then compresses them and makes it available for remote applications.
Note that you will have to specifically capture non-GDI images (such as coming from video/gaming applications, which use hardware acceleration and non-RGB surffaces).

Resources