Opened 6 years ago

Closed 3 years ago

Last modified 3 years ago

#1092 closed enhancement (fixed)

amv: gray bar at the bottom

Reported by: ami_stuff Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: amv mjpeg
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

http://ffmpeg.org/trac/ffmpeg/attachment/ticket/1059/599.png

C:\>ffmpeg -i 599.png -vcodec amv out.avi
ffmpeg version N-38862-g967bdb8 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 18 2012 02:23:57 with gcc 4.5.0 20100414 (Fedora MinGW 4.5.0-1.fc
14)
  configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch=
x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-min
gw32-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/buil
d/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/snapshots/b
uild/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --enable-n
onfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-libvorbis
--enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-libopencor
e-amrwb --enable-libmp3lame --enable-libvpx --disable-decoder=libvpx
  libavutil      51. 42.100 / 51. 42.100
  libavcodec     54. 10.100 / 54. 10.100
  libavformat    54.  2.100 / 54.  2.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 65.100 /  2. 65.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  7.100 /  0.  7.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, image2, from '599.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24, 599x412, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'rgb24' for codec 'amv', auto-selecting format 'yuvj42
0p'
[buffer @ 0x1d91520] w:599 h:412 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x1d917a0] auto-inserting filter 'auto-inserted scale 0' between t
he filter 'src' and the filter 'out'
[scale @ 0x1d91c20] w:599 h:412 fmt:rgb24 -> w:599 h:412 fmt:yuvj420p flags:0x4
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf54.2.100
    Stream #0:0: Video: amv (AMVF / 0x46564D41), yuvj420p, 599x412, q=2-31, 200
kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> amv)
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=3.4 Lsize=      12kB time=00:00:00.04 bitrate=2434.8kbits/
s
video:6kB audio:0kB global headers:0kB muxing overhead 88.248028%

Change History (8)

comment:1 Changed 6 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords amv added
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

comment:2 Changed 6 years ago by ami_stuff

crashes with -s 556x566, probably the same issue

(gdb) r -i 599.png -s 556x556 -vcodec amv out.avi
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program: d:\mingw\msys\1.0\ffmpeg\ffmpeg_g.exe -i 599.png -s 556x556 -v
codec amv out.avi
[New Thread 3568.0xfcc]
ffmpeg version 0.9.1.git Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 10 2012 16:15:15 with gcc 4.6.1
  configuration: --disable-yasm --disable-ffprobe
  libavutil      51. 42.100 / 51. 42.100
  libavcodec     54. 10.100 / 54. 10.100
  libavformat    54.  2.100 / 54.  2.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 63.100 /  2. 63.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  7.100 /  0.  7.100
Input #0, image2, from '599.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24, 599x412, 25 tbr, 25 tbn, 25 tbc
File 'out.avi' already exists. Overwrite ? [y/N] y
Incompatible pixel format 'rgb24' for codec 'amv', auto-selecting format 'yuvj42
0p'
[buffer @ 03871d00] w:599 h:412 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:
[scale @ 038712a0] w:599 h:412 fmt:rgb24 -> w:556 h:556 fmt:yuvj420p flags:0x4
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf54.2.100
    Stream #0:0: Video: amv (AMVF / 0x46564D41), yuvj420p, 556x556, q=2-31, 200
kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> amv)
Press [q] to stop, [?] for help

Program received signal SIGSEGV, Segmentation fault.
0x00739e7a in load_input_picture (pic_arg=0x22d788, s=0x38635c0)
    at libavcodec/mpegvideo_enc.c:1036
1036                            memcpy(dst, src, w);
(gdb) bt
#0  0x00739e7a in load_input_picture (pic_arg=0x22d788, s=0x38635c0)
    at libavcodec/mpegvideo_enc.c:1036
#1  ff_MPV_encode_picture (avctx=0x386ab20, pkt=0x22db40, pic_arg=0x22d788,
    got_packet=0x22dc0c) at libavcodec/mpegvideo_enc.c:1429
#2  0x007d21cc in amv_encode_picture (avctx=0x386ab20, pkt=0x22db40,
    pic_arg=0x22d9d8, got_packet=0x22dc0c) at libavcodec/mjpegenc.c:472
#3  0x004f945d in avcodec_encode_video2 (avctx=0x386ab20, avpkt=0x22db40,
    frame=0x22d9d8, got_packet_ptr=0x22dc0c) at libavcodec/utils.c:1219
#4  0x00405de0 in do_video_out (s=0x386a620, ost=0x3863320,
    in_picture=0x3873800, ist=<optimized out>) at ffmpeg.c:1619
#5  0x00407d6c in transcode_video (pkt_pts=<optimized out>,
    got_output=<optimized out>, pkt=<optimized out>, ist=<optimized out>)
    at ffmpeg.c:2178
#6  output_packet (ist=0x3871640, ost_table=0x3863320, nb_ostreams=1,
    pkt=0x22fb28) at ffmpeg.c:2270
#7  0x0040bf3b in transcode (output_files=0x3871ac0, nb_output_files=1,
    input_files=0x3871700, nb_input_files=1) at ffmpeg.c:3082
#8  0x0022ff48 in ?? ()
Backtrace stopped: Not enough registers or memory available to unwind further

comment:3 Changed 6 years ago by reimar

Patch send, testing against an actual device that supports AMV would be welcome.

comment:4 Changed 5 years ago by cehoyos

  • Keywords mjpeg added

I cannot reproduce a crash but valgrind reports several hundred errors.

The patch can be found at: http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/144036

comment:5 Changed 5 years ago by cehoyos

Also reproducible with lena as input.

comment:6 Changed 4 years ago by cehoyos

  • Priority changed from normal to wish
  • Type changed from defect to enhancement

Michael disabled dimensions % 16 != 0 in 181b2c37

comment:7 Changed 3 years ago by michael

  • Resolution set to fixed
  • Status changed from open to closed

I dont see an issue remaining (-strict -1 is needed to encode non mod 16), decode works with a warning but no gray bar and no crashes
so iam closing this as fixed, if its not fixed please reopen

Note: See TracTickets for help on using tickets.