Opened 14 years ago

Closed 13 years ago

#9 closed defect (needs_more_info)

libswscale MMX2 giving videos a pink lined overlay

Reported by: Darren Owned by: Michael Niedermayer
Priority: normal Component: swscale
Version: git Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ffmpeg -i video.avi -vcodec libx264 -sameq -fpre ffpresets\libx264-medium.ffpreset -fpre ffpresets\libx264-ipod320.ffpreset -map_meta_data -1 -acodec aac -ab 128k -ac 2 -threads 3 -s 480x320 -sws_flags bicubic+mmx2 -crf 22 -strict experimental video.mp4

Output: www.bizzeh.com/files/video.mp4
Tested with ffmpeg git-9f8f62d x86 static mingw32

Using without the sws_flags and allowing sws to fall back to the C implementation gives a perfect output as expected

Change History (26)

comment:1 by Darren, 14 years ago

just tested, also happens if you switch the method to bilinear with mmx2. and the same thing happens with both when using 3dnow. appears to be cpu optimisations in general

comment:2 by Darren, 14 years ago

Lastly, just incase its needed, ffmpeg build info:

FFmpeg version git-9f8f62d, Copyright (c) 2000-2011 the FFmpeg developers

built on Mar 15 2011 00:12:46 with gcc 4.5.2
configuration:

--arch=x86
--cross-prefix=i686-pc-mingw32-
--target-os=mingw32
--prefix=/ffmpeg/builds/git-9f8f62d
--enable-memalign-hack
--enable-shared
--disable-static
--enable-w32threads
--disable-debug
--enable-gpl
--enable-version3
--enable-runtime-cpudetect
--enable-zlib
--enable-bzlib
--enable-avisynth
--enable-postproc
--enable-libmp3lame
--enable-libx264
--enable-libvorbis
--enable-libtheora
--enable-libspeex
--enable-libopencore-amrnb
--enable-libopencore-amrwb
--enable-libxvid
--enable-libgsm
--enable-libvpx
--disable-decoder=libvpx
--enable-librtmp
--enable-libopenjpeg
--enable-frei0r
--enable-libxavs
--cc='ccache i686-pc-mingw32-gcc'

libavutil 50. 39. 0 / 50. 39. 0
libavcodec 52.114. 0 / 52.114. 0
libavformat 52.103. 0 / 52.103. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1. 76. 0 / 1. 76. 0
libswscale 0. 12. 0 / 0. 12. 0
libpostproc 51. 2. 0 / 51. 2. 0

comment:3 by Carl Eugen Hoyos, 14 years ago

Is x264 required to reproduce the problem?
Is a specific input video required?

comment:4 by Carl Eugen Hoyos, 14 years ago

Component: FFmpegswscale

comment:5 by Darren, 14 years ago

tested with mpeg2video also, same thing happens. both videos where xvid+ac3 input in an avi container

comment:6 by Carl Eugen Hoyos, 14 years ago

Please post command line and complete, uncut output when you experience your problem (without using external libraries).
And consider using "Code Block": { { { .... } } }

Last edited 14 years ago by Carl Eugen Hoyos (previous) (diff)

comment:7 by Darren, 14 years ago

FFmpeg version git-N-28533-g849f80f, Copyright (c) 2000-2011 the FFmpeg develope
rs
  built on Mar 21 2011 00:08:35 with gcc 4.5.2
  configuration: --arch=x86 --cross-prefix=i686-pc-mingw32- --target-os=mingw32
--prefix=/ffmpeg/builds/git-N-28533-g849f80f-shared --enable-memalign-hack --ena
ble-shared --disable-static --enable-w32threads --disable-debug --enable-gpl --e
nable-version3 --enable-runtime-cpudetect --enable-zlib --enable-bzlib --enable-
avisynth --enable-postproc --enable-libmp3lame --enable-libx264 --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libxvid --enable-libgsm --enable-libvpx --disable-decoder
=libvpx --enable-librtmp --enable-libopenjpeg --enable-frei0r --enable-libxavs -
-extra-ldflags=-L/usr/i686-pc-mingw32/usr/lib --cc='ccache i686-pc-mingw32-gcc'
  libavutil    50. 40. 0 / 50. 40. 0
  libavcodec   52.114. 0 / 52.114. 0
  libavformat  52.103. 0 / 52.103. 0
  libavdevice  52.  3. 0 / 52.  3. 0
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 12. 0 /  0. 12. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[mpeg4 @ 006214b0] Invalid and inefficient vfw-avi packed B frames detected

Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (300
00/1) -> 29.97 (30000/1001)
Input #0, avi, from 'C:\ffmpeg\in\The Cosmos - 01x01 - The Shores of the Cosmic
Ocean.avi':
  Metadata:
    encoder         : Nandub v1.0rc2
  Duration: 01:00:24.91, start: 0.000000, bitrate: 1618 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 496x384 [PAR 1:1 DAR 31:24], 29.97 fps,
