mjpeg

Conversion from mjpeg to mp4 (libx264) with FFmpeg

那年仲夏 提交于 2021-01-29 10:56:57
问题 If you convert from mjpeg to mp4 (libx264) with FFmpeg, Playback can not be performed on Windows · Mac. Thumbnails are not displayed on the icon. However, with the HTML5 Video tag, playback is possible. Why? Please tell me if you understand. Thank you. ffmpeg -i source_file.mov -b 4000k -vcodec libx264 destination_file.mp4 回答1: The usual reason for this is the pixel format. The MJPEG may have 4:2:2 or 4:4:4 chroma sampling which most players don't support in H264. So try ffmpeg -i source_file

Ffmpeg - How to force MJPEG output of whole frames?

不羁的心 提交于 2020-04-16 05:51:10
问题 I'm working with ffmpeg to process an incoming MPEGTS stream from remote cameras, and deliver it to multiple clients using my app. Technically, I'm using ffmpeg to convert the incoming stream to an MJPEG output, and piping the data chunks (from the ffmpeg process stdout) to a writeable stream on the client http response. However, I'm facing a problem- not all data chunks represent a full 'whole' frame. thus, displaying them in a row in the browser, results in a flickering video, with half

MJPEG streaming with GStreamer in Chrome

若如初见. 提交于 2020-01-25 10:20:08
问题 I have an image processing application that runs on an embedded device using OpenCV. To display the results I'm using Civetweb to host a web page and stream the result of my application through OpenCV videowriter (which hooks onto GStreamer). To replicate my issues you can use the following snippets gst-launch-1.0 \ videotestsrc \ ! videoconvert ! videoscale ! video/x-raw,width=320,height=240 \ ! clockoverlay shaded-background=true \ ! theoraenc ! oggmux ! tcpserversink host=127.0.0.1 port

FFMPEG: create movie from timestamped images

扶醉桌前 提交于 2020-01-23 12:42:53
问题 Im trying to make a small movie file from a folder with webcam images. They are named like this: 00-00-38.jpg 00-05-37.jpg 00-10-37.jpg 00-15-37.jpg H-M-S.jpg format Although i tried patterntype glob and simpler commands i cannot get it to work. This is what i tried: ffmpeg -r 1 -pattern_type glob -i '*.jpg' -scale=720:-1 -c:v libx264 out.mp4 (got only one image) ffmpeg -r 25 -i *.jpg -vf "scale=720:-1" output.mp4 (same size as a jpg file but no video) Console output: ffmpeg -framerate 1

Getting frames though a stream and display on screen

坚强是说给别人听的谎言 提交于 2020-01-17 03:29:05
问题 I have a requirement of streaming from server and displaying the streamed content on the screen...Streaming is working fine using NSStream, and NSInputStream and NSOutputStream.How can I display it on the screen? Stream used looks like @"http://191.168.143.41:1212/; if(stream == inputStream) { uint8_t buf[1024]; unsigned int len = 0; len = [inputStream read:buf maxLength:1024]; if(len > 0) { NSMutableData* datas=[[NSMutableData alloc] initWithLength:0]; [datas appendBytes: (const void *)buf

Rendering MJpeg stream in html5

徘徊边缘 提交于 2020-01-09 07:47:26
问题 I'm trying to render MJpeg stream in HTML5 using the img tag. When I'm running the following, everything works great, meaning, the video starts to play until the video ends: <img src="http://[some ip]:[port]/mjpg"> My question is how can I get the stream frame by frame. For each frame, I want to get it, do something (ajax call to the server) and then display the frame as an image. Thanks. 回答1: If the camera exposes raw JPEG images (not .MJPEG extension) you'll have to reaload it manually (if

unwanted “NUL” characters string after reading bytes of a mjpg TCP stream

為{幸葍}努か 提交于 2020-01-06 12:42:34
问题 I'm trying to record a jpeg image sent by an Ethernet camera in a mjpg stream. The images I obtain with my Borland C++ application (VSPCIP) are sometimes "corrupted" : I have the example of a "corrupted jpeg frame" : it has 21690 characters (for a 640x480 jpeg image) and among them there is a string of 5045 following characters which have the value "NUL" (displayed as NUL in Notepad++). And because I stop reading bytes when I reach the "content-length" specified in the mjpg header, the

Where is the documentation for the Mjpeg codec used in mencoder, VLC and FFMpeg?

白昼怎懂夜的黑 提交于 2020-01-06 10:20:23
问题 Mencoder has a lovely option for converting a mjpeg file into an avi file with an 'MJPG' codec that plays in VLC. The command line to do this is: mencoder filename.mjpeg -oac copy -ovc copy -o outputfile.avi -speed 0.3 where 0.3 is the ratio of the desired play framerate to the default 25 fps. All this does is make a copy of the mjpeg file, put an avi header on top and at the end, what seems to be an index of the frame positions in the file. I want to replicate this in my own code, but I can

Where is the documentation for the Mjpeg codec used in mencoder, VLC and FFMpeg?

自作多情 提交于 2020-01-06 10:20:21
问题 Mencoder has a lovely option for converting a mjpeg file into an avi file with an 'MJPG' codec that plays in VLC. The command line to do this is: mencoder filename.mjpeg -oac copy -ovc copy -o outputfile.avi -speed 0.3 where 0.3 is the ratio of the desired play framerate to the default 25 fps. All this does is make a copy of the mjpeg file, put an avi header on top and at the end, what seems to be an index of the frame positions in the file. I want to replicate this in my own code, but I can

Why is the maximum ffmpeg mjpeg quality so low?

三世轮回 提交于 2020-01-06 06:47:04
问题 I used ffmpeg to generate a one-frame mjpeg video at the maximum possible quality, like this: ffmpeg -i reference.png -frames:v 1 -codec:v mjpeg -q:v 1 -an 1.mkv I also made a reference conversion to jpeg using imagemagick, at 85% quality: convert reference.png -quality 85 85.jpg The resulting "1.mkv" is only 83K, despite the fact that 85.jpg is 88K - and that's not even the highest possible jpeg quality. At 95% imagemagick produces a file of 120K, and 207K at 100%. (Though it should be noted