[FFmpeg-trac] #8967(avcodec:new): FFmpeg fails with image2pipe while image2 works
FFmpeg
trac at avcodec.org
Sun Nov 8 17:33:34 EET 2020
#8967: FFmpeg fails with image2pipe while image2 works
------------------------------------+----------------------------------
Reporter: fritsch | Type: defect
Status: new | Priority: normal
Component: avcodec | Version:
Keywords: 4.3.1 kodi | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+----------------------------------
Summary of the bug:
How to reproduce:
{{{
% ffmpeg -loglevel trace -f image2pipe -i ~/schurz/5gOk0JtwjdIv.jpg
hurz2.jpg
3.4.1
built on x86_43
}}}
Working:
{{{
% ffmpeg -loglevel trace -f image2 -i ~/schurz/5gOk0JtwjdIv.jpg hurz2.jpg
}}}
Patches should be submitted to the ffmpeg-devel mailing list and not this
bug tracker.
Output of failure:
fritsch at L380:~/Desktop/FFmpeg$ ./ffmpeg -loglevel trace -f image2pipe -i
~/schurz/5gOk0JtwjdIv.jpg hurz2.jpg
ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
configuration:
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.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 'hurz2.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 @ 0x55986b9f0780] Opening
'/home/fritsch/schurz/5gOk0JtwjdIv.jpg' for reading
[file @ 0x55986b9f1300] Setting default whitelist 'file,crypto,data'
[image2pipe @ 0x55986b9f0780] Before avformat_find_stream_info() pos: 0
bytes read:32768 seeks:0 nb_streams:1
[mjpeg @ 0x55986b9faac0] marker=d8 avail_size_in_buf=56310
[mjpeg @ 0x55986b9faac0] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x55986b9faac0] marker=e0 avail_size_in_buf=56308
[mjpeg @ 0x55986b9faac0] marker parser used 16 bytes (128 bits)
[mjpeg @ 0x55986b9faac0] marker=e1 avail_size_in_buf=56290
[mjpeg @ 0x55986b9faac0] unable to decode APP fields: Invalid data found
when processing input
[mjpeg @ 0x55986b9faac0] marker parser used 2 bytes (16 bits)
[mjpeg @ 0x55986b9faac0] marker=d9 avail_size_in_buf=24334
[mjpeg @ 0x55986b9faac0] Found EOI before any SOF, ignoring
[mjpeg @ 0x55986b9faac0] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x55986b9faac0] No JPEG data found in image
[mjpeg @ 0x55986b9faac0] marker=d8 avail_size_in_buf=163491
[mjpeg @ 0x55986b9faac0] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x55986b9faac0] marker=db avail_size_in_buf=163489
[mjpeg @ 0x55986b9faac0] index=0
[mjpeg @ 0x55986b9faac0] qscale[0]: 6
[mjpeg @ 0x55986b9faac0] index=1
[mjpeg @ 0x55986b9faac0] qscale[1]: 13
[mjpeg @ 0x55986b9faac0] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x55986b9faac0] marker=c4 avail_size_in_buf=163355
[mjpeg @ 0x55986b9faac0] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x55986b9faac0] marker=c0 avail_size_in_buf=162935
[mjpeg @ 0x55986b9faac0] Changing bps from 0 to 8
[mjpeg @ 0x55986b9faac0] sof0: picture: 160x120
[mjpeg @ 0x55986b9faac0] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x55986b9faac0] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x55986b9faac0] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x55986b9faac0] pix fmt id 21111100
[mjpeg @ 0x55986b9faac0] Format yuvj422p chosen by get_format().
[mjpeg @ 0x55986b9faac0] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x55986b9faac0] escaping removed 159672 bytes
[mjpeg @ 0x55986b9faac0] marker=da avail_size_in_buf=162916
[mjpeg @ 0x55986b9faac0] marker parser used 3244 bytes (25952 bits)
[mjpeg @ 0x55986b9faac0] marker=d9 avail_size_in_buf=159663
[mjpeg @ 0x55986b9faac0] decode frame unused 159663 bytes
[image2pipe @ 0x55986b9f0780] stream 0: start_time: NOPTS duration: NOPTS
[image2pipe @ 0x55986b9f0780] format: start_time: NOPTS duration: NOPTS
(estimate from bit rate) bitrate=0 kb/s
[image2pipe @ 0x55986b9f0780] 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 hurz2.jpg.
Successfully parsed a group of options.
Opening an output file: hurz2.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 @ 0x55986b9f2740] marker=d8 avail_size_in_buf=56310
[mjpeg @ 0x55986b9f2740] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x55986b9f2740] marker=e0 avail_size_in_buf=56308
[mjpeg @ 0x55986b9f2740] marker parser used 16 bytes (128 bits)
[mjpeg @ 0x55986b9f2740] marker=e1 avail_size_in_buf=56290
[mjpeg @ 0x55986b9f2740] unable to decode APP fields: Invalid data found
when processing input
[mjpeg @ 0x55986b9f2740] marker parser used 2 bytes (16 bits)
[mjpeg @ 0x55986b9f2740] marker=d9 avail_size_in_buf=24334
[mjpeg @ 0x55986b9f2740] Found EOI before any SOF, ignoring
[mjpeg @ 0x55986b9f2740] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x55986b9f2740] 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 @ 0x55986b9f2740] marker=d8 avail_size_in_buf=163491
[mjpeg @ 0x55986b9f2740] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x55986b9f2740] marker=db avail_size_in_buf=163489
[mjpeg @ 0x55986b9f2740] index=0
[mjpeg @ 0x55986b9f2740] qscale[0]: 6
[mjpeg @ 0x55986b9f2740] index=1
[mjpeg @ 0x55986b9f2740] qscale[1]: 13
[mjpeg @ 0x55986b9f2740] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x55986b9f2740] marker=c4 avail_size_in_buf=163355
[mjpeg @ 0x55986b9f2740] class=0 index=0 nb_codes=12
[mjpeg @ 0x55986b9f2740] class=1 index=0 nb_codes=251
[mjpeg @ 0x55986b9f2740] class=0 index=1 nb_codes=12
[mjpeg @ 0x55986b9f2740] class=1 index=1 nb_codes=251
[mjpeg @ 0x55986b9f2740] marker parser used 418 bytes (3344 bits)
[mjpeg @ 0x55986b9f2740] marker=c0 avail_size_in_buf=162935
[mjpeg @ 0x55986b9f2740] sof0: picture: 160x120
[mjpeg @ 0x55986b9f2740] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x55986b9f2740] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x55986b9f2740] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x55986b9f2740] pix fmt id 21111100
[mjpeg @ 0x55986b9f2740] Format yuvj422p chosen by get_format().
[mjpeg @ 0x55986b9f2740] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x55986b9f2740] escaping removed 159672 bytes
[mjpeg @ 0x55986b9f2740] marker=da avail_size_in_buf=162916
[mjpeg @ 0x55986b9f2740] component: 0
[mjpeg @ 0x55986b9f2740] component: 1
[mjpeg @ 0x55986b9f2740] component: 2
[mjpeg @ 0x55986b9f2740] marker parser used 3243 bytes (25944 bits)
[mjpeg @ 0x55986b9f2740] marker=d9 avail_size_in_buf=159663
[mjpeg @ 0x55986b9f2740] decode frame unused 159663 bytes
detected 8 logical cores
[graph 0 input from stream 0:0 @ 0x55986ba49780] Setting 'video_size' to
value '160x120'
[graph 0 input from stream 0:0 @ 0x55986ba49780] Setting 'pix_fmt' to
value '13'
[graph 0 input from stream 0:0 @ 0x55986ba49780] Setting 'time_base' to
value '1/25'
[graph 0 input from stream 0:0 @ 0x55986ba49780] Setting 'pixel_aspect' to
value '72/72'
[graph 0 input from stream 0:0 @ 0x55986ba49780] Setting 'frame_rate' to
value '25/1'
[graph 0 input from stream 0:0 @ 0x55986ba49780] w:160 h:120
pixfmt:yuvj422p tb:1/25 fr:25/1 sar:72/72
[format @ 0x55986ba49bc0] Setting 'pix_fmts' to value
'yuvj420p|yuvj422p|yuvj444p'
[AVFilterGraph @ 0x55986b9f9000] query_formats: 4 queried, 3 merged, 0
already done, 0 delayed
[mjpeg @ 0x55986b9f4b80] 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 @ 0x55986b9f4b80] intra_quant_bias = 96 inter_quant_bias = 0
Output #0, image2, to 'hurz2.jpg':
Metadata:
encoder : Lavf58.45.100
Stream #0:0, 0, 1/25: Video: mjpeg, 1 reference frame, yuvj422p(pc,
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.91.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
Not duplicating 1 initial frames
[image2 @ 0x55986b9f2b80] Opening 'hurz2.jpg' for writing
[file @ 0x55986baca4c0] Setting default whitelist 'file,crypto,data'
[AVIOContext @ 0x55986bad0840] Statistics: 0 seeks, 1 writeouts
[out_0_0 @ 0x55986ba4a300] 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=25.1x
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 (hurz2.jpg):
Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (4306
bytes);
Total: 1 packets (4306 bytes) muxed
1 frames successfully decoded, '''1 decoding errors'''
[AVIOContext @ 0x55986b9f9700] Statistics: 219805 bytes read, 0 seeks
We use the image pipe functionality in kodi, via:
https://github.com/xbmc/xbmc/blob/master/xbmc/guilib/FFmpegImage.cpp#L199
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8967>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list