29.97 tbr, 29.97 tbn, 30k tbc
    Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 126 kb/s
-map_meta_data is deprecated and will be removed soon. Use -map_metadata instead
.
File 'tmp\The Cosmos - 01x01 - The Shores of the Cosmic Ocean.mp4' already exist
s. Overwrite ? [y/N] y
[buffer @ 0054c690] w:496 h:384 pixfmt:yuv420p
[setdar @ 00630110] a:31/24
[scale @ 006300d0] w:496 h:384 fmt:yuv420p -> w:480 h:320 fmt:yuv420p flags:0x40
000002
[setdar @ 00630110] w:480 h:320 -> dar:31/24 par:31/36
[libx264 @ 006191e0] using SAR=31/36
[libx264 @ 006191e0] frame MB size (30x20) > level limit (396)
[libx264 @ 006191e0] VBV buffer (3000) > level limit (2000)
[libx264 @ 006191e0] MB rate (17982) > level limit (11880)
[libx264 @ 006191e0] using cpu capabilities: MMX2 SSE2Slow SlowCTZ
[libx264 @ 006191e0] profile Constrained Baseline, level 1.3
[libx264 @ 006191e0] 264 - core 114 r1913 5fd3dce - H.264/MPEG-4 AVC codec - Cop
yleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=0 ref=3 deb
lock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 m
e_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chro
ma_qp_offset=-2 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrai
ned_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refre
sh=0 rc_lookahead=40 rc=crf mbtree=1 crf=22.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep
=4 vbv_maxrate=768 vbv_bufsize=3000 crf_max=0.0 nal_hrd=none ip_ratio=1.41 aq=1:
1.00
[aac @ 0061b120] The requested thread algorithm is not supported with this threa
d library.
Output #0, mp4, to 'tmp\The Cosmos - 01x01 - The Shores of the Cosmic Ocean.mp4'
:
  Metadata:
    encoder         : Lavf52.103.0
    Stream #0.0: Video: libx264, yuv420p, 480x320 [PAR 31:36 DAR 31:24], q=0-69,
 200 kb/s, 30k tbn, 29.97 tbc
    Stream #0.1: Audio: aac, 48000 Hz, stereo, s16, 128 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
[mpeg4 @ 006214b0] Invalid and inefficient vfw-avi packed B frames detected
frame=  285 fps=102 q=-1.0 Lsize=     323kB time=9.44 bitrate= 279.8kbits/s
video:201kB audio:115kB global headers:0kB muxing overhead 2.249626%
frame I:2     Avg QP:21.70  size:  8249
[libx264 @ 006191e0] frame P:283   Avg QP:25.81  size:   666
[libx264 @ 006191e0] mb I  I16..4: 70.3%  0.0% 29.8%
[libx264 @ 006191e0] mb P  I16..4:  2.4%  0.0%  0.4%  P16..4: 11.9%  2.4%  0.7%
 0.0%  0.0%    skip:82.1%
[libx264 @ 006191e0] coded y,uvDC,uvAC intra: 27.0% 35.9% 10.0% inter: 5.8% 5.5%
 0.2%
[libx264 @ 006191e0] i16 v,h,dc,p: 100%  0%  0%  0%
[libx264 @ 006191e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 94%  1%  3%  0%  0%  1%  0%
 1%  0%
[libx264 @ 006191e0] i8c dc,h,v,p:  4%  0% 96%  0%
[libx264 @ 006191e0] ref P L0: 91.7%  5.3%  3.0%
[libx264 @ 006191e0] kb/s:172.39
Received signal 2: terminating.

comment:8 by Carl Eugen Hoyos, 14 years ago

Please post a (minimal) command line (without using external libraries) and its output so I can try to reproduce the problem.

comment:9 by Darren, 14 years ago

FFmpeg version git-N-28544-g60c68c0

./configure --arch=x86 --cross-prefix=i686-pc-mingw32- --target-os=mingw32 --prefix=/ffmpeg/builds/git-N-28533-g849f80f-shared --enable-memalign-hack --enable-shared --disable-static --enable-w32threads --disable-debug --enable-gpl --enable-version3 --enable-runtime-cpudetect --enable-postproc
ffmpeg -i "in\The Cosmos - 01x01 - The Shores of the Cosmic Ocean.avi" -target pal-dvd -ps 2000000000 -aspect 16:9 -b 3500k -acodec mp2 -ar 48000 -ab 192k -sws_flags bilinear+3dnow -threads 3 "out\The Cosmos - 01x01 - The Shores of the Cosmic Ocean.mpg"

Output: Cosmos - 01x01 - The Shores of the Cosmic Ocean.mpg

happens when i use 3dnow or mmx2, but works fine without sws_flags (ie, sws not using optimisations)

comment:10 by compn, 14 years ago

what cpu are you using when encoding?

comment:11 by Darren, 14 years ago

AMD Athlon x2 Dual Core 6000+ with 4GB of corsair ram

comment:12 by Darren, 14 years ago

just incase, ffmpeg is being built with a:

Intel Xeon X3220 @ 2.40GHz (Quad Core)

i dont have any -march or -mcpu or -mtune set, so i dont think its anything to do with this, just though it could help

comment:13 by compn, 14 years ago

i'm just curious why you are using mmx2 or 3dnow opts on such a cpu?

seems like it would slow things down...
(are you just testing odd swscale options for fixing them?)

comment:14 by Carl Eugen Hoyos, 14 years ago

I'd like to ask again for a command line (as short as possible, not using external libraries like x264) that allows to reproduce the problem together with its complete, uncut output.

comment:15 by Darren, 14 years ago

i want to use mmx2 or 3dnow because i usually get 70fps on x264, with 3dnow or mmx2 enabled in sws, i get around 120fps, though i dont know if thats because its broke, or if its because thats what the optimisations do.

but here is the output from the minimal configure line i posted before:

c:\ffmpeg>ffmpeg -i defaced-insidejob-xvid.avi -target pal-dvd -ps 2000000000 -a
spect 16:9 -b 3500k -acodec mp2 -ar 48000 -ab 192k -sws_flags bilinear+3dnow -th
reads 3 test.mpg
FFmpeg version git-N-28544-g60c68c0, Copyright (c) 2000-2011 the FFmpeg develope
rs
  built on Mar 21 2011 12:29:11 with gcc 4.5.2
  configuration: --arch=x86 --cross-prefix=i686-pc-mingw32- --target-os=mingw32
--prefix=/ffmpeg/builds/git-N-28533-g849f80f-shared --enable-memalign-hack --ena
ble-shared --disable-static --enable-w32threads --disable-debug --enable-gpl --e
nable-version3 --enable-runtime-cpudetect --enable-postproc
  libavutil    50. 40. 0 / 50. 40. 0
  libavcodec   52.114. 0 / 52.114. 0
  libavformat  52.103. 0 / 52.103. 0
  libavdevice  52.  3. 0 / 52.  3. 0
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 12. 0 /  0. 12. 0
  libpostproc  51.  2. 0 / 51.  2. 0

Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/
2733) -> 23.98 (10000000/417083)
Input #0, avi, from 'defaced-insidejob-xvid.avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
  Duration: 01:48:38.50, start: 0.000000, bitrate: 901 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 640x272 [PAR 1:1 DAR 40:17], 23.98 tbr,
23.98 tbn, 23.98 tbc
    Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 127 kb/s
[buffer @ 005f2500] w:640 h:272 pixfmt:yuv420p
[setdar @ 005f25c0] a:16/9
[scale @ 005f2580] w:640 h:272 fmt:yuv420p -> w:720 h:576 fmt:yuv420p flags:0x40
000002
[setdar @ 005f25c0] w:720 h:576 -> dar:16/9 par:64/45
[mp2 @ 005eb000] The requested thread algorithm is not supported with this threa
d library.
Output #0, dvd, to 'test.mpg':
  Metadata:
    encoder         : Lavf52.103.0
    Stream #0.0: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], q=2-3
1, 3500 kb/s, 90k tbn, 25 tbc
    Stream #0.1: Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame=   90 fps=  0 q=2.0 size=     374kB time=3.56 bitrate= 860.6kbits/s dup=4
frame=  185 fps=184 q=2.0 size=     698kB time=7.36 bitrate= 776.9kbits/s dup=8
frame=  270 fps=179 q=2.0 size=    1128kB time=10.76 bitrate= 858.8kbits/s dup=1
frame=  278 fps=178 q=2.0 Lsize=    1182kB time=11.08 bitrate= 873.9kbits/s dup=
11 drop=0
video:839kB audio:272kB global headers:0kB muxing overhead 6.413649%
Received signal 2: terminating.

comment:16 by Carl Eugen Hoyos, 14 years ago

Is the "threads" option necessary to reproduce the problem?
(And "target" or "aspect"?)
Are "ar", "ab" and "acodec" necessary or is it also reproducible with "an" instead?

comment:17 by Darren, 14 years ago

This still produces the error:

ffmpeg -i "in\The Cosmos - 01x01 - The Shores of the Cosmic Ocean.avi" -target pal-dvd -sws_flags bilinear+3dnow test.mpg
FFmpeg version git-N-28544-g60c68c0, Copyright (c) 2000-2011 the FFmpeg develope
rs
  built on Mar 21 2011 12:29:11 with gcc 4.5.2
  configuration: --arch=x86 --cross-prefix=i686-pc-mingw32- --target-os=mingw32
