Closed 1506085843 closed 1 year ago
If I were you I would just use OBS to receive the stream, and use its UI to record. In the Readme you will find the right settings to receive the stream. I am sure there is an ffmpeg command that would work though, but I am no expert.
Ah ! can you try to add -f mjpeg
to your command? :
ffmpeg -f mjpeg -i http://192.168.1.100:8080/cam.mjpeg -c:v libx264 -crf 23 output.mp4
Thanks a lot, the command you provided above it worked! Now ffmpeg is indeed able to save mjpeg streams to mp4. But your project only supports video now? Do you consider transmitting the sound through the mobile phone, so that I can get the mp4 video with sound through the following ffmpeg command:
ffmpeg -f mjpeg -i http://192.168.1.100:8080/cam.mjpeg -i /dev/video0 -c:v libx264 -crf 23 -c:a aac -b:a 128k output.mp4
my obs can't show, but browse is ok my obs is diferent with yours.
Careful only the last client gets a feed. You should close the browser tab and only open the OBS source. If it is not that, the problem on your OBS side.
I use the Windows 10 operating system, I copied the ip address in the app and opened it on my computer's browser and it worked fine,and I use the following command in the cmd window:
ffmpeg -i http://192.168.1.100:8080/cam.mjpeg -c:v libx264 -crf 23 output.mp4
It can't save the mjpeg as an mp4 video, I just get a 25kb output.mp4, it's not able to play, it's just a frame.
How should I operate so that the video shot on the mobile phone can be transmitted to the computer in real time and saved as mp4 ?