jpegparse: Failed to parse app0 segment
Describe your issue
I have a Logitech HD Webcam C525
camera which jpegparse
appears unable to parse frames from, I have other cameras that seem to work fine with the same pipeline. Using the normal jpegdec
plugin appears to handle the HD Webcam C525
camera fine.
Expected Behavior
jpegparse
should parse stream
Observed Behavior
jpegparse
fails to parse stream
Setup
- Operating System: buildroot
- Device: Computer
- GStreamer Version: 1.22.0
-
Command line:
GST_DEBUG="3,jpeg*:9" GST_PLUGIN_FEATURE_RANK=vajpegdec:PRIMARY,jpegparse:PRIMARY,jpegdec:SECONDARY XDG_RUNTIME_DIR=/run/user/root gst-launch-1.0 --gst-disable-segtrap --gst-disable-registry-fork -v -m pipewiresrc target-object=41 ! image/jpeg,width=1920,height=1080,framerate=30/1 ! decodebin3 ! videoconvertscale ! videorate drop-only=1 average-period=1 ! video/x-raw,width=1920,height=1080,framerate=30/1 ! fakesink
Steps to reproduce the bug
- open terminal
- run command line with a
GST_DEBUG="3,jpeg*:9" GST_PLUGIN_FEATURE_RANK=vajpegdec:PRIMARY,jpegparse:PRIMARY,jpegdec:SECONDARY XDG_RUNTIME_DIR=/run/user/root gst-launch-1.0 --gst-disable-segtrap --gst-disable-registry-fork -v -m filesrc location=streamdump.mjpeg ! image/jpeg,width=1920,height=1080,framerate=30/1 ! decodebin3 ! videoconvertscale ! videorate drop-only=1 average-period=1 ! video/x-raw,width=1920,height=1080,framerate=30/1 ! fakesink
with streamdump.mjpeg.
How reproducible is the bug?
always
Additional Information
0:00:00.202678625 4395 0x55d6536e4520 DEBUG jpegparse gstjpegparse.c:816:gst_jpeg_parse_sink_event:<jpegparse0> event : stream-start
0:00:00.202858541 4395 0x55d6536e4520 DEBUG jpegparse gstjpegparse.c:816:gst_jpeg_parse_sink_event:<jpegparse0> event : caps
0:00:00.202927627 4395 0x55d6536e4520 DEBUG jpegparse gstjpegparse.c:199:gst_jpeg_parse_set_sink_caps:<jpegparse0> get sink caps image/jpeg, width=(int)1920, height=(int)1080, framerate=(fraction)30/1
0:00:00.203050780 4395 0x55d6536e4520 DEBUG jpegparse gstjpegparse.c:816:gst_jpeg_parse_sink_event:<jpegparse0> event : stream-start
0:00:00.203126742 4395 0x55d6536e4520 DEBUG jpegparse gstjpegparse.c:816:gst_jpeg_parse_sink_event:<jpegparse0> event : caps
0:00:00.203178278 4395 0x55d6536e4520 DEBUG jpegparse gstjpegparse.c:199:gst_jpeg_parse_set_sink_caps:<jpegparse0> get sink caps image/jpeg, width=(int)1920, height=(int)1080, framerate=(fraction)30/1
0:00:00.518189587 4395 0x55d6536e4520 DEBUG jpegparse gstjpegparse.c:816:gst_jpeg_parse_sink_event:<jpegparse0> event : segment
0:00:00.518846426 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: d8 [offset 2 / size 0]
0:00:00.518911132 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: e0 [offset 4 / size 33]
0:00:00.518954645 4395 0x55d6536e4520 WARN jpegparse gstjpegparse.c:764:gst_jpeg_parse_handle_frame:<jpegparse0> warning: Failed to parse app0 segment
0:00:00.519244039 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: db [offset 39 / size 67]
0:00:00.519291105 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: db [offset 108 / size 67]
0:00:00.519319594 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: dd [offset 177 / size 4]
0:00:00.519346285 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: e0 [offset 183 / size 4]
0:00:00.519372459 4395 0x55d6536e4520 WARN jpegparse gstjpegparse.c:764:gst_jpeg_parse_handle_frame:<jpegparse0> warning: Failed to parse app0 segment
0:00:00.519443409 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: c0 [offset 189 / size 17]
0:00:00.519443745 4395 0x55d6536f2380 WARN structure gststructure.c:2093:priv_gst_structure_append_to_gstring: No value transform to serialize field 'gerror' of type 'GError'
0:00:00.519484336 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:348:gst_jpeg_parse_sof:<jpegparse0> SOF [1920x1080] 3 comp - sYUV
0:00:00.519583160 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: da [offset 208 / size 12]
0:00:00.519614140 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: d0 [offset 342 / size 0]
0:00:00.519674957 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: d1 [offset 444 / size 0]
0:00:00.519703687 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: d2 [offset 536 / size 0]
0:00:00.519712056 4395 0x55d6536f2380 WARN structure gststructure.c:2093:priv_gst_structure_append_to_gstring: No value transform to serialize field 'gerror' of type 'GError'
0:00:00.519736401 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: d3 [offset 613 / size 0]
0:00:00.519809511 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: d4 [offset 699 / size 0]
0:00:00.519838587 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: d5 [offset 767 / size 0]
0:00:00.519866475 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: d6 [offset 851 / size 0]
0:00:00.519894092 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: d7 [offset 964 / size 0]
0:00:00.519921799 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: d0 [offset 1066 / size 0]
0:00:00.519948961 4395 0x55d6536e4520 INFO jpegparse gstjpegparse.c:720:gst_jpeg_parse_handle_frame:<jpegparse0> marker found: d1 [offset 1149 / size 0]
Device found:
name : video0
class : Video/Source
caps : video/x-raw, format=YUY2, width=640, height=480, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=160, height=120, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=176, height=144, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=320, height=176, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=320, height=240, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=432, height=240, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=352, height=288, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=544, height=288, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=640, height=360, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=752, height=416, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=800, height=448, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=864, height=480, framerate={ (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=960, height=544, framerate={ (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=1024, height=576, framerate={ (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=800, height=600, framerate={ (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=1184, height=656, framerate={ (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=960, height=720, framerate={ (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=1280, height=720, framerate={ (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=1392, height=768, framerate={ (fraction)10/1, (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=1504, height=832, framerate={ (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=1600, height=896, framerate={ (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=1280, height=960, framerate={ (fraction)15/2, (fraction)5/1 }
video/x-raw, format=YUY2, width=1712, height=960, framerate=5/1
video/x-raw, format=YUY2, width=1792, height=1008, framerate=5/1
video/x-raw, format=YUY2, width=1920, height=1080, framerate=5/1
image/jpeg, width=640, height=480, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=160, height=120, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=176, height=144, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=320, height=176, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=320, height=240, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=432, height=240, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=352, height=288, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=544, height=288, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=640, height=360, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=752, height=416, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=800, height=448, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=864, height=480, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=960, height=544, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=1024, height=576, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=800, height=600, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=1184, height=656, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=960, height=720, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=1280, height=720, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=1392, height=768, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=1504, height=832, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=1600, height=896, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=1280, height=960, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=1712, height=960, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=1792, height=1008, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
image/jpeg, width=1920, height=1080, framerate={ (fraction)30/1, (fraction)24/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)15/2, (fraction)5/1 }
properties:
object.path = v4l2:/dev/video0
device.api = v4l2
media.class = Video/Source
device.product.id = 0x082
device.vendor.id = 0x046
api.v4l2.path = /dev/video0
api.v4l2.cap.driver = uvcvideo
api.v4l2.cap.card = HD Webcam C525
api.v4l2.cap.bus_info = usb-0000:00:1a.0-1.1
api.v4l2.cap.version = 6.1.6
api.v4l2.cap.capabilities = 84a00001
api.v4l2.cap.device-caps = 04200001
device.id = 33
node.name = video0
node.description = video0
factory.name = api.v4l2.source
factory.id = 10
client.id = 31
clock.quantum-limit = 8192
media.role = Camera
node.driver = true
object.id = 40
object.serial = 41
gst-launch-1.0 pipewiresrc target-object=41 ! ...
# v4l2-ctl --all -d /dev/video0
Driver Info:
Driver name : uvcvideo
Card type : HD Webcam C525
Bus info : usb-0000:00:1a.0-1.1
Driver version : 6.1.6
Capabilities : 0x84a00001
Video Capture
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : uvcvideo
Model : HD Webcam C525
Serial : 28D79660
Bus info : usb-0000:00:1a.0-1.1
Media version : 6.1.6
Hardware revision: 0x00000010 (16)
Driver version : 6.1.6
Interface Info:
ID : 0x03000002
Type : V4L Video
Entity Info:
ID : 0x00000001 (1)
Name : HD Webcam C525
Function : V4L2 I/O
Flags : default
Pad 0x01000007 : 0: Sink
Link 0x02000019: from remote pad 0x100000a of entity 'Extension 5' (Video Pixel Formatter): Data, Enabled, Immutable
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
Width/Height : 1920/1080
Pixel Format : 'MJPG' (Motion-JPEG)
Field : None
Bytes per Line : 0
Size Image : 4147200
Colorspace : sRGB
Transfer Function : Rec. 709
YCbCr/HSV Encoding: ITU-R 601
Quantization : Default (maps to Full Range)
Flags :
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 1920, Height 1080
Default : Left 0, Top 0, Width 1920, Height 1080
Pixel Aspect: 1/1
Selection Video Capture: crop_default, Left 0, Top 0, Width 1920, Height 1080, Flags:
Selection Video Capture: crop_bounds, Left 0, Top 0, Width 1920, Height 1080, Flags:
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 0
User Controls
brightness 0x00980900 (int) : min=0 max=255 step=1 default=128 value=128
contrast 0x00980901 (int) : min=0 max=255 step=1 default=32 value=32
saturation 0x00980902 (int) : min=0 max=255 step=1 default=32 value=32
white_balance_automatic 0x0098090c (bool) : default=1 value=1
gain 0x00980913 (int) : min=0 max=255 step=1 default=64 value=44
power_line_frequency 0x00980918 (menu) : min=0 max=2 default=2 value=2 (60 Hz)
0: Disabled
1: 50 Hz
2: 60 Hz
white_balance_temperature 0x0098091a (int) : min=2800 max=6500 step=1 default=5500 value=5435 flags=inactive
sharpness 0x0098091b (int) : min=0 max=255 step=1 default=22 value=22
backlight_compensation 0x0098091c (int) : min=0 max=1 step=1 default=1 value=1
Camera Controls
auto_exposure 0x009a0901 (menu) : min=0 max=3 default=3 value=3 (Aperture Priority Mode)
1: Manual Mode
3: Aperture Priority Mode
exposure_time_absolute 0x009a0902 (int) : min=3 max=2047 step=1 default=166 value=332 flags=inactive
exposure_dynamic_framerate 0x009a0903 (bool) : default=0 value=1
pan_absolute 0x009a0908 (int) : min=-36000 max=36000 step=3600 default=0 value=0
tilt_absolute 0x009a0909 (int) : min=-36000 max=36000 step=3600 default=0 value=0
focus_absolute 0x009a090a (int) : min=0 max=255 step=5 default=60 value=65 flags=inactive
focus_automatic_continuous 0x009a090c (bool) : default=1 value=1
zoom_absolute 0x009a090d (int) : min=1 max=5 step=1 default=1 value=1
Edited by James Hilliard