--prefix=/ffmpeg/builds/git-N-28533-g849f80f-shared --enable-memalign-hack --ena
ble-shared --disable-static --enable-w32threads --disable-debug --enable-gpl --e
nable-version3 --enable-runtime-cpudetect --enable-postproc
  libavutil    50. 40. 0 / 50. 40. 0
  libavcodec   52.114. 0 / 52.114. 0
  libavformat  52.103. 0 / 52.103. 0
  libavdevice  52.  3. 0 / 52.  3. 0
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 12. 0 /  0. 12. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[mpeg4 @ 004ef400] Invalid and inefficient vfw-avi packed B frames detected

Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (300
00/1) -> 29.97 (30000/1001)
Input #0, avi, from 'in\The Cosmos - 01x01 - The Shores of the Cosmic Ocean.avi'
:
  Metadata:
    encoder         : Nandub v1.0rc2
  Duration: 01:00:24.91, start: 0.000000, bitrate: 1618 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 496x384 [PAR 1:1 DAR 31:24], 29.97 fps,
29.97 tbr, 29.97 tbn, 30k tbc
    Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 126 kb/s
Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
File 'test.mpg' already exists. Overwrite ? [y/N] y
[buffer @ 00608ef0] w:496 h:384 pixfmt:yuv420p
[setdar @ 00609c80] a:31/24
[scale @ 00609200] w:496 h:384 fmt:yuv420p -> w:720 h:576 fmt:yuv420p flags:0x40
000002
[setdar @ 00609c80] w:720 h:576 -> dar:31/24 par:31/30
[ac3 @ 005f8a00] The requested thread algorithm is not supported with this threa
d library.
Output #0, dvd, to 'test.mpg':
  Metadata:
    encoder         : Lavf52.103.0
    Stream #0.0: Video: mpeg2video, yuv420p, 720x576 [PAR 31:30 DAR 31:24], q=2-
31, 6000 kb/s, 90k tbn, 25 tbc
    Stream #0.1: Audio: ac3, 48000 Hz, stereo, flt, 448 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
[mpeg4 @ 004ef400] Invalid and inefficient vfw-avi packed B frames detected
frame=   62 fps=  0 q=2.0 size=     324kB time=2.44 bitrate=1087.8kbits/s dup=0
Last edited 14 years ago by Darren (previous) (diff)

comment:18 by Darren, 14 years ago

This doesn't seem to produce the error (removed -target), though i think this is because no scalling is going on as the -target sets the output size to dvd resolution:

ffmpeg -i "in\The Cosmos - 01x01 - The Shores of the Cosmic Ocean.avi" -sws_flags bilinear+3dnow test.mpg
FFmpeg version git-N-28544-g60c68c0, Copyright (c) 2000-2011 the FFmpeg develope
rs
  built on Mar 21 2011 12:29:11 with gcc 4.5.2
  configuration: --arch=x86 --cross-prefix=i686-pc-mingw32- --target-os=mingw32
--prefix=/ffmpeg/builds/git-N-28533-g849f80f-shared --enable-memalign-hack --ena
ble-shared --disable-static --enable-w32threads --disable-debug --enable-gpl --e
nable-version3 --enable-runtime-cpudetect --enable-postproc
  libavutil    50. 40. 0 / 50. 40. 0
  libavcodec   52.114. 0 / 52.114. 0
  libavformat  52.103. 0 / 52.103. 0
  libavdevice  52.  3. 0 / 52.  3. 0
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 12. 0 /  0. 12. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[mpeg4 @ 003ff390] Invalid and inefficient vfw-avi packed B frames detected

Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (300
00/1) -> 29.97 (30000/1001)
Input #0, avi, from 'in\The Cosmos - 01x01 - The Shores of the Cosmic Ocean.avi'
:
  Metadata:
    encoder         : Nandub v1.0rc2
  Duration: 01:00:24.91, start: 0.000000, bitrate: 1618 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 496x384 [PAR 1:1 DAR 31:24], 29.97 fps,
29.97 tbr, 29.97 tbn, 30k tbc
    Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 126 kb/s
File 'test.mpg' already exists. Overwrite ? [y/N] y
[buffer @ 02608990] w:496 h:384 pixfmt:yuv420p
[setdar @ 02608dc0] a:31/24
[setdar @ 02608dc0] w:496 h:384 -> dar:31/24 par:1/1
[mp2 @ 02608250] The requested thread algorithm is not supported with this threa
d library.
[mpeg @ 026028b0] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'test.mpg':
  Metadata:
    encoder         : Lavf52.103.0
    Stream #0.0: Video: mpeg1video, yuv420p, 496x384 [PAR 1:1 DAR 31:24], q=2-31
, 200 kb/s, 90k tbn, 29.97 tbc
    Stream #0.1: Audio: mp2, 48000 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
[mpeg4 @ 003ff390] Invalid and inefficient vfw-avi packed B frames detected
frame=  707 fps=329 q=5.4 Lsize=    1022kB time=23.56 bitrate= 355.4kbits/s
video:824kB audio:188kB global headers:0kB muxing overhead 1.013194%
Received signal 2: terminating.
Last edited 14 years ago by Darren (previous) (diff)

comment:19 by Carl Eugen Hoyos, 14 years ago

Does the original file make any difference?
I just tested the following on an Athlon XP with a random video that I encoded to mpeg4 (496x384) and the result looks ok:

ffmpeg -i input -target pal-dvd -sws_flags bilinear+3dnow test.mpg

Is -target pal-dvd needed or is "-s 720x576" sufficient to trigger the problem? Is the problem also reproducible if you add -an to the command line?

comment:20 by Darren, 14 years ago

just tested with

ffmpeg input -s 800x600 -sws_flags bilinear+3dnow -an test.mpg

and still gives me pink overlay.

c:\ffmpeg>ffmpeg.exe -i "in\A League Of Their Own - 02x01 - Series 2, Episode 1.
avi" -s 800x600 -sws_flags bilinear+3dnow -an test.mpg
FFmpeg version git-N-28791-g679191a, Copyright (c) 2000-2011 the FFmpeg develope
rs
  built on Apr  2 2011 18:44:11 with gcc 4.5.2
  configuration: --arch=x86 --cross-prefix=i686-pc-mingw32- --target-os=mingw32
--prefix=/ffmpeg/builds/git-N-28791-g679191a-shared --enable-memalign-hack --ena
ble-shared --disable-static --enable-w32threads --disable-debug --enable-gpl --e
nable-version3 --enable-runtime-cpudetect --enable-zlib --enable-bzlib --enable-
avisynth --enable-postproc --enable-libmp3lame --enable-libx264 --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libxvid --enable-libgsm --enable-libvpx --disable-decoder
=libvpx --enable-librtmp --enable-libopenjpeg --enable-frei0r --enable-libxavs -
-extra-ldflags=-L/usr/i686-pc-mingw32/usr/lib --cc='ccache i686-pc-mingw32-gcc'
  libavutil    50. 40. 0 / 50. 40. 0
  libavcodec   52.117. 0 / 52.117. 0
  libavformat  52.104. 0 / 52.104. 0
  libavdevice  52.  4. 0 / 52.  4. 0
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 13. 0 /  0. 13. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, avi, from 'in\A League Of Their Own - 02x01 - Series 2, Episode 1.avi'
:
  Duration: 00:23:59.60, start: 0.000000, bitrate: 1021 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 25 tbr, 25
tbn, 25 tbc
    Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 127 kb/s
[buffer @ 01d62d20] w:624 h:352 pixfmt:yuv420p
[scale @ 01d63040] w:624 h:352 fmt:yuv420p -> w:800 h:600 fmt:yuv420p flags:0x40
000002
[mpeg @ 01d61b30] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'test.mpg':
  Metadata:
    encoder         : Lavf52.104.0
    Stream #0.0: Video: mpeg1video, yuv420p, 800x600 [PAR 1:1 DAR 4:3], q=2-31,
200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
[mpeg1video @ 01d522e0] warning, clipping 1 dct coefficients to -255..255
frame= 2541 fps=123 q=31.0 size=   10500kB time=101.60 bitrate= 846.6kbits/s
frame= 2610 fps=124 q=24.8 size=   10718kB time=104.36 bitrate= 841.3kbits/s
frame= 2679 fps=124 q=31.0 size=   10920kB time=107.12 bitrate= 835.1kbits/s
frame= 2748 fps=124 q=31.0 size=   11116kB time=109.88 bitrate= 828.7kbits/s
frame= 2817 fps=125 q=31.0 size=   11314kB time=112.64 bitrate= 822.8kbits/s
frame= 2885 fps=125 q=31.0 size=   11542kB time=115.36 bitrate= 819.6kbits/s
frame= 2952 fps=125 q=31.0 size=   11788kB time=118.04 bitrate= 818.1kbits/s
frame= 3017 fps=125 q=31.0 size=   12042kB time=120.64 bitrate= 817.7kbits/s
frame= 3073 fps=125 q=24.8 Lsize=   12248kB time=122.88 bitrate= 816.5kbits/s

video:12151kB audio:0kB global headers:0kB muxing overhead 0.796960%
Received signal 2: terminating.

all input sources so far have been divx or xvid within an avi. just tested it with x264 contained within an mkv as source, and the pink goes away

c:\ffmpeg>ffmpeg.exe -i "F:\Documentories\Wonders Of The Universe\Season 1\wonde
rs.of.the.universe.s01e01.720p.hdtv.x264-ftp.mkv" -s 800x600 -sws_flags bilinear
+3dnow -an test.mpg
FFmpeg version git-N-28791-g679191a, Copyright (c) 2000-2011 the FFmpeg develope
rs
  built on Apr  2 2011 18:44:11 with gcc 4.5.2
  configuration: --arch=x86 --cross-prefix=i686-pc-mingw32- --target-os=mingw32
--prefix=/ffmpeg/builds/git-N-28791-g679191a-shared --enable-memalign-hack --ena
ble-shared --disable-static --enable-w32threads --disable-debug --enable-gpl --e
nable-version3 --enable-runtime-cpudetect --enable-zlib --enable-bzlib --enable-
avisynth --enable-postproc --enable-libmp3lame --enable-libx264 --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libxvid --enable-libgsm --enable-libvpx --disable-decoder
=libvpx --enable-librtmp --enable-libopenjpeg --enable-frei0r --enable-libxavs -
-extra-ldflags=-L/usr/i686-pc-mingw32/usr/lib --cc='ccache i686-pc-mingw32-gcc'
  libavutil    50. 40. 0 / 50. 40. 0
  libavcodec   52.117. 0 / 52.117. 0
  libavformat  52.104. 0 / 52.104. 0
  libavdevice  52.  4. 0 / 52.  4. 0
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 13. 0 /  0. 13. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[matroska,webm @ 004a9e90] Estimating duration from bitrate, this may be inaccur
ate
Input #0, matroska,webm, from 'F:\Documentories\Wonders Of The Universe\Season 1
\wonders.of.the.universe.s01e01.720p.hdtv.x264-ftp.mkv':
  Duration: 00:59:01.28, start: 0.000000, bitrate: 384 kb/s
    Stream #0.0: Video: h264 (High), yuv420p, 1280x720, PAR 1:1 DAR 16:9, 25 fps
, 25 tbr, 1k tbn, 50 tbc (default)
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s (default)
    Metadata:
      title           : English
File 'test.mpg' already exists. Overwrite ? [y/N] y
[buffer @ 02642700] w:1280 h:720 pixfmt:yuv420p
[scale @ 02c97dc0] w:1280 h:720 fmt:yuv420p -> w:800 h:600 fmt:yuv420p flags:0x4
0000002
[mpeg @ 029f0050] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'test.mpg':
  Metadata:
    encoder         : Lavf52.104.0
    Stream #0.0: Video: mpeg1video, yuv420p, 800x600 [PAR 1:1 DAR 4:3], q=2-31,
200 kb/s, 90k tbn, 25 tbc (default)
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=  714 fps= 45 q=31.0 Lsize=    1780kB time=28.52 bitrate= 511.3kbits/s dup
=1 drop=0
video:1763kB audio:0kB global headers:0kB muxing overhead 0.948553%

comment:21 by Carl Eugen Hoyos, 14 years ago

What happens if you first transcode your h264 sample into ASP?

ffmpeg -i "F:\Documentories\Wonders Of The Universe\Season 1\wonders.of.the.universe.s01e01.720p.hdtv.x264-ftp.mkv" -an -qscale 5 test.avi
ffmpeg -i test.avi -s 800x600 -sws_flags bilinear+3dnow test.mpg

comment:22 by Darren, 14 years ago

the intermediate AVI was fine and the end MPEG was fine also when the original input was the x264 mkv. though if the original input is changed to a xvid avi, the intermediate AVI is fine, and the final output MPEG gets the pink overlay

c:\ffmpeg>ffmpeg -i "F:\Documentories\Wonders Of The Universe\Season 1\wonders.o
f.the.universe.s01e01.720p.hdtv.x264-ftp.mkv" -an -qscale 5 test.avi
FFmpeg version git-N-28791-g679191a, Copyright (c) 2000-2011 the FFmpeg develope
rs
  built on Apr  2 2011 18:44:11 with gcc 4.5.2
  configuration: --arch=x86 --cross-prefix=i686-pc-mingw32- --target-os=mingw32
--prefix=/ffmpeg/builds/git-N-28791-g679191a-shared --enable-memalign-hack --ena
ble-shared --disable-static --enable-w32threads --disable-debug --enable-gpl --e
nable-version3 --enable-runtime-cpudetect --enable-zlib --enable-bzlib --enable-
avisynth --enable-postproc --enable-libmp3lame --enable-libx264 --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libxvid --enable-libgsm --enable-libvpx --disable-decoder
=libvpx --enable-librtmp --enable-libopenjpeg --enable-frei0r --enable-libxavs -
-extra-ldflags=-L/usr/i686-pc-mingw32/usr/lib --cc='ccache i686-pc-mingw32-gcc'
  libavutil    50. 40. 0 / 50. 40. 0
  libavcodec   52.117. 0 / 52.117. 0
  libavformat  52.104. 0 / 52.104. 0
  libavdevice  52.  4. 0 / 52.  4. 0
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 13. 0 /  0. 13. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[matroska,webm @ 00a69e70] Estimating duration from bitrate, this may be inaccur
ate
Input #0, matroska,webm, from 'F:\Documentories\Wonders Of The Universe\Season 1
\wonders.of.the.universe.s01e01.720p.hdtv.x264-ftp.mkv':
  Duration: 00:59:01.28, start: 0.000000, bitrate: 384 kb/s
    Stream #0.0: Video: h264 (High), yuv420p, 1280x720, PAR 1:1 DAR 16:9, 25 fps
