google-code-export / ffmpegthumbnailer

Automatically exported from code.google.com/p/ffmpegthumbnailer
GNU General Public License v2.0
1 stars 1 forks source link

Crash when generating thumbnail #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

ffmpegthumbnailer  -i "n.avi" -o pic.png

What is the expected output? What do you see instead?

root@server:~# /usr/local/bin/ffmpegthumbnailer  -i "n.avi" -o pic.png
[NULL @ 0x10021af0]Invalid and inefficient vfw-avi packed B frames detected
[mpeg4 @ 0x10021af0]Invalid and inefficient vfw-avi packed B frames detected
*** glibc detected *** /usr/local/bin/ffmpegthumbnailer: double free or
corruption (!prev): 0x10142900 ***
======= Backtrace: =========
/lib/libc.so.6[0xf16e208]
/lib/libc.so.6(cfree+0xcc)[0xf1700ec]
/usr/local/lib/libavutil.so.50(av_freep+0x24)[0xffa4e74]
/usr/local/lib/libswscale.so.0(sws_freeContext+0xa4)[0xf566e24]
/usr/local/lib/libffmpegthumbnailer.so.3(_ZN12MovieDecoder20convertAndScaleFrame
E11PixelFormatibRiS1_+0xe0)[0xffd4400]
/usr/local/lib/libffmpegthumbnailer.so.3(_ZN12MovieDecoder19getScaledVideoFrameE
ibR10VideoFrame+0x6c)[0xffd457c]
/usr/local/lib/libffmpegthumbnailer.so.3(_ZN16VideoThumbnailer17generateThumbnai
lERKSsR11ImageWriterP15AVFormatContext+0x268)[0xffd8038]
/usr/local/lib/libffmpegthumbnailer.so.3(_ZN16VideoThumbnailer17generateThumbnai
lERKSs13ImageTypeEnumS1_P15AVFormatContext+0x74)[0xffd83c4]
/usr/local/bin/ffmpegthumbnailer[0x10003a80]
/lib/libc.so.6[0xf10bbe4]
/lib/libc.so.6[0xf10bda0]
======= Memory map: ========
00100000-00103000 r-xp 00100000 00:00 0          [vdso]
0e804000-0e80a000 r-xp 00000000 03:03 1550159    /usr/lib/libXdmcp.so.6.0.0
0e80a000-0e819000 ---p 00006000 03:03 1550159    /usr/lib/libXdmcp.so.6.0.0
0e819000-0e81a000 rw-p 00005000 03:03 1550159    /usr/lib/libXdmcp.so.6.0.0
0e82a000-0e82e000 r-xp 00000000 03:03 229378     /usr/lib/libXau.so.6.0.0
0e82e000-0e83d000 ---p 00004000 03:03 229378     /usr/lib/libXau.so.6.0.0
0e83d000-0e83e000 r--p 00003000 03:03 229378     /usr/lib/libXau.so.6.0.0
0e83e000-0e83f000 rw-p 00004000 03:03 229378     /usr/lib/libXau.so.6.0.0
0e84f000-0e86b000 r-xp 00000000 03:03 1549800    /usr/lib/libxcb.so.1.1.0
0e86b000-0e87a000 ---p 0001c000 03:03 1549800    /usr/lib/libxcb.so.1.1.0
0e87a000-0e87b000 r--p 0001b000 03:03 1549800    /usr/lib/libxcb.so.1.1.0
0e87b000-0e87c000 rw-p 0001c000 03:03 1549800    /usr/lib/libxcb.so.1.1.0
0e88c000-0e894000 r-xp 00000000 03:03 1523971    /lib/librt-2.9.so
0e894000-0e8a3000 ---p 00008000 03:03 1523971    /lib/librt-2.9.so
0e8a3000-0e8a4000 r--p 00007000 03:03 1523971    /lib/librt-2.9.so
0e8a4000-0e8a5000 rw-p 00008000 03:03 1523971    /lib/librt-2.9.so
0e8b5000-0e9c2000 r-xp 00000000 03:03 1549798    /usr/lib/libX11.so.6.2.0
0e9c2000-0e9d1000 ---p 0010d000 03:03 1549798    /usr/lib/libX11.so.6.2.0
0e9d1000-0e9d3000 r--p 0010c000 03:03 1549798    /usr/lib/libX11.so.6.2.0
0e9d3000-0e9d5000 rw-p 0010e000 03:03 1549798    /usr/lib/libX11.so.6.2.0
0e9d5000-0e9d6000 rw-p 0e9d5000 00:00 0
0e9e6000-0e9ec000 r-xp 00000000 03:03 1552193    /usr/lib/libogg.so.0.5.3
0e9ec000-0e9fb000 ---p 00006000 03:03 1552193    /usr/lib/libogg.so.0.5.3
0e9fb000-0e9fc000 r--p 00005000 03:03 1552193    /usr/lib/libogg.so.0.5.3
0e9fc000-0e9fd000 rw-p 00006000 03:03 1552193    /usr/lib/libogg.so.0.5.3
0ea0d000-0ea67000 r-xp 00000000 03:03 1551158    /usr/lib/liboil-0.3.so.0.3.0
0ea67000-0ea77000 ---p 0005a000 03:03 1551158    /usr/lib/liboil-0.3.so.0.3.0
0ea77000-0ea78000 r--p 0005a000 03:03 1551158    /usr/lib/liboil-0.3.so.0.3.0
0ea78000-0ea86000 rw-p 0005b000 03:03 1551158    /usr/lib/liboil-0.3.so.0.3.0
0ea86000-0ea89000 rw-p 0ea86000 00:00 0
0ea99000-0ea9c000 r-xp 00000000 03:03 1523774    /lib/libdl-2.9.so
0ea9c000-0eaab000 ---p 00003000 03:03 1523774    /lib/libdl-2.9.so
0eaab000-0eaac000 r--p 00002000 03:03 1523774    /lib/libdl-2.9.so
0eaac000-0eaad000 rw-p 00003000 03:03 1523774    /lib/libdl-2.9.so
0eabd000-0eb47000 r-xp 00000000 03:03 2146312   
/usr/local/lib/libxvidcore.so.4.2
0eb47000-0eb57000 ---p 0008a000 03:03 2146312   
/usr/local/lib/libxvidcore.so.4.2
0eb57000-0eb58000 r--p 0008a000 03:03 2146312   
/usr/local/lib/libxvidcore.so.4.2
0eb58000-0eb59000 rw-p 0008b000 03:03 2146312   
/usr/local/lib/libxvidcore.so.4.2
0eb59000-0ebcb000 rw-p 0eb59000 00:00 0
0ebdb000-0ec56000 r-xp 00000000 03:03 229560     /usr/lib/libx264.so.65
0ec56000-0ec66000 ---p 0007b000 03:03 229560     /usr/lib/libx264.so.65
0ec66000-0ec67000 r--p 0007b000 03:03 229560     /usr/lib/libx264.so.65
0ec67000-0ec68000 rw-p 0007c000 03:03 229560     /usr/lib/libx264.so.65
0ec68000-0ec6b000 rw-p 0ec68000 00:00 0
0ec7b000-0ec9c000 r-xp 00000000 03:03 1552199    /usr/lib/libvorbis.so.0.4.0
0ec9c000-0ecab000 ---p 00021000 03:03 1552199    /usr/lib/libvorbis.so.0.4.0
0ecab000-0ecac000 r--p 00020000 03:03 1552199    /usr/lib/libvorbis.so.0.4.0
0ecac000-0ecba000 rw-p 00021000 03:03 1552199    /usr/lib/libvorbis.so.0.4.0
0ecca000-0ecda000 r-xp 00000000 03:03 1552203    /usr/lib/libvorbisenc.so.2.0.3
0ecda000-0ecdb000 r--p 00010000 03:03 1552203    /usr/lib/libvorbisenc.so.2.0.3
0ecdb000-0edc1000 rw-p 00011000 03:03 1552203    /usr/lib/libvorbisenc.so.2.0.3
0edd1000-0ee19000 r-xp 00000000 03:03 1552058    /usr/lib/libtheora.so.0.3.4
0ee19000-0ee28000 ---p 00048000 03:03 1552058    /usr/lib/libtheora.so.0.3.4
0ee28000-0ee29000 r--p 00047000 03:03 1552058    /usr/lib/libtheora.so.0.3.4
0ee29000-0ee2a000 rw-p 00048000 03:03 1552058    /usr/lib/libtheora.so.0.3.4
0ee3a000-0eeb0000 r-xp 00000000 03:03 1551864   
/usr/lib/libschroedinger-1.0.so.0.1.0
0eeb0000-0eec0000 ---p 00076000 03:03 1551864   
/usr/lib/libschroedinger-1.0.so.0.1.0
0eec0000-0eec1000 r--p 00076000 03:03 1551864   
/usr/lib/libschroedinger-1.0.so.0.1.0
0eec1000-0eec3000 rw-p 00077000 03:03 1551864   
/usr/lib/libschroedinger-1.0.so.0.1.0
0eed3000-0ef1a000 r-xp 00000000 03:03 229531     /usr/lib/libmp3lame.so.0.0.0
0ef1a000-0ef29000 ---p 00047000 03:03 229531     /usr/lib/libmp3lame.so.0.0.0
0ef29000-0ef2b000 r--p 00046000 03:03 229531     /usr/lib/libmp3lame.so.0.0.0
0ef2b000-0ef2c000 rw-p 00048000 03:03 229531     /usr/lib/libmp3lame.so.0.0.0
0ef2c000-0ef5d000 rw-p 0ef2c000 00:00 0
0ef6d000-0ef7b000 r-xp 00000000 03:03 229412     /usr/lib/libgsm.so.1.0.12
0ef7b000-0ef8a000 ---p 0000e000 03:03 229412     /usr/lib/libgsm.so.1.0.12
0ef8a000-0ef8b000 rw-p 0000d000 03:03 229412     /usr/lib/libgsm.so.1.0.12
0ef9b000-0efac000 r-xp 00000000 03:03 229518     /usr/lib/libfaac.so.0.0.0
0efac000-0efbc000 ---p 00011000 03:03 229518     /usr/lib/libfaac.so.0.0.0
0efbc000-0efbd000 r--p 00011000 03:03 229518     /usr/lib/libfaac.so.0.0.0
0efbd000-0efc0000 rw-p 00012000 03:03 229518     /usr/lib/libfaac.so.0.0.0
0efd0000-0effd000 r-xp 00000000 03:03 229572     /usr/lib/libamrwb.so.3.0.0
0effd000-0f00d000 ---p 0002d000 03:03 229572     /usr/lib/libamrwb.so.3.0.0
0f00d000-0f00e000 rw-p 0002d000 03:03 229572     /usr/lib/libamrwb.so.3.0.0
0f00e000-0f00f000 rw-p 0f00e000 00:00 0
0f01f000-0f05a000 r-xp 00000000 03:03 229567     /usr/lib/libamrnb.so.3.0.0
0f05a000-0f069000 ---p 0003b000 03:03 229567     /usr/lib/libamrnb.so.3.0.0
0f069000-0f06d000 rw-p 0003a000 03:03 229567     /usr/lib/libamrnb.so.3.0.0
0f07d000-0f092000 r-xp 00000000 03:03 1523737    /lib/libz.so.1.2.3.3
0f092000-0f0a1000 ---p 00015000 03:03 1523737    /lib/libz.so.1.2.3.3
0f0a1000-0f0a2000 r--p 00014000 03:03 1523737    /lib/libz.so.1.2.3.3
0f0a2000-0f0a3000 rw-p 00015000 03:03 1523737    /lib/libz.so.1.2.3.3
0f0b3000-0f0ca000 r-xp 00000000 03:03 1523969    /lib/libpthread-2.9.so
0f0ca000-0f0d9000 ---p 00017000 03:03 1523969    /lib/libpthread-2.9.so
0f0d9000-0f0da000 r--p 00016000 03:03 1523969    /lib/libpthread-2.9.so
0f0da000-0f0db000 rw-p 00017000 03:03 1523969    /lib/libpthread-2.9.so
0f0db000-0f0dd000 rw-p 0f0db000 00:00 0
0f0ed000-0f251000 r-xp 00000000 03:03 1523766    /lib/libc-2.9.so
0f251000-0f260000 ---p 00164000 03:03 1523766    /lib/libc-2.9.so
0f260000-0f264000 r--p 00163000 03:03 1523766    /lib/libc-2.9.so
0f264000-0f265000 rw-p 00167000 03:03 1523766    /lib/libc-2.9.so
0f265000-0f268000 rw-p 0f265000 00:00 0
0f278000-0f28e000 r-xp 00000000 03:03 1523722    /lib/libgcc_s.so.1
0f28e000-0f29d000 ---p 00016000 03:03 1523722    /lib/libgcc_s.so.1
0f29d000-0f29e000 r--p 00015000 03:03 1523722    /lib/libgcc_s.so.1
0f29e000-0f29f000 rw-p 00016000 03:03 1523722    /lib/libgcc_s.so.1
0f2af000-0f358000 r-xp 00000000 03:03 1523775    /lib/libm-2.9.so
0f358000-0f368000 ---p 000a9000 03:03 1523775    /lib/libm-2.9.so
0f368000-0f36b000 r--p 000a9000 03:03 1523775    /lib/libm-2.9.so
0f36b000-0f36c000 rw-p 000ac000 03:03 1523775    /lib/libm-2.9.so
0f37c000-0f498000 r-xp 00000000 03:03 1549220    /usr/lib/libstdc++.so.6.0.10
0f498000-0f4a8000 ---p 0011c000 03:03 1549220    /usr/lib/libstdc++.so.6.0.10
0f4a8000-0f4ac000 r--p 0011c000 03:03 1549220    /usr/lib/libstdc++.so.6.0.10
0f4ac000-0f4ae000 rw-p 00120000 03:03 1549220    /usr/lib/libstdc++.so.6.0.10
0f4ae000-0f4b3000 rw-p 0f4ae000 00:00 0
0f4c3000-0f4e9000 r-xp 00000000 03:03 1552776    /usr/lib/libjpeg.so.62.0.0
0f4e9000-0f4f9000 ---p 00026000 03:03 1552776    /usr/lib/libjpeg.so.62.0.0
0f4f9000-0f4fa000 rw-p 00026000 03:03 1552776    /usr/lib/libjpeg.so.62.0.0
0f50a000-0f531000 r-xp 00000000 03:03 1549931    /usr/lib/libpng12.so.0.27.0
0f531000-0f541000 ---p 00027000 03:03 1549931    /usr/lib/libpng12.so.0.27.0
0f541000-0f542000 r--p 00027000 03:03 1549931    /usr/lib/libpng12.so.0.27.0
0f542000-0f543000 rw-p 00028000 03:03 1549931    /usr/lib/libpng12.so.0.27.0
0f553000-0f581000 r-xp 00000000 03:03 2146340   
/usr/local/lib/libswscale.so.0.7.1
0f581000-0f590000 ---p 0002e000 03:03 2146340   
/usr/local/lib/libswscale.so.0.7.1
0f590000-0f591000 r--p 0002d000 03:03 2146340   
/usr/local/lib/libswscale.so.0.7.1
0f591000-0f592000 rw-p 0002e000 03:03 2146340   
/usr/local/lib/libswscale.so.0.7.1
0f5a2000-0fa06000 r-xp 00000000 03:03 2146332   
/usr/local/lib/libavcodec.so.52.30.2
0fa06000-0fa15000 ---p 00464000 03:03 2146332   
/usr/local/lib/libavcodec.so.52.30.2
0fa15000-0fa16000 r--p 00463000 03:03 2146332   
/usr/local/lib/libavcodec.so.52.30.2
0fa16000-0fa1e000 rw-p 00464000 03:03 2146332   
/usr/local/lib/libavcodec.so.52.30.2
0fa1e000-0fe40000 rw-p 0fa1e000 00:00 0
0fe50000-0ff29000 r-xp 00000000 03:03 2146328   
/usr/local/lib/libavformat.so.52.34.0
0ff29000-0ff38000 ---p 000d9000 03:03 2146328   
/usr/local/lib/libavformat.so.52.34.0
0ff38000-0ff39000 r--p 000d8000 03:03 2146328   
/usr/local/lib/libavformat.so.52.34.0
0ff39000-0ff3f000 rw-p 000d9000 03:03 2146328   
/usr/local/lib/libavformat.so.52.34.0
0ff3f000-0ff8b000 rw-p 0ff3f000 00:00 0
0ff9b000-0ffaa000 r-xp 00000000 03:03 2146336   
/usr/local/lib/libavutil.so.50.3.0
0ffaa000-0ffb9000 ---p 0000f000 03:03 2146336   
/usr/local/lib/libavutil.so.50.3.0
0ffb9000-0ffba000 r--p 0000e000 03:03 2146336   
/usr/local/lib/libavutil.so.50.3.0
0ffba000-0ffbb000 rw-p 0000f000 03:03 2146336   
/usr/local/lib/libavutil.so.50.3.0
0ffbb000-0ffbe000 rw-p 0ffbb000 00:00 0
0ffce000-0ffdf000 r-xp 00000000 03:03 1556797   
/usr/local/lib/libffmpegthumbnailer.so.3.0.1
0ffdf000-0ffee000 ---p 00011000 03:03 1556797   
/usr/local/lib/libffmpegthumbnailer.so.3.0.1
0ffee000-0ffef000 r--p 00010000 03:03 1556797   
/usr/local/lib/libffmpegthumbnailer.so.3.0.1
0ffef000-0fff0000 rw-p 00011000 03:03 1556797   
/usr/local/lib/libffmpegthumbnailer.so.3.0.1
10000000-10005000 r-xp 00000000 03:03 1556831   
/usr/local/bin/ffmpegthumbnailer
10014000-10015000 r--p 00004000 03:03 1556831   
/usr/local/bin/ffmpegthumbnailer
10015000-10016000 rw-p 00005000 03:03 1556831   
/usr/local/bin/ffmpegthumbnailer
10016000-1014d000 rwxp 10016000 00:00 0          [heap]
48000000-4801f000 r-xp 00000000 03:03 1523728    /lib/ld-2.9.so
4801f000-48021000 rw-p 4801f000 00:00 0
4802a000-4802f000 rw-p 4802a000 00:00 0
4802f000-48030000 r--p 0001f000 03:03 1523728    /lib/ld-2.9.so
48030000-48031000 rw-p 00020000 03:03 1523728    /lib/ld-2.9.so
48031000-484d2000 rw-p 48031000 00:00 0
489c3000-48d6d000 rw-p 48087000 00:00 0
bfdd1000-bfde6000 rwxp bffeb000 00:00 0          [stack]
Aborted

