Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#724 closed defect (invalid)

corrupted bmp video stream created when muxing bmp into avi

Reported by: Elon Musk Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: bmp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ffmpeg -i /tmp/example.avi -an -vcodec bmp /tmp/out.avi

Created avi have wrong video stream:
It is vertically flipped and translated to the right and may contain various artifacts.
Input file is irrelevant.

Change History (7)

comment:1 by Carl Eugen Hoyos, 12 years ago

Complete, uncut console output missing.

comment:2 by ami_stuff, 12 years ago

maybe there should be added a check like with mov format to disallow muxing strange codecs into avi

http://ffmpeg.org/ffmpeg-logo.png

C:\>ffmpeg -i C:\ffmpeg-logo.png -vcodec bmp bmp.avi
ffmpeg version N-35966-g1d0ae92, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 19 2011 13:01:15 with gcc 4.6.2
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libope
ncore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en
able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger -
-enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwben
c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
libxvid --enable-zlib
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 46. 1 / 53. 46. 1
  libavformat  53. 27. 0 / 53. 27. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, image2, from 'C:\ffmpeg-logo.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, bgra, 396x100, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'bgra' for codec 'bmp', auto-selecting format 'bgr24'
[buffer @ 020E1480] w:396 h:100 pixfmt:bgra tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 020E1700] auto-inserting filter 'auto-inserted scale 0' between th
e filter 'src' and the filter 'out'
[scale @ 020E1B40] w:396 h:100 fmt:bgra -> w:396 h:100 fmt:bgr24 flags:0x4
Output #0, avi, to 'bmp.avi':
  Metadata:
    ISFT            : Lavf53.27.0
    Stream #0:0: Video: bmp, bgr24, 396x100, q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> bmp)
Press [q] to stop, [?] for help
frame=    1 fps=  0 q=0.0 Lsize=     122kB time=00:00:00.04 bitrate=24911.6kbits
/s
video:116kB audio:0kB global headers:0kB muxing overhead 4.799165%

comment:3 by Carl Eugen Hoyos, 12 years ago

Isn't -vcodec rawvideo what you should use?
Or is there any reason to use -vcodec bmp instead? Is there a bmp movie that plays with WMP or QuickTime?

comment:4 by Carl Eugen Hoyos, 12 years ago

Keywords: bmp added
Resolution: invalid
Status: newclosed

I tried to find an avi or mov sample that contains bmp and plays with WMP or QuickTime, but did not succeed.
Please reopen if you can find such a sample.

If you want to encode rawvideo to avi or mov, please use -vcodec rawvideo.

comment:5 by Carl Eugen Hoyos, 12 years ago

Summary: corrupted bmp video stream created when muxing into avicorrupted bmp video stream created when muxing bmp into avi

comment:6 by compn, 11 years ago

i think people want -vcodec bmp to be an msrle encoder.

in reply to:  6 comment:7 by Carl Eugen Hoyos, 11 years ago

Replying to compn:

i think people want -vcodec bmp to be an msrle encoder.

How do you suggest should we call the (current) bmp encoder instead?

Note: See TracTickets for help on using tickets.