[FFmpeg-trac] #8967(avcodec:new): FFmpeg fails with image2pipe while image2 works

FFmpeg trac at avcodec.org
Mon Nov 9 08:09:50 EET 2020


#8967: FFmpeg fails with image2pipe while image2 works
-------------------------------------+-------------------------------------
             Reporter:  fritsch      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avcodec
              Version:  unspecified  |               Resolution:
             Keywords:  mjpeg        |               Blocked By:
  regression kodi                    |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by fritsch):

 {{{
 ffmpeg -loglevel trace -f image2pipe -i ~/schurz/5gOk0JtwjdIv.jpg
 hurzmaster.jpg
 }}}

 fritsch at L380:~/Desktop/FFmpeg$ ./ffmpeg -loglevel trace -f image2pipe -i
 ~/schurz/5gOk0JtwjdIv.jpg hurzmaster.jpg
 ffmpeg version N-99888-g5c7823ff1c Copyright (c) 2000-2020 the FFmpeg
 developers
   built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
   configuration:
   libavutil      56. 60.100 / 56. 60.100
   libavcodec     58.112.101 / 58.112.101
   libavformat    58. 64.100 / 58. 64.100
   libavdevice    58. 11.102 / 58. 11.102
   libavfilter     7. 89.100 /  7. 89.100
   libswscale      5.  8.100 /  5.  8.100
   libswresample   3.  8.100 /  3.  8.100
 Splitting the commandline.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument 'trace'.
 Reading option '-f' ... matched as option 'f' (force format) with argument
 'image2pipe'.
 Reading option '-i' ... matched as input url with argument
 '/home/fritsch/schurz/5gOk0JtwjdIv.jpg'.
 Reading option 'hurzmaster.jpg' ... matched as output url.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option loglevel (set logging level) with argument trace.
 Successfully parsed a group of options.
 Parsing a group of options: input url
 /home/fritsch/schurz/5gOk0JtwjdIv.jpg.
 Applying option f (force format) with argument image2pipe.
 Successfully parsed a group of options.
 Opening an input file: /home/fritsch/schurz/5gOk0JtwjdIv.jpg.
 [image2pipe @ 0x55e967aa9780] Opening
 '/home/fritsch/schurz/5gOk0JtwjdIv.jpg' for reading
 [file @ 0x55e967aaa300] Setting default whitelist 'file,crypto,data'
 [image2pipe @ 0x55e967aa9780] Before avformat_find_stream_info() pos: 0
 bytes read:32768 seeks:0 nb_streams:1
 [mjpeg @ 0x55e967ab3b80] marker=d8 avail_size_in_buf=56310
 [mjpeg @ 0x55e967ab3b80] marker parser used 0 bytes (0 bits)
 [mjpeg @ 0x55e967ab3b80] marker=e0 avail_size_in_buf=56308
 [mjpeg @ 0x55e967ab3b80] marker parser used 16 bytes (128 bits)
 [mjpeg @ 0x55e967ab3b80] marker=e1 avail_size_in_buf=56290
 [mjpeg @ 0x55e967ab3b80] unable to decode APP fields: Invalid data found
 when processing input
 [mjpeg @ 0x55e967ab3b80] marker parser used 2 bytes (16 bits)
 [mjpeg @ 0x55e967ab3b80] marker=d9 avail_size_in_buf=24334
 [mjpeg @ 0x55e967ab3b80] Found EOI before any SOF, ignoring
 [mjpeg @ 0x55e967ab3b80] marker parser used 0 bytes (0 bits)
 [mjpeg @ 0x55e967ab3b80] No JPEG data found in image
 [mjpeg @ 0x55e967ab3b80] marker=d8 avail_size_in_buf=163491
 [mjpeg @ 0x55e967ab3b80] marker parser used 0 bytes (0 bits)
 [mjpeg @ 0x55e967ab3b80] marker=db avail_size_in_buf=163489
 [mjpeg @ 0x55e967ab3b80] index=0
 [mjpeg @ 0x55e967ab3b80] qscale[0]: 6
 [mjpeg @ 0x55e967ab3b80] index=1
 [mjpeg @ 0x55e967ab3b80] qscale[1]: 13
 [mjpeg @ 0x55e967ab3b80] marker parser used 132 bytes (1056 bits)
 [mjpeg @ 0x55e967ab3b80] marker=c4 avail_size_in_buf=163355
 [mjpeg @ 0x55e967ab3b80] marker parser used 0 bytes (0 bits)
 [mjpeg @ 0x55e967ab3b80] marker=c0 avail_size_in_buf=162935
 [mjpeg @ 0x55e967ab3b80] Changing bps from 0 to 8
 [mjpeg @ 0x55e967ab3b80] sof0: picture: 160x120
 [mjpeg @ 0x55e967ab3b80] component 0 2:1 id: 0 quant:0
 [mjpeg @ 0x55e967ab3b80] component 1 1:1 id: 1 quant:1
 [mjpeg @ 0x55e967ab3b80] component 2 1:1 id: 2 quant:1
 [mjpeg @ 0x55e967ab3b80] pix fmt id 21111100
 [mjpeg @ 0x55e967ab3b80] Format yuvj422p chosen by get_format().
 [mjpeg @ 0x55e967ab3b80] marker parser used 17 bytes (136 bits)
 [mjpeg @ 0x55e967ab3b80] escaping removed 159672 bytes
 [mjpeg @ 0x55e967ab3b80] marker=da avail_size_in_buf=162916
 [mjpeg @ 0x55e967ab3b80] marker parser used 3244 bytes (25952 bits)
 [mjpeg @ 0x55e967ab3b80] marker=d9 avail_size_in_buf=159663
 [mjpeg @ 0x55e967ab3b80] decode frame unused 159663 bytes
 [image2pipe @ 0x55e967aa9780] stream 0: start_time: NOPTS duration: NOPTS
 [image2pipe @ 0x55e967aa9780] format: start_time: NOPTS duration: NOPTS
 (estimate from bit rate) bitrate=0 kb/s
 [image2pipe @ 0x55e967aa9780] After avformat_find_stream_info() pos:
 219805 bytes read:219805 seeks:0 frames:2
 Input #0, image2pipe, from '/home/fritsch/schurz/5gOk0JtwjdIv.jpg':
   Duration: N/A, bitrate: N/A
     Stream #0:0, 2, 1/25: Video: mjpeg (Baseline), 1 reference frame,
 yuvj422p(pc, bt470bg/unknown/unknown, center), 160x120 [SAR 72:72 DAR
 4:3], 0/1, 25 tbr, 25 tbn, 25 tbc
 Successfully opened the file.
 Parsing a group of options: output url hurzmaster.jpg.
 Successfully parsed a group of options.
 Opening an output file: hurzmaster.jpg.
 Successfully opened the file.
 Stream mapping:
   Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native))
 Press [q] to stop, [?] for help
 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless
 if it occurs once at the start per stream)
 [mjpeg @ 0x55e967aaba80] marker=d8 avail_size_in_buf=56310
 [mjpeg @ 0x55e967aaba80] marker parser used 0 bytes (0 bits)
 [mjpeg @ 0x55e967aaba80] marker=e0 avail_size_in_buf=56308
 [mjpeg @ 0x55e967aaba80] marker parser used 16 bytes (128 bits)
 [mjpeg @ 0x55e967aaba80] marker=e1 avail_size_in_buf=56290
 [mjpeg @ 0x55e967aaba80] unable to decode APP fields: Invalid data found
 when processing input
 [mjpeg @ 0x55e967aaba80] marker parser used 2 bytes (16 bits)
 [mjpeg @ 0x55e967aaba80] marker=d9 avail_size_in_buf=24334
 [mjpeg @ 0x55e967aaba80] Found EOI before any SOF, ignoring
 [mjpeg @ 0x55e967aaba80] marker parser used 0 bytes (0 bits)
 '''[mjpeg @ 0x55e967aaba80] No JPEG data found in image
 Error while decoding stream #0:0: Invalid data found when processing
 input'''
 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless
 if it occurs once at the start per stream)
 [mjpeg @ 0x55e967aaba80] marker=d8 avail_size_in_buf=163491
 [mjpeg @ 0x55e967aaba80] marker parser used 0 bytes (0 bits)
 [mjpeg @ 0x55e967aaba80] marker=db avail_size_in_buf=163489
 [mjpeg @ 0x55e967aaba80] index=0
 [mjpeg @ 0x55e967aaba80] qscale[0]: 6
 [mjpeg @ 0x55e967aaba80] index=1
 [mjpeg @ 0x55e967aaba80] qscale[1]: 13
 [mjpeg @ 0x55e967aaba80] marker parser used 132 bytes (1056 bits)
 [mjpeg @ 0x55e967aaba80] marker=c4 avail_size_in_buf=163355
 [mjpeg @ 0x55e967aaba80] class=0 index=0 nb_codes=12
 [mjpeg @ 0x55e967aaba80] class=1 index=0 nb_codes=162
 [mjpeg @ 0x55e967aaba80] class=0 index=1 nb_codes=12
 [mjpeg @ 0x55e967aaba80] class=1 index=1 nb_codes=162
 [mjpeg @ 0x55e967aaba80] marker parser used 418 bytes (3344 bits)
 [mjpeg @ 0x55e967aaba80] marker=c0 avail_size_in_buf=162935
 [mjpeg @ 0x55e967aaba80] sof0: picture: 160x120
 [mjpeg @ 0x55e967aaba80] component 0 2:1 id: 0 quant:0
 [mjpeg @ 0x55e967aaba80] component 1 1:1 id: 1 quant:1
 [mjpeg @ 0x55e967aaba80] component 2 1:1 id: 2 quant:1
 [mjpeg @ 0x55e967aaba80] pix fmt id 21111100
 [mjpeg @ 0x55e967aaba80] Format yuvj422p chosen by get_format().
 [mjpeg @ 0x55e967aaba80] marker parser used 17 bytes (136 bits)
 [mjpeg @ 0x55e967aaba80] escaping removed 159672 bytes
 [mjpeg @ 0x55e967aaba80] marker=da avail_size_in_buf=162916
 [mjpeg @ 0x55e967aaba80] component: 0
 [mjpeg @ 0x55e967aaba80] component: 1
 [mjpeg @ 0x55e967aaba80] component: 2
 [mjpeg @ 0x55e967aaba80] marker parser used 3243 bytes (25944 bits)
 [mjpeg @ 0x55e967aaba80] marker=d9 avail_size_in_buf=159663
 [mjpeg @ 0x55e967aaba80] decode frame unused 159663 bytes
 detected 8 logical cores
 [graph 0 input from stream 0:0 @ 0x55e967b02f80] Setting 'video_size' to
 value '160x120'
 [graph 0 input from stream 0:0 @ 0x55e967b02f80] Setting 'pix_fmt' to
 value '13'
 [graph 0 input from stream 0:0 @ 0x55e967b02f80] Setting 'time_base' to
 value '1/25'
 [graph 0 input from stream 0:0 @ 0x55e967b02f80] Setting 'pixel_aspect' to
 value '72/72'
 [graph 0 input from stream 0:0 @ 0x55e967b02f80] Setting 'frame_rate' to
 value '25/1'
 [graph 0 input from stream 0:0 @ 0x55e967b02f80] w:160 h:120
 pixfmt:yuvj422p tb:1/25 fr:25/1 sar:72/72
 [format @ 0x55e967b01d00] Setting 'pix_fmts' to value
 'yuvj420p|yuvj422p|yuvj444p'
 [AVFilterGraph @ 0x55e967b01c00] query_formats: 4 queried, 3 merged, 0
 already done, 0 delayed
 [mjpeg @ 0x55e967ab16c0] Forcing thread count to 1 for MJPEG encoding, use
 -thread_type slice or a constant quantizer if you want to use multiple cpu
 cores
 [mjpeg @ 0x55e967ab16c0] intra_quant_bias = 96 inter_quant_bias = 0
 Output #0, image2, to 'hurzmaster.jpg':
   Metadata:
     encoder         : Lavf58.64.100
     Stream #0:0, 0, 1/25: Video: mjpeg, 1 reference frame, yuvj422p(pc,
 bt470bg/unknown/unknown, progressive, center), 160x120 [SAR 72:72 DAR
 4:3], 0/1, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
     Metadata:
       encoder         : Lavc58.112.101 mjpeg
     Side data:
       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
 Not duplicating 1 initial frames
 [image2 @ 0x55e967aabec0] Opening 'hurzmaster.jpg' for writing
 [file @ 0x55e967b83b00] Setting default whitelist 'file,crypto,data'
 [AVIOContext @ 0x55e967b89c80] Statistics: 0 seeks, 1 writeouts
 [out_0_0 @ 0x55e967b039c0] EOF on sink link out_0_0:default.
 No more output streams to write to, finishing.
 frame=    1 fps=0.0 q=3.1 Lsize=N/A time=00:00:00.08 bitrate=N/A
 speed=11.6x
 video:4kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 Input file #0 (/home/fritsch/schurz/5gOk0JtwjdIv.jpg):
   Input stream #0:0 (video): 2 packets read (219805 bytes); 1 frames
 decoded;
   Total: 2 packets (219805 bytes) demuxed
 Output file #0 (hurzmaster.jpg):
   Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (4307
 bytes);
   Total: 1 packets (4307 bytes) muxed
 1 frames successfully decoded, '''1 decoding errors'''
 [AVIOContext @ 0x55e967ab2700] Statistics: 219805 bytes read, 0 seeks


 Could reproduce with master from today:
 5c7823ff1cffff55f25169492d263bca934880a2

 Will try to bisect if I get a chance today.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8967#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list