, 25 tbr, 1k tbn, 50 tbc (default)
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s (default)
    Metadata:
      title           : English
[buffer @ 00654090] w:1280 h:720 pixfmt:yuv420p
Output #0, avi, to 'test.avi':
  Metadata:
    ISFT            : Lavf52.104.0
    Stream #0.0: Video: mpeg4, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=2-31, 200
 kb/s, 25 tbn, 25 tbc (default)
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=  841 fps= 26 q=5.0 Lsize=    7445kB time=33.64 bitrate=1813.0kbits/s
video:7419kB audio:0kB global headers:0kB muxing overhead 0.347085%
Received signal 2: terminating.
c:\ffmpeg>ffmpeg -i test.avi -s 800x600 -sws_flags bilinear+3dnow test.mpg
FFmpeg version git-N-28791-g679191a, Copyright (c) 2000-2011 the FFmpeg develope
rs
  built on Apr  2 2011 18:44:11 with gcc 4.5.2
  configuration: --arch=x86 --cross-prefix=i686-pc-mingw32- --target-os=mingw32
--prefix=/ffmpeg/builds/git-N-28791-g679191a-shared --enable-memalign-hack --ena
ble-shared --disable-static --enable-w32threads --disable-debug --enable-gpl --e
nable-version3 --enable-runtime-cpudetect --enable-zlib --enable-bzlib --enable-
avisynth --enable-postproc --enable-libmp3lame --enable-libx264 --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libxvid --enable-libgsm --enable-libvpx --disable-decoder
=libvpx --enable-librtmp --enable-libopenjpeg --enable-frei0r --enable-libxavs -
-extra-ldflags=-L/usr/i686-pc-mingw32/usr/lib --cc='ccache i686-pc-mingw32-gcc'
  libavutil    50. 40. 0 / 50. 40. 0
  libavcodec   52.117. 0 / 52.117. 0
  libavformat  52.104. 0 / 52.104. 0
  libavdevice  52.  4. 0 / 52.  4. 0
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 13. 0 /  0. 13. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, avi, from 'test.avi':
  Metadata:
    encoder         : Lavf52.104.0
  Duration: 00:00:33.64, start: 0.000000, bitrate: 1812 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 25 tbr, 25
tbn, 25 tbc
File 'test.mpg' already exists. Overwrite ? [y/N] y
[buffer @ 01d69e30] w:1280 h:720 pixfmt:yuv420p
[scale @ 0061f9c0] w:1280 h:720 fmt:yuv420p -> w:800 h:600 fmt:yuv420p flags:0x4
0000002
[mpeg @ 00619ff0] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'test.mpg':
  Metadata:
    encoder         : Lavf52.104.0
    Stream #0.0: Video: mpeg1video, yuv420p, 800x600 [PAR 1:1 DAR 4:3], q=2-31,
200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=  841 fps= 80 q=31.0 Lsize=    2028kB time=33.60 bitrate= 494.4kbits/s

video:2008kB audio:0kB global headers:0kB muxing overhead 1.016453%
c:\ffmpeg>ffmpeg -i "F:\Documentories\Are We Alone In The Universe.avi" -an -qsc
ale 5 test.avi
FFmpeg version git-N-28791-g679191a, Copyright (c) 2000-2011 the FFmpeg develope
rs
  built on Apr  2 2011 18:44:11 with gcc 4.5.2
  configuration: --arch=x86 --cross-prefix=i686-pc-mingw32- --target-os=mingw32
--prefix=/ffmpeg/builds/git-N-28791-g679191a-shared --enable-memalign-hack --ena
ble-shared --disable-static --enable-w32threads --disable-debug --enable-gpl --e
nable-version3 --enable-runtime-cpudetect --enable-zlib --enable-bzlib --enable-
avisynth --enable-postproc --enable-libmp3lame --enable-libx264 --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libxvid --enable-libgsm --enable-libvpx --disable-decoder
=libvpx --enable-librtmp --enable-libopenjpeg --enable-frei0r --enable-libxavs -
-extra-ldflags=-L/usr/i686-pc-mingw32/usr/lib --cc='ccache i686-pc-mingw32-gcc'
  libavutil    50. 40. 0 / 50. 40. 0
  libavcodec   52.117. 0 / 52.117. 0
  libavformat  52.104. 0 / 52.104. 0
  libavdevice  52.  4. 0 / 52.  4. 0
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 13. 0 /  0. 13. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, avi, from 'F:\Documentories\Are We Alone In The Universe.avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
    IAS1            : ???
  Duration: 00:48:29.12, start: 0.000000, bitrate: 1406 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 640x368 [PAR 1:1 DAR 40:23], 25 tbr, 25
tbn, 25 tbc
    Stream #0.1: Audio: mp3, 32000 Hz, stereo, s16, 96 kb/s
File 'test.avi' already exists. Overwrite ? [y/N] y
[buffer @ 025239f0] w:640 h:368 pixfmt:yuv420p
Output #0, avi, to 'test.avi':
  Metadata:
    IAS1            : ???
    ISFT            : Lavf52.104.0
    Stream #0.0: Video: mpeg4, yuv420p, 640x368 [PAR 1:1 DAR 40:23], q=2-31, 200
 kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 2387 fps=241 q=5.0 Lsize=    8062kB time=95.52 bitrate= 691.4kbits/s
video:8000kB audio:0kB global headers:0kB muxing overhead 0.784728%
Received signal 2: terminating.
c:\ffmpeg>ffmpeg -i test.avi -s 800x600 -sws_flags bilinear+3dnow test.mpg
FFmpeg version git-N-28791-g679191a, Copyright (c) 2000-2011 the FFmpeg develope
rs
  built on Apr  2 2011 18:44:11 with gcc 4.5.2
  configuration: --arch=x86 --cross-prefix=i686-pc-mingw32- --target-os=mingw32
--prefix=/ffmpeg/builds/git-N-28791-g679191a-shared --enable-memalign-hack --ena
ble-shared --disable-static --enable-w32threads --disable-debug --enable-gpl --e
nable-version3 --enable-runtime-cpudetect --enable-zlib --enable-bzlib --enable-
avisynth --enable-postproc --enable-libmp3lame --enable-libx264 --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libxvid --enable-libgsm --enable-libvpx --disable-decoder
=libvpx --enable-librtmp --enable-libopenjpeg --enable-frei0r --enable-libxavs -
-extra-ldflags=-L/usr/i686-pc-mingw32/usr/lib --cc='ccache i686-pc-mingw32-gcc'
  libavutil    50. 40. 0 / 50. 40. 0
  libavcodec   52.117. 0 / 52.117. 0
  libavformat  52.104. 0 / 52.104. 0
  libavdevice  52.  4. 0 / 52.  4. 0
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 13. 0 /  0. 13. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, avi, from 'test.avi':
  Metadata:
    encoder         : Lavf52.104.0
  Duration: 00:01:35.52, start: 0.000000, bitrate: 691 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 640x368 [PAR 1:1 DAR 40:23], 25 tbr, 25
tbn, 25 tbc
File 'test.mpg' already exists. Overwrite ? [y/N] y
[buffer @ 01d764c0] w:640 h:368 pixfmt:yuv420p
[scale @ 01d767d0] w:640 h:368 fmt:yuv420p -> w:800 h:600 fmt:yuv420p flags:0x40
000002
[mpeg @ 01d82750] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'test.mpg':
  Metadata:
    encoder         : Lavf52.104.0
    Stream #0.0: Video: mpeg1video, yuv420p, 800x600 [PAR 1:1 DAR 4:3], q=2-31,
200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 2387 fps=134 q=31.0 Lsize=    6324kB time=95.44 bitrate= 542.8kbits/s

video:6273kB audio:0kB global headers:0kB muxing overhead 0.818533%

comment:23 by bl4ze, 14 years ago

I am having the same problems with the daily builds.
http://c3249862.r62.cf0.rackcdn.com/input-001.mkv
http://c3249862.r62.cf0.rackcdn.com/output.mjpeg

FFmpeg downloaded from http://research.m1stereo.tv/ffmpeg/snapshots/ (http://hawkeye.arrozcru.org/ builds, either 32 or 64 bit give the same results])

ffmpeg -i input-001.mkv -vf "crop=1920:803:0:138,scale=1280:544" -vcodec mjpeg output.mjpeg
ffmpeg version git-N-29397-g075933a, Copyright (c) 2000-2011 the FFmpeg developers
  built on Apr 27 2011 02:17:27 with gcc 4.5.0 20100414 (Fedora MinGW 4.5.0-1.fc14)
  configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch=x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-mingw32-gcc' --enable-w32threads --enable-memalign-hack --enable-runtime-cpudetect --enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -lwinmm' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapshots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/snapshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libmp3lame --enable-libvpx --disable-decoder=libvpx
  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

Builds before April didn't have any problem. I noticed that MMX2 was used, while I never saw that in the Win32/64 autobuilds before.

Is it possible to force resize filters such as lanczos to use the pure C code? -sws_flags lanczos-mmx2 gave the same result.

Version 0, edited 14 years ago by bl4ze (next)

comment:24 by vickas54, 14 years ago

Looks like the same thing as ticket#63. Anyone care to merge them?

comment:25 by Michael Niedermayer, 14 years ago

Is this still reproduceable?
also it should be investigated why mmx2 needs to be specified this should be choosen automatically and that might be related to the problem.

comment:26 by Carl Eugen Hoyos, 13 years ago

Resolution: needs_more_info
Status: newclosed

Please reopen if this is still reproducible.

Note: See TracTickets for help on using tickets.