#108(undetermined:new): QT WRAW file decodes incorrectly
#108: QT WRAW file decodes incorrectly --------------------------+-------------------------- Reporter: ami_stuff | Type: defect Status: new | Priority: normal Component: undetermined | Version: unspecified Keywords: | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | --------------------------+-------------------------- 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 }}} -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/108> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#108: QT WRAW file decodes incorrectly ------------------------+--------------------------- Reporter: ami_stuff | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | ------------------------+--------------------------- Comment (by llogan): Confirming behavior. Video looks like static for me (assuming of course that's not what the video is supposed to look like): {{{ $ ffplay CarltonMovie2.mov ffplay version git-N-29342-ge4253b1, Copyright (c) 2003-2011 the FFmpeg developers built on Apr 24 2011 11:05:34 with gcc 4.6.0 20110415 (prerelease) configuration: --prefix=/usr --disable-optimizations libavutil 51. 0. 0 / 51. 0. 0 libavcodec 53. 1. 0 / 53. 1. 0 libavformat 53. 0. 3 / 53. 0. 3 libavdevice 53. 0. 0 / 53. 0. 0 libavfilter 2. 0. 0 / 2. 0. 0 libswscale 0. 13. 0 / 0. 13. 0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '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, 600 tbn, 600 tbc Metadata: creation_time : 2004-11-23 10:27:38 [ffsink @ 0x17a3a40] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out' [scale @ 0x17a4b50] w:44 h:41 fmt:pal8 -> w:44 h:41 fmt:yuv420p flags:0x4 9.20 A-V: 0.000 s:0.0 aq= 0KB vq= 0KB sq= 0B f=0/0 0/0 }}} -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/108#comment:1> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#108: QT WRAW file decodes incorrectly ----------------------+--------------------------- Reporter: ami_stuff | Owner: Type: defect | Status: open Priority: normal | Component: undetermined Version: git | Resolution: Keywords: | Blocked By: Blocking: | Reproduced: 1 Analyzed: 0 | ----------------------+--------------------------- Changes (by cehoyos): * status: new => open * version: unspecified => git * reproduced: 0 => 1 Comment: This is reproducible compared with current QuickTime player. -- Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/108#comment:2> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#108: QT WRAW file decodes incorrectly ----------------------+--------------------------- Reporter: ami_stuff | Owner: Type: defect | Status: open Priority: normal | Component: undetermined Version: git | Resolution: Keywords: | Blocked By: Blocking: | Reproduced: 1 Analyzed: 0 | ----------------------+--------------------------- Comment (by llogan): Replying to [comment:2 cehoyos]:
This is reproducible compared with current QuickTime player.
No. QuickTime 7.6.9 (1680.9) on Windows 7 produces a different looking output for me. [[Image(http://fakeoutdoorsman.com/ffmpeg/ticket108.png)]] -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/108#comment:3> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#108: QT WRAW file decodes incorrectly ----------------------+--------------------------- Reporter: ami_stuff | Owner: Type: defect | Status: open Priority: normal | Component: undetermined Version: git | Resolution: Keywords: | Blocked By: Blocking: | Reproduced: 1 Analyzed: 0 | ----------------------+--------------------------- Comment (by ami_stuff): one more QT WRAW sample: http://www.datafilehost.com/download-0d7e85a5.html -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/108#comment:4> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#108: QT WRAW file decodes incorrectly ----------------------+--------------------------- Reporter: ami_stuff | Owner: Type: defect | Status: open Priority: normal | Component: undetermined Version: git | Resolution: Keywords: | Blocked By: Blocking: | Reproduced: 1 Analyzed: 0 | ----------------------+--------------------------- Comment (by ami_stuff): 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 -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/108#comment:5> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#108: QT WRAW file decodes incorrectly ----------------------+--------------------------- Reporter: ami_stuff | Owner: Type: defect | Status: open Priority: normal | Component: undetermined Version: git | Resolution: Keywords: | Blocked By: Blocking: | Reproduced: 1 Analyzed: 0 | ----------------------+--------------------------- Comment (by ami_stuff): 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 -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/108#comment:6> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#108: QT WRAW file decodes incorrectly ----------------------+--------------------------- Reporter: ami_stuff | Owner: Type: defect | Status: open Priority: normal | Component: undetermined Version: git | Resolution: Keywords: | Blocked By: Blocking: | Reproduced: 1 Analyzed: 0 | ----------------------+--------------------------- Comment (by ami_stuff): *posted to ffmpeg-devel :) -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/108#comment:7> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#108: QT WRAW file decodes incorrectly ----------------------+---------------------- Reporter: ami_stuff | Owner: Type: defect | Status: closed Priority: normal | Component: avcodec Version: git | Resolution: fixed Keywords: | Blocked By: Blocking: | Reproduced: 1 Analyzed: 1 | ----------------------+---------------------- Changes (by saste): * analyzed: 0 => 1 * resolution: => fixed * status: open => closed * component: undetermined => avcodec Comment: 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: 1. all of the AVI/MOV WRAW files (at least from the link posted to the trac ticket #108) need to be flipped 2. mov WRAW files need to use AVI color modes 3. 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 :)! -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/108#comment:8> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#108: QT WRAW file decodes incorrectly ----------------------+---------------------- Reporter: ami_stuff | Owner: Type: defect | Status: closed Priority: normal | Component: avcodec Version: git | Resolution: fixed Keywords: | Blocked By: Blocking: | Reproduced: 1 Analyzed: 1 | ----------------------+---------------------- Comment (by ami_stuff): @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) }}} -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/108#comment:9> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#108: QT WRAW file decodes incorrectly -----------------------+---------------------- Reporter: ami_stuff | Owner: Type: defect | Status: closed Priority: normal | Component: avcodec Version: git-master | Resolution: fixed Keywords: | Blocked By: Blocking: | Reproduced: 1 Analyzed: 1 | -----------------------+---------------------- Changes (by cehoyos): * version: git => git-master Comment: Should be fixed. -- Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/108#comment:10> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#108: QT WRAW file decodes incorrectly --------------------------------------+----------------------------------- Reporter: ami_stuff | Owner: Type: defect | Status: closed Priority: normal | Component: avcodec Version: git-master | Resolution: fixed Keywords: mov rawvideo | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 1 | --------------------------------------+----------------------------------- Changes (by cehoyos): * keywords: => mov rawvideo -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/108#comment:11> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg