[FFmpeg-trac] #10200(ffmpeg:new): Piping WEBP image will produce a broken image

FFmpeg trac at avcodec.org
Fri Feb 17 04:10:38 EET 2023


#10200: Piping WEBP image will produce a broken image
---------------------------------------+----------------------------------
             Reporter:  lolcat         |                     Type:  defect
               Status:  new            |                 Priority:  normal
            Component:  ffmpeg         |                  Version:  4.3.5
             Keywords:  webp, sigpipe  |               Blocked By:
             Blocking:                 |  Reproduced by developer:  0
Analyzed by developer:  0              |
---------------------------------------+----------------------------------
 Hello. I've been trying to convert a video to an animated webp thumbnail
 image. This command doesn't work, because the output is piped. When I
 output to a file on disk, this problem does not occur. Here is my command:
 {{{#!sh
 ffmpeg -i 'https://th.bing.com/th?id=OMB1.7pHOr_m7KOKS3w&pid=2.1' -vf
 "fps=10,scale=148:83:flags=lanczos" -vcodec libwebp -lossless 0
 -compression_level 6 -q:v 50 -loop 0 -preset picture -an -f webp - >
 test.webp
 }}}

 But if I use the following command:
 {{{#!sh
 ffmpeg -i 'https://th.bing.com/th?id=OMB1.7pHOr_m7KOKS3w&pid=2.1' -vf
 "fps=10,scale=148:83:flags=lanczos" -vcodec libwebp -lossless 0
 -compression_level 6 -q:v 50 -loop 0 -preset picture -an -f webp out.webp
 }}}

 The image will load just fine in all modern browsers (notice at the end,
 I'm outputting to a file instead of a pipe). When using hexedit, I found
 out that the bytes 5 to 7 are all 0s, when it should be `88 B4 05`.
 Patching these bytes in manually magically fixes the image.

 Thank you!
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10200>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list