Opened 5 years ago

Closed 4 years ago

#4100 closed defect (fixed)

ffserver jpeg uses wrong mimetype

Reported by: illumilore Owned by:
Priority: normal Component: ffserver
Version: git-master Keywords: mjpeg
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

When using the jpeg format in ffserver, the image feed it sets up uses x-mjpeg mimetype according to wget. It should send jpeg type so that firefox and any thing else can actually view the images.

<Stream test.jpg>
Feed cam.ffm
Format jpeg
VideoFrameRate? 2
VideoIntraOnly?
#VideoSize? 352x240
NoAudio?
Strict -1
</Stream>

$ ./ffmpeg -f video4linux2 -input_format mjpeg -s 960x720 -r 5 -i /de -strict -2 http://127.0.0.1:8090/cam.ffm
ffmpeg version N-67516-g8c28a39 Copyright (c) 2000-2014 the FFmpeg developers

built on Nov 10 2014 17:34:19 with gcc 4.8 (SUSE Linux)
configuration:
libavutil 54. 11.100 / 54. 11.100
libavcodec 56. 12.100 / 56. 12.100
libavformat 56. 12.103 / 56. 12.103
libavdevice 56. 2.100 / 56. 2.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100

[video4linux2,v4l2 @ 0x1e69720] Cannot open video device /de: No such file or directory
azezal@wired-tuvok:~/temp/ffmpeg$ ./ffmpeg -f video4linux2 -input_format mjpeg -s 960x720 -r 5 -i /dev/video0 -strict -2 http://127.0.0.1:8090/cam.ffm
ffmpeg version N-67516-g8c28a39 Copyright (c) 2000-2014 the FFmpeg developers

built on Nov 10 2014 17:34:19 with gcc 4.8 (SUSE Linux)
configuration:
libavutil 54. 11.100 / 54. 11.100
libavcodec 56. 12.100 / 56. 12.100
libavformat 56. 12.103 / 56. 12.103
libavdevice 56. 2.100 / 56. 2.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100

Input #0, video4linux2,v4l2, from '/dev/video0':

Duration: N/A, start: 22510.622947, bitrate: N/A

Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 960x720, 0 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc

[swscaler @ 0x2cc9120] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x2ceeb60] deprecated pixel format used, make sure you did set range correctly
Output #0, ffm, to 'http://127.0.0.1:8090/cam.ffm':

Metadata:

creation_time : now
encoder : Lavf56.12.103
Stream #0:0: Video: flv1 (flv), yuv420p, 960x720, q=5-31, 4000 kb/s, 5 fps, 1000k tbn, 5 tbc
Metadata:

encoder : Lavc56.12.100 flv

Stream #0:1: Video: mjpeg, yuvj422p(pc), 160x128, q=2-31, 200 kb/s, 5 fps, 1000k tbn, 5 tbc
Metadata:

encoder : Lavc56.12.100 mjpeg

Stream #0:2: Video: mjpeg, yuvj422p(pc), 960x720, q=1-5, 200 kb/s, 5 fps, 1000k tbn, 5 tbc
Metadata:

encoder : Lavc56.12.100 mjpeg

Stream mapping:

Stream #0:0 -> #0:0 (mjpeg (native) -> flv1 (flv))
Stream #0:0 -> #0:1 (mjpeg (native) -> mjpeg (native))
Stream #0:0 -> #0:2 (mjpeg (native) -> mjpeg (native))

Press [q] to stop, ? for help
[mjpeg @ 0x2cdf2a0] rc buffer underflow
[mjpeg @ 0x2cdf2a0] rc buffer underflow

$ wget http://192.168.0.67:8090/test.jpg
--2014-11-10 17:55:40-- http://192.168.0.67:8090/test.jpg
Connecting to 192.168.0.67:8090... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [video/x-mjpeg]
Saving to: ‘test.jpg.1’

[ <=> ] 10,743 5.56KB/s

Change History (3)

comment:1 Changed 5 years ago by illumilore

Also this seems to be a regression, since a patch from debian bugs was apparently supposed to have been put into the ffserver git a couple of years ago.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=374931

comment:2 Changed 5 years ago by cehoyos

  • Keywords mjpeg added; ffserver format jpeg myme removed
  • Priority changed from critical to normal

comment:3 Changed 4 years ago by illumilore

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.