Sporadic corruption of JPEG stills

About encoding, codec settings, muxers and filter usage
vlasky

Sporadic corruption of JPEG stills

Postby vlasky » 06 Apr 2006 02:06

G'day,

I am using vlc-0.8.4a to monitor lab equipment using an Apple iSight Firewire camera and Andrea Guzzo's dc1394 input module.

I have configured VLM to provide audio-visual streams playable in Windows Media Player and JPEG stills/snapshots that can be viewed from any web browser for people without broadband connections.

I generated JPEG stills by using the mjpg codec with the 'raw' mux module.

The problem is that once in a while, I receive invalid JPEG image data that does not display. If I refresh the image again, the next frame appears correctly. The problem normally happens at least once for every 20 refreshes.

When I have examined the actual data in the bad frame, it is missing a JPEG header.

Here is my VLM configuration:

Code: Select all

new camera1 broadcast enabled setup camera1 input dc1394:/dev/video1394/0:camera=0:size=320x240:adev=/dev/dsp :channels=1:fps=15 setup camera1 output #duplicate{dst="transcode{vcodec=DIV3,vb=256,acodec=mp3,ab= 32}:std{access=mmsh,mux=asfh,url=:9192/stream1_v_medium.asf}",dst="transcode{vco dec=MJPG,vb=4000}:std{access=http,mux=raw,url=:9192/stream1.jpg}"} control camera1 play
Any help in finding the cause is much appreciated.

Regards, Vlad.

vlasky
Blank Cone
Blank Cone
Posts: 15
Joined: 06 Apr 2006 02:25

Sporadic corruption of JPEG stills

Postby vlasky » 07 Apr 2006 04:11

OK, I made some progress.

I now believe that I am using VLC in a way that it is not technically designed to be (but should be).

My intention was to obtain JPEG stills/snapshots by using the MJPEG codec with the raw muxer.

When I retrieved images manually using wget, I found that individual frames were not being downloaded, but instead a continuous stream of JPEG images.

I suspect that the reason why it appeared to be working is that most of the time, the web browser happens to stumble upon a valid image in that stream and then terminate the HTTP connection.

The rest of the time, the browser connects when we are part-way through an image, sees what looks like garbage data, and then gives up.

I would be grateful if one of the developers could modify the existing code to properly support JPEG stills.

cso
New Cone
New Cone
Posts: 1
Joined: 20 Oct 2006 15:45

Postby cso » 20 Oct 2006 15:58

Hi,

Same problem, have you solve it now?

Thanks for help

vlasky
Blank Cone
Blank Cone
Posts: 15
Joined: 06 Apr 2006 02:25

Sporadic corruption of JPEG stills

Postby vlasky » 21 Oct 2006 12:27

Nope, problem still exists

I really wish a developer would look into this - that is, provide proper support for periodically updated JPEG snapshots of a video stream.

Also, I don't think the mixed/replace headers produced by the mpjpeg mux are completely correct - they might work for the Axis client (I haven't tested), but they should be able to be viewed by Internet Explorer, for the first frame of the video stream.

4 years ago, I used Jon Travis's camserv to stream mpjpeg video and you could view the first frame in internet explorer (motion video would require netscape/mozilla/firefox which properly implement mixed/replace support).

I think fixing the mpjpeg module to produce headers that are more compatible across browsers would not be too difficult.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 7 guests