#108 closed defect (fixed)
QT WRAW file decodes incorrectly
Reported by: | ami_stuff | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | mov rawvideo |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | yes |
Description
attached QT WRAW file does not decode correctly
QT Player says it is: WRAW, 44x41, millions of colors, 15 fps
C:\>ffmpeg -i C:\CarltonMovie2.mov FFmpeg version git-N-29181-ga304071, Copyright (c) 2000-2011 the FFmpeg develope rs built on Apr 18 2011 21:24:03 with gcc 4.5.2 configuration: --enable-gpl --enable-version3 --enable-runtime-cpudetect --ena ble-memalign-hack --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm -- enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl e-libx264 --enable-libxavs --enable-libxvid --enable-zlib --cross-prefix=i686-w6 4-mingw32- --target-os=mingw32 --arch=x86_32 --extra-cflags=-I/home/kyle/softwar e/ffmpeg/external-libraries/win32/include --extra-ldflags=-L/home/kyle/software/ ffmpeg/external-libraries/win32/lib --pkg-config=pkg-config libavutil 50. 40. 1 / 50. 40. 1 libavcodec 52.120. 0 / 52.120. 0 libavformat 52.108. 0 / 52.108. 0 libavdevice 52. 4. 0 / 52. 4. 0 libavfilter 1. 79. 0 / 1. 79. 0 libswscale 0. 13. 0 / 0. 13. 0 Seems stream 0 codec frame rate differs from container frame rate: 600.00 (600/1 ) -> 15.00 (15/1) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\CarltonMovie2.mov': Metadata: creation_time : 2004-11-23 10:27:38 Duration: 00:00:03.26, start: 0.000000, bitrate: 656 kb/s Stream #0.0(eng): Video: rawvideo, pal8, 44x41, 649 kb/s, 15 fps, 15 tbr, 60 0 tbn, 600 tbc Metadata: creation_time : 2004-11-23 10:27:38 At least one output file must be specified
Attachments (1)
Change History (12)
by , 14 years ago
Attachment: | CarltonMovie2.mov added |
---|
comment:1 by , 14 years ago
follow-up: 3 comment:2 by , 14 years ago
Reproduced by developer: | set |
---|---|
Status: | new → open |
Version: | unspecified → git |
This is reproducible compared with current QuickTime player.
comment:3 by , 14 years ago
comment:5 by , 14 years ago
seems like 8bpp WRAW files in mov needs to be flipped as well
http://origin.www.nature.com/ni/journal/v6/n12/extref/ni1272-S13.mov
http://www.solstice.de/grundl_d_tph/exp_besch/zyklotron.mov
more samples here (search for WRAW string):
http://home.roadrunner.com/~compn/uncommon_video_codecs_final.txt
comment:6 by , 14 years ago
WRAW 8bpp in avi seems to need a flip as well, so my patch posted to libav-devel seems to be correct
http://www.aoc.nrao.edu/events/synthesis/2008/lectures/test-mars.avi
comment:8 by , 14 years ago
Analyzed by developer: | set |
---|---|
Component: | undetermined → avcodec |
Resolution: | → fixed |
Status: | open → closed |
Fixed in commit:
commit 040e1c67edab57177adb88a7dd1cc9ed38d2b74e
Author: ami_stuff <ami_stuff@o2.pl>
Date: Tue May 24 23:38:01 2011 +0200
rawdec: fix decoding of QT WRAW files
Fix decoding of QT WRAW files.
From some tests it results that:
- all of the AVI/MOV WRAW files (at least from the link posted to the trac ticket #108) need to be flipped
- mov WRAW files need to use AVI color modes
- assigning PAL8 mode by default to WRAW codec is not correct
Fix decoding of file CarltonMovie2.mov, fix trac issue #108.
I tried with all samples, note that ~/samples/nature06421-s4.mov crashes ffplay, this looks like a swscale bug (you can reproduce it with -vf scale=368:233,format=bgra).
Thanks again for the accurate report and the patch :)!
comment:9 by , 14 years ago
@saste
something like this seems to fix "nature06421-s4.mov" here (I test on big-endian)
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index 9702f98..75b1e6e 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -90,8 +90,12 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) if (avctx->codec_tag == MKTAG('r','a','w',' ')) avctx->pix_fmt = ff_find_pix_fmt(pix_fmt_bps_mov, avctx->bits_per_coded_sample); - else if (avctx->codec_tag == MKTAG('W','R','A','W')) + else if (avctx->codec_tag == MKTAG('W','R','A','W')){ + if (avctx->bits_per_coded_sample == 32) + avctx->pix_fmt = PIX_FMT_BGRA; + else avctx->pix_fmt = ff_find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample); + } else if (avctx->codec_tag) avctx->pix_fmt = ff_find_pix_fmt(ff_raw_pix_fmt_tags, avctx->codec_tag); else if (avctx->pix_fmt == PIX_FMT_NONE && avctx->bits_per_coded_sample)
comment:11 by , 13 years ago
Keywords: | mov rawvideo added |
---|
Confirming behavior. Video looks like static for me (assuming of course that's not what the video is supposed to look like):