What version of the product are you using? On what operating system?

Ubuntu 9.0.4

FFmpeg version SVN-r19127, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
--enable-shared --enable-postproc --enable-avfilter --enable-avfilter-lavf
--enable-pthreads --enable-x11grab --enable-bzlib --enable-libamr-nb
--enable-libamr-wb --enable-libdc1394 --enable-libfaac --enable-libfaad
--enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libnut
--enable-libschroedinger --enable-libtheora --enable-libvorbis
--enable-libx264 --enable-libxvid --enable-zlib
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.30. 2 / 52.30. 2
  libavformat   52.34. 0 / 52.34. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    0. 5. 0 /  0. 5. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Jun  6 2009 20:06:38, gcc: 4.3.3

ffmpegthumbnailer-1.5.2

Original issue reported on code.google.com by kris.koleman on 6 Jun 2009 at 7:45

GoogleCodeExporter commented 9 years ago
This may be related to issue 9? Apologies if it's a duplicate.

http://code.google.com/p/ffmpegthumbnailer/issues/detail?id=9

Original comment by kris.koleman on 6 Jun 2009 at 7:47

GoogleCodeExporter commented 9 years ago
You will need to send me the sample (preferably a small part of it as long as it
causes the crash) so I can try to reproduce it. 

Original comment by dirk.vdb on 6 Jun 2009 at 7:52

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for the quick response.  I just tried it on the mp4 file attached to 
Issue-9
and it faults using that.

I should have probably said in my report that this is running on a ppc 
processor.
(1st gen mac mini)

Also, If I tried the first command and received a "Could not open input file" 
error,
then once I renamed it to n.mp4 it read the file but then crashed on execution.

The session is shown below:

root@server:~# /usr/local/bin/ffmpegthumbnailer  -i Jim\ Flying\ Alarm\ 
Clock.avi -o
pic.png
Error: Could not open input file: Jim Flying Alarm Clock.avi
root@server:~# cp Jim\ Flying\ Alarm\ Clock.mp4 n.mp4
root@server:~# /usr/local/bin/ffmpegthumbnailer  -i n.mp4 -o pic.png
*** glibc detected *** /usr/local/bin/ffmpegthumbnailer: double free or 
corruption
(!prev): 0x100e5200 ***
======= Backtrace: =========
/lib/libc.so.6[0xf16e208]
/lib/libc.so.6(cfree+0xcc)[0xf1700ec]
/usr/local/lib/libavutil.so.50(av_freep+0x24)[0xffa4e74]
/usr/local/lib/libavcodec.so.52(avcodec_default_free_buffers+0x50)[0xf696fb0]
/usr/local/lib/libavcodec.so.52(MPV_common_end+0x444)[0xf6df5c4]
/usr/local/lib/libavcodec.so.52(ff_h263_decode_end+0x14)[0xf7b6af0]
/usr/local/lib/libavcodec.so.52(avcodec_close+0x88)[0xf698a88]
/usr/local/lib/libffmpegthumbnailer.so.3(_ZN12MovieDecoder7destroyEv+0x3c)[0xffd
40dc]
/usr/local/lib/libffmpegthumbnailer.so.3(_ZN12MovieDecoderD1Ev+0x24)[0xffd4184]
/usr/local/lib/libffmpegthumbnailer.so.3(_ZN16VideoThumbnailer17generateThumbnai
lERKSsR11ImageWriterP15AVFormatContext+0x1dc)[0xffd7fac]
/usr/local/lib/libffmpegthumbnailer.so.3(_ZN16VideoThumbnailer17generateThumbnai
lERKSs13ImageTypeEnumS1_P15AVFormatContext+0x74)[0xffd83c4]
/usr/local/bin/ffmpegthumbnailer[0x10003a80]
/lib/libc.so.6[0xf10bbe4]
/lib/libc.so.6[0xf10bda0]
======= Memory map: ========
00100000-00103000 r-xp 00100000 00:00 0          [vdso]
0e804000-0e80a000 r-xp 00000000 03:03 1550159    /usr/lib/libXdmcp.so.6.0.0
0e80a000-0e819000 ---p 00006000 03:03 1550159    /usr/lib/libXdmcp.so.6.0.0
0e819000-0e81a000 rw-p 00005000 03:03 1550159    /usr/lib/libXdmcp.so.6.0.0
0e82a000-0e82e000 r-xp 00000000 03:03 229378     /usr/lib/libXau.so.6.0.0
0e82e000-0e83d000 ---p 00004000 03:03 229378     /usr/lib/libXau.so.6.0.0
0e83d000-0e83e000 r--p 00003000 03:03 229378     /usr/lib/libXau.so.6.0.0
0e83e000-0e83f000 rw-p 00004000 03:03 229378     /usr/lib/libXau.so.6.0.0
0e84f000-0e86b000 r-xp 00000000 03:03 1549800    /usr/lib/libxcb.so.1.1.0
0e86b000-0e87a000 ---p 0001c000 03:03 1549800    /usr/lib/libxcb.so.1.1.0
0e87a000-0e87b000 r--p 0001b000 03:03 1549800    /usr/lib/libxcb.so.1.1.0
0e87b000-0e87c000 rw-p 0001c000 03:03 1549800    /usr/lib/libxcb.so.1.1.0
0e88c000-0e894000 r-xp 00000000 03:03 1523971    /lib/librt-2.9.so
0e894000-0e8a3000 ---p 00008000 03:03 1523971    /lib/librt-2.9.so
0e8a3000-0e8a4000 r--p 00007000 03:03 1523971    /lib/librt-2.9.so
0e8a4000-0e8a5000 rw-p 00008000 03:03 1523971    /lib/librt-2.9.so
0e8b5000-0e9c2000 r-xp 00000000 03:03 1549798    /usr/lib/libX11.so.6.2.0
0e9c2000-0e9d1000 ---p 0010d000 03:03 1549798    /usr/lib/libX11.so.6.2.0
0e9d1000-0e9d3000 r--p 0010c000 03:03 1549798    /usr/lib/libX11.so.6.2.0
0e9d3000-0e9d5000 rw-p 0010e000 03:03 1549798    /usr/lib/libX11.so.6.2.0
0e9d5000-0e9d6000 rw-p 0e9d5000 00:00 0
0e9e6000-0e9ec000 r-xp 00000000 03:03 1552193    /usr/lib/libogg.so.0.5.3
0e9ec000-0e9fb000 ---p 00006000 03:03 1552193    /usr/lib/libogg.so.0.5.3
0e9fb000-0e9fc000 r--p 00005000 03:03 1552193    /usr/lib/libogg.so.0.5.3
0e9fc000-0e9fd000 rw-p 00006000 03:03 1552193    /usr/lib/libogg.so.0.5.3
0ea0d000-0ea67000 r-xp 00000000 03:03 1551158    /usr/lib/liboil-0.3.so.0.3.0
0ea67000-0ea77000 ---p 0005a000 03:03 1551158    /usr/lib/liboil-0.3.so.0.3.0
0ea77000-0ea78000 r--p 0005a000 03:03 1551158    /usr/lib/liboil-0.3.so.0.3.0
0ea78000-0ea86000 rw-p 0005b000 03:03 1551158    /usr/lib/liboil-0.3.so.0.3.0
0ea86000-0ea89000 rw-p 0ea86000 00:00 0
0ea99000-0ea9c000 r-xp 00000000 03:03 1523774    /lib/libdl-2.9.so
0ea9c000-0eaab000 ---p 00003000 03:03 1523774    /lib/libdl-2.9.so
0eaab000-0eaac000 r--p 00002000 03:03 1523774    /lib/libdl-2.9.so
0eaac000-0eaad000 rw-p 00003000 03:03 1523774    /lib/libdl-2.9.so
0eabd000-0eb47000 r-xp 00000000 03:03 2146312    
/usr/local/lib/libxvidcore.so.4.2
0eb47000-0eb57000 ---p 0008a000 03:03 2146312    
/usr/local/lib/libxvidcore.so.4.2
0eb57000-0eb58000 r--p 0008a000 03:03 2146312    
/usr/local/lib/libxvidcore.so.4.2
0eb58000-0eb59000 rw-p 0008b000 03:03 2146312    
/usr/local/lib/libxvidcore.so.4.2
0eb59000-0ebcb000 rw-p 0eb59000 00:00 0
0ebdb000-0ec56000 r-xp 00000000 03:03 229560     /usr/lib/libx264.so.65
0ec56000-0ec66000 ---p 0007b000 03:03 229560     /usr/lib/libx264.so.65
0ec66000-0ec67000 r--p 0007b000 03:03 229560     /usr/lib/libx264.so.65
0ec67000-0ec68000 rw-p 0007c000 03:03 229560     /usr/lib/libx264.so.65
0ec68000-0ec6b000 rw-p 0ec68000 00:00 0
0ec7b000-0ec9c000 r-xp 00000000 03:03 1552199    /usr/lib/libvorbis.so.0.4.0
0ec9c000-0ecab000 ---p 00021000 03:03 1552199    /usr/lib/libvorbis.so.0.4.0
0ecab000-0ecac000 r--p 00020000 03:03 1552199    /usr/lib/libvorbis.so.0.4.0
0ecac000-0ecba000 rw-p 00021000 03:03 1552199    /usr/lib/libvorbis.so.0.4.0
0ecca000-0ecda000 r-xp 00000000 03:03 1552203    /usr/lib/libvorbisenc.so.2.0.3
0ecda000-0ecdb000 r--p 00010000 03:03 1552203    /usr/lib/libvorbisenc.so.2.0.3
0ecdb000-0edc1000 rw-p 00011000 03:03 1552203    /usr/lib/libvorbisenc.so.2.0.3
0edd1000-0ee19000 r-xp 00000000 03:03 1552058    /usr/lib/libtheora.so.0.3.4
0ee19000-0ee28000 ---p 00048000 03:03 1552058    /usr/lib/libtheora.so.0.3.4
0ee28000-0ee29000 r--p 00047000 03:03 1552058    /usr/lib/libtheora.so.0.3.4
0ee29000-0ee2a000 rw-p 00048000 03:03 1552058    /usr/lib/libtheora.so.0.3.4
0ee3a000-0eeb0000 r-xp 00000000 03:03 1551864    
/usr/lib/libschroedinger-1.0.so.0.1.0
0eeb0000-0eec0000 ---p 00076000 03:03 1551864    
/usr/lib/libschroedinger-1.0.so.0.1.0
0eec0000-0eec1000 r--p 00076000 03:03 1551864    
/usr/lib/libschroedinger-1.0.so.0.1.0
0eec1000-0eec3000 rw-p 00077000 03:03 1551864    
/usr/lib/libschroedinger-1.0.so.0.1.0
0eed3000-0ef1a000 r-xp 00000000 03:03 229531     /usr/lib/libmp3lame.so.0.0.0
0ef1a000-0ef29000 ---p 00047000 03:03 229531     /usr/lib/libmp3lame.so.0.0.0
0ef29000-0ef2b000 r--p 00046000 03:03 229531     /usr/lib/libmp3lame.so.0.0.0
0ef2b000-0ef2c000 rw-p 00048000 03:03 229531     /usr/lib/libmp3lame.so.0.0.0
0ef2c000-0ef5d000 rw-p 0ef2c000 00:00 0
0ef6d000-0ef7b000 r-xp 00000000 03:03 229412     /usr/lib/libgsm.so.1.0.12
0ef7b000-0ef8a000 ---p 0000e000 03:03 229412     /usr/lib/libgsm.so.1.0.12
0ef8a000-0ef8b000 rw-p 0000d000 03:03 229412     /usr/lib/libgsm.so.1.0.12
0ef9b000-0efac000 r-xp 00000000 03:03 229518     /usr/lib/libfaac.so.0.0.0
0efac000-0efbc000 ---p 00011000 03:03 229518     /usr/lib/libfaac.so.0.0.0
0efbc000-0efbd000 r--p 00011000 03:03 229518     /usr/lib/libfaac.so.0.0.0
0efbd000-0efc0000 rw-p 00012000 03:03 229518     /usr/lib/libfaac.so.0.0.0
0efd0000-0effd000 r-xp 00000000 03:03 229572     /usr/lib/libamrwb.so.3.0.0
0effd000-0f00d000 ---p 0002d000 03:03 229572     /usr/lib/libamrwb.so.3.0.0
0f00d000-0f00e000 rw-p 0002d000 03:03 229572     /usr/lib/libamrwb.so.3.0.0
0f00e000-0f00f000 rw-p 0f00e000 00:00 0
0f01f000-0f05a000 r-xp 00000000 03:03 229567     /usr/lib/libamrnb.so.3.0.0
0f05a000-0f069000 ---p 0003b000 03:03 229567     /usr/lib/libamrnb.so.3.0.0
0f069000-0f06d000 rw-p 0003a000 03:03 229567     /usr/lib/libamrnb.so.3.0.0
0f07d000-0f092000 r-xp 00000000 03:03 1523737    /lib/libz.so.1.2.3.3
0f092000-0f0a1000 ---p 00015000 03:03 1523737    /lib/libz.so.1.2.3.3
0f0a1000-0f0a2000 r--p 00014000 03:03 1523737    /lib/libz.so.1.2.3.3
0f0a2000-0f0a3000 rw-p 00015000 03:03 1523737    /lib/libz.so.1.2.3.3
0f0b3000-0f0ca000 r-xp 00000000 03:03 1523969    /lib/libpthread-2.9.so
0f0ca000-0f0d9000 ---p 00017000 03:03 1523969    /lib/libpthread-2.9.so
0f0d9000-0f0da000 r--p 00016000 03:03 1523969    /lib/libpthread-2.9.so
0f0da000-0f0db000 rw-p 00017000 03:03 1523969    /lib/libpthread-2.9.so
0f0db000-0f0dd000 rw-p 0f0db000 00:00 0
0f0ed000-0f251000 r-xp 00000000 03:03 1523766    /lib/libc-2.9.so
0f251000-0f260000 ---p 00164000 03:03 1523766    /lib/libc-2.9.so
0f260000-0f264000 r--p 00163000 03:03 1523766    /lib/libc-2.9.so
0f264000-0f265000 rw-p 00167000 03:03 1523766    /lib/libc-2.9.so
0f265000-0f268000 rw-p 0f265000 00:00 0
0f278000-0f28e000 r-xp 00000000 03:03 1523722    /lib/libgcc_s.so.1
0f28e000-0f29d000 ---p 00016000 03:03 1523722    /lib/libgcc_s.so.1
0f29d000-0f29e000 r--p 00015000 03:03 1523722    /lib/libgcc_s.so.1
0f29e000-0f29f000 rw-p 00016000 03:03 1523722    /lib/libgcc_s.so.1
0f2af000-0f358000 r-xp 00000000 03:03 1523775    /lib/libm-2.9.so
0f358000-0f368000 ---p 000a9000 03:03 1523775    /lib/libm-2.9.so
0f368000-0f36b000 r--p 000a9000 03:03 1523775    /lib/libm-2.9.so
0f36b000-0f36c000 rw-p 000ac000 03:03 1523775    /lib/libm-2.9.so
0f37c000-0f498000 r-xp 00000000 03:03 1549220    /usr/lib/libstdc++.so.6.0.10
0f498000-0f4a8000 ---p 0011c000 03:03 1549220    /usr/lib/libstdc++.so.6.0.10
0f4a8000-0f4ac000 r--p 0011c000 03:03 1549220    /usr/lib/libstdc++.so.6.0.10
0f4ac000-0f4ae000 rw-p 00120000 03:03 1549220    /usr/lib/libstdc++.so.6.0.10
0f4ae000-0f4b3000 rw-p 0f4ae000 00:00 0
0f4c3000-0f4e9000 r-xp 00000000 03:03 1552776    /usr/lib/libjpeg.so.62.0.0
0f4e9000-0f4f9000 ---p 00026000 03:03 1552776    /usr/lib/libjpeg.so.62.0.0
0f4f9000-0f4fa000 rw-p 00026000 03:03 1552776    /usr/lib/libjpeg.so.62.0.0
0f50a000-0f531000 r-xp 00000000 03:03 1549931    /usr/lib/libpng12.so.0.27.0
0f531000-0f541000 ---p 00027000 03:03 1549931    /usr/lib/libpng12.so.0.27.0
0f541000-0f542000 r--p 00027000 03:03 1549931    /usr/lib/libpng12.so.0.27.0
0f542000-0f543000 rw-p 00028000 03:03 1549931    /usr/lib/libpng12.so.0.27.0
0f553000-0f581000 r-xp 00000000 03:03 2146340    
/usr/local/lib/libswscale.so.0.7.1
0f581000-0f590000 ---p 0002e000 03:03 2146340    
/usr/local/lib/libswscale.so.0.7.1
0f590000-0f591000 r--p 0002d000 03:03 2146340    
/usr/local/lib/libswscale.so.0.7.1
0f591000-0f592000 rw-p 0002e000 03:03 2146340    
/usr/local/lib/libswscale.so.0.7.1
0f5a2000-0fa06000 r-xp 00000000 03:03 2146332    
/usr/local/lib/libavcodec.so.52.30.2
0fa06000-0fa15000 ---p 00464000 03:03 2146332    
/usr/local/lib/libavcodec.so.52.30.2
0fa15000-0fa16000 r--p 00463000 03:03 2146332    
/usr/local/lib/libavcodec.so.52.30.2
0fa16000-0fa1e000 rw-p 00464000 03:03 2146332    
/usr/local/lib/libavcodec.so.52.30.2
0fa1e000-0fe40000 rw-p 0fa1e000 00:00 0
0fe50000-0ff29000 r-xp 00000000 03:03 2146328    
/usr/local/lib/libavformat.so.52.34.0
0ff29000-0ff38000 ---p 000d9000 03:03 2146328    
/usr/local/lib/libavformat.so.52.34.0
0ff38000-0ff39000 r--p 000d8000 03:03 2146328    
/usr/local/lib/libavformat.so.52.34.0
0ff39000-0ff3f000 rw-p 000d9000 03:03 2146328    
/usr/local/lib/libavformat.so.52.34.0
0ff3f000-0ff8b000 rw-p 0ff3f000 00:00 0
0ff9b000-0ffaa000 r-xp 00000000 03:03 2146336    
/usr/local/lib/libavutil.so.50.3.0
0ffaa000-0ffb9000 ---p 0000f000 03:03 2146336    
/usr/local/lib/libavutil.so.50.3.0
0ffb9000-0ffba000 r--p 0000e000 03:03 2146336    
/usr/local/lib/libavutil.so.50.3.0
0ffba000-0ffbb000 rw-p 0000f000 03:03 2146336    
/usr/local/lib/libavutil.so.50.3.0
0ffbb000-0ffbe000 rw-p 0ffbb000 00:00 0
0ffce000-0ffdf000 r-xp 00000000 03:03 1556797   
/usr/local/lib/libffmpegthumbnailer.so.3.0.1
0ffdf000-0ffee000 ---p 00011000 03:03 1556797   
/usr/local/lib/libffmpegthumbnailer.so.3.0.1
0ffee000-0ffef000 r--p 00010000 03:03 1556797   
/usr/local/lib/libffmpegthumbnailer.so.3.0.1
0ffef000-0fff0000 rw-p 00011000 03:03 1556797   
/usr/local/lib/libffmpegthumbnailer.so.3.0.1
10000000-10005000 r-xp 00000000 03:03 1556831    
/usr/local/bin/ffmpegthumbnailer
10014000-10015000 r--p 00004000 03:03 1556831    
/usr/local/bin/ffmpegthumbnailer
10015000-10016000 rw-p 00005000 03:03 1556831    
/usr/local/bin/ffmpegthumbnailer
10016000-1014d000 rwxp 10016000 00:00 0          [heap]
48000000-4801f000 r-xp 00000000 03:03 1523728    /lib/ld-2.9.so
4801f000-48022000 rw-p 4801f000 00:00 0
4802a000-4802f000 rw-p 4802a000 00:00 0
4802f000-48030000 r--p 0001f000 03:03 1523728    /lib/ld-2.9.so
48030000-48031000 rw-p 00020000 03:03 1523728    /lib/ld-2.9.so
48031000-48102000 rw-p 48031000 00:00 0
bfb07000-bfb1c000 rwxp bffeb000 00:00 0          [stack]
Aborted

Original comment by kris.koleman on 6 Jun 2009 at 8:39

GoogleCodeExporter commented 9 years ago
In that case can you try the code in subversion. There has been a fix this week 
which
should fix segmentation faults when using ffmpeg with altivec (memory alignment
thing). Since you have a powerpc you are probably using altivec.

Original comment by dirk.vdb on 6 Jun 2009 at 11:23

GoogleCodeExporter commented 9 years ago
Having got latest (r154) from the svn repos then after building and executing 
then I
receive the following output:

root@server:~# /usr/local/bin/ffmpegthumbnailer  -i Jim\ Flying\ Alarm\ 
Clock.mp4 -o
pic.png
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x100208c0]ISO: File Type Major Brand: 24pm
st:0 removing common factor 4 from timebase
/usr/local/bin/ffmpegthumbnailer: symbol lookup error:
/usr/local/lib/libffmpegthumbnailer.so.3: undefined symbol: av_free_packet

Original comment by kris.koleman on 7 Jun 2009 at 10:15

GoogleCodeExporter commented 9 years ago
Are you sure your ffmpeg installation is still ok? Try building from scratch 
with
version 1.5.3 which was released today.

Original comment by dirk.vdb on 7 Jun 2009 at 10:22

GoogleCodeExporter commented 9 years ago
I'll remove and rebuild ffmepg and then ffmpegthumbnailer, hopefully tomorrow
evening.  I'll post back when I've done that. 

Original comment by kris.koleman on 7 Jun 2009 at 10:32

GoogleCodeExporter commented 9 years ago
Ok - I've done that now and it is working in some cases.  It looks like 
something was
wrong with my ffmpeg build.

I'm using it in mediatomb to display movie thumbnails in the 0.12 svn code 
(r2019)
and it still causes crashes with some of my media.  I'll try and find a 
selection of
the offending files and upload some samples.

Once I find problem files what is the best way to isolate a small part of them 
for
upload here?

Apologies for the lack of information about what file types are problematical 
etc - I
need to sleep before work tomorrow, but will look into it more when I get a 
chance
this week.

Thanks for your efforts so far :)

MediaTomb exits with the following trace:

*** glibc detected *** /usr/local/bin/mediatomb: double free or corruption 
(!prev):
0x118763a0 ***
======= Backtrace: =========
/lib/libc.so.6[0xf0a4208]
/lib/libc.so.6(cfree+0xcc)[0xf0a60ec]
/usr/lib/altivec/libavutil.so.49(av_free+0x2c)[0xf963db4]
/usr/lib/altivec/libavutil.so.49(av_freep+0x30)[0xf963df8]
/usr/local/lib/libswscale.so.0(sws_freeContext+0xa4)[0xe5f4e24]
/usr/lib/libffmpegthumbnailer.so.2(_ZN12MovieDecoder20convertAndScaleFrameEiibRi
S0_+0xf0)[0xf92f1a0]
/usr/lib/libffmpegthumbnailer.so.2(_ZN12MovieDecoder19getScaledVideoFrameEibR10V
ideoFrame+0x6c)[0xf92f31c]
/usr/lib/libffmpegthumbnailer.so.2(_ZN16VideoThumbnailer17generateThumbnailERKSs
R11ImageWriterP15AVFormatContext+0xc4)[0xf933bc4]
/usr/lib/libffmpegthumbnailer.so.2(_ZN16VideoThumbnailer17generateThumbnailERKSs
13ImageTypeEnumRSt6vectorIhSaIhEEP15AVFormatContext+0x7c)[0xf933f0c]
/usr/lib/libffmpegthumbnailer.so.2(generate_thumbnail_to_buffer+0x7c)[0xf9350dc]
/usr/local/bin/mediatomb(_ZN13FfmpegHandler12serveContentEN3zmm3RefI7CdsItemEEiP
x+0x1b8)[0x1011d9d8]
/usr/local/bin/mediatomb(_ZN18FileRequestHandler4openEPKcP9File_Info16UpnpOpenFi
leMode+0x1324)[0x101173e4]
/usr/local/bin/mediatomb[0x100e2fa0]
/usr/local/bin/mediatomb(web_server_callback+0x704)[0x1015fa54]
/usr/local/bin/mediatomb[0x10157508]
/usr/local/bin/mediatomb[0x10167a8c]
/lib/libpthread.so.0[0xf828e94]
/lib/libc.so.6(clone+0x84)[0xf10fee0]

One individual file produces (though some others work):

root@server:~# /usr/local/bin/ffmpegthumbnailer  -i movie.avi -o pic.png
[NULL @ 0x10021b70]Invalid and inefficient vfw-avi packed B frames detected
[mpeg4 @ 0x10021b70]Invalid and inefficient vfw-avi packed B frames detected

Original comment by kris.koleman on 7 Jun 2009 at 11:29

GoogleCodeExporter commented 9 years ago
you can use ffmpeg to take only a small part of the file
ffmpeg -i in.avi -t 1 out.avi

This will create a video containing the first second of in.avi

Original comment by dirk.vdb on 8 Jun 2009 at 10:26

GoogleCodeExporter commented 9 years ago
This appears to be fixed now in the standalone case.

I wrote a shell script to create thumbnails for all my videos and it succeeded 
on all
of them.

It crashed when using mediatombs built in thumbnail generation with the above 
stack
trace, however if I use the previous transcoding method of generating 
thumbnails then
they work just fine. (and I can also implement my own cache to speed things up 
this
way too)

I'll raise this crash with the mediatomb developers directly.

Thanks for your help.

Original comment by kris.koleman on 9 Jun 2009 at 2:57

GoogleCodeExporter commented 9 years ago
If mediatomb is statically linked against ffmpegthumbnailer then it will keep
crashing. Have you tried rebuilding mediatomb?

Original comment by dirk.vdb on 9 Jun 2009 at 3:04

GoogleCodeExporter commented 9 years ago
Yes I rebuild that.  

I did a "make uninstall && make clean" for mediatomb, ffmpegthumbnailer & 
ffmpeg.

I've not looked at how mediatomb links to the lib - I'll rebuild it again just 
to be
certain.

Original comment by kris.koleman on 9 Jun 2009 at 3:10

GoogleCodeExporter commented 9 years ago
Before filing a bug report at mediatomb, can you verify the following:

(run these three commands)
wget http://ffmpegthumbnailer.googlecode.com/svn/trunk/main.c
gcc `pkg-config --libs --cflags libffmpegthumbnailer` main.c -o test
./test amovie.avi

This should generate a file output.jpg conatining a thumbnail

This is to test if the flat c api is working correctly. Mediatomb uses the c api
ffmpegthumbnailer uses the c++ api

Regards,
Dirk

Original comment by dirk.vdb on 10 Jun 2009 at 10:30

GoogleCodeExporter commented 9 years ago
I've run the above and they complete fine.

I also rebuilt mediatomb and it does indeed still crash with the previous stack 
trace.

Thanks for the help with this,  I'll file a bug with mediatomb now I guess.

Original comment by kris.koleman on 10 Jun 2009 at 6:10

GoogleCodeExporter commented 9 years ago
One last check could be to compare the output of

ldd /usr/bin/ffmpegthumbnailer | grep thumbnailer
ldd /usr/bin/mediatomb | grep thumbnailer

they should be the same.

I looked at how mediatomb uses the ffmpegthumbnailer library, it;s exactly the 
same
as the main.c file. I doubt the problem is in mediatomb.

Original comment by dirk.vdb on 10 Jun 2009 at 6:25

GoogleCodeExporter commented 9 years ago
mediatomb was linking against a different version of the lib in /usr/lib not
/usr/local/lib 

I guess these were left over from a previous install from apt that didn't get 
removed
since everything I've built I've installed to /usr/local/.

Thanks again,

Original comment by kris.koleman on 10 Jun 2009 at 7:13

GoogleCodeExporter commented 9 years ago
I had a sneaky suspicion :-)

Good to hear that it's working.

Regards,
Dirk

Original comment by dirk.vdb on 10 Jun 2009 at 7:18