On 8/11/2012 2:54 AM, Beat Zahnd wrote:
Hi all,
When trying to encode a movie on Mountain Lion using the libx264 codec ffmpeg
segfaults with return code 139. And why is this -strict option needed?
Beat
$ ffmpeg -y -threads 4 -i test.mov -b:v 1200k -map_metadata -1 -strict -2
out.mov
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Aug 3 2012 19:42:57 with clang 4.0 ((tags/Apple/clang-421.0.57))
configuration: --prefix=/sw --prefix=/sw/lib/ffmpeg-0.11 --bindir=/sw/bin
--mandir=/sw/share/man --enable-shared --disable-static --enable-gpl
--enable-version3 --enable-pthreads --enable-x11grab --enable-bzlib
--enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libcdio --enable-libfreetype
--enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg
--enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid
--enable-zlib
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2012-08-09 16:30:24
Duration: 00:07:54.73, start: 0.000000, bitrate: 75140 kb/s
Stream #0:0(und): Audio: pcm_s16be (lpcm / 0x6D63706C), 44100 Hz, stereo,
s16, 1411 kb/s
Metadata:
creation_time : 2012-08-09 16:30:24
handler_name : Core Media Data Handler
Stream #0:1(und): Video: rawvideo (2vuy / 0x79757632), uyvy422, 640x480,
73728 kb/s, 15 fps, 15 tbr, 30k tbn, 30k tbc
Metadata:
creation_time : 2012-08-09 16:30:24
handler_name : Core Media Data Handler
[buffer @ 0x7f8de3c15c40] w:640 h:480 pixfmt:uyvy422 tb:1/30000 sar:0/1
sws_param:flags=2
[buffersink @ 0x7f8de3c15f00] No opaque field provided
[format @ 0x7f8de3c16240] auto-inserting filter 'auto-inserted scaler 0'
between the filter 'src' and the filter 'format'
[scale @ 0x7f8de3c16560] w:640 h:480 fmt:uyvy422 sar:0/1 -> w:640 h:480
fmt:yuv422p sar:0/1 flags:0x4
[aformat @ 0x7f8de3c17000] auto-inserting filter 'auto-inserted resampler 0'
between the filter 'src' and the filter 'aformat'
[aresample @ 0x7f8de3c17500] chl:stereo fmt:s16 r:44100Hz -> chl:stereo fmt:flt
r:44100Hz
[libx264 @ 0x7f8de404ae00] using cpu capabilities: MMX2 SSE2Fast SSSE3
FastShuffle SSE4.2
[libx264 @ 0x7f8de404ae00] profile High 4:2:2, level 2.2, 4:2:2 8-bit
[libx264 @ 0x7f8de404ae00] 264 - core 118 - H.264/MPEG-4 AVC codec - Copyleft
2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3
deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00
mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11
fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1
interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2
b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250
keyint_min=15 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1
bitrate=1200 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40
aq=1:1.00
Output #0, mov, to 'out.mov':
Metadata:
encoder : Lavf54.6.100
Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv422p, 640x480, q=-1--1,
1200 kb/s, 15 tbn, 15 tbc
Stream #0:1: Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, flt, 128
kb/s
Stream mapping:
Stream #0:1 -> #0:0 (rawvideo -> libx264)
Stream #0:0 -> #0:1 (pcm_s16be -> aac)
Press [q] to stop, [?] for help
Segmentation fault: 11
Please try the attached file. Save it to
/sw/fink/dists/local/main/finkinfo and rebuild libx264 with
fink install libx264-118-shlibs
then try your ffmpeg command again. You should not need to rebuild
ffmpeg if this fix works.
As for the -strict flag requirement, I don't know as I've never used it.
ffmpeg-users might be a better place to discuss that once your x264 is
working.
Hanspeter
Package: libx264-118-shlibs
Version: 0.0.20111013
Revision: 3.1
###
BuildDepends: x11-dev, yasm (>= 0.8.0-1)
Depends: x11
###
Source:
ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20111013-2245.tar.bz2
SourceDirectory: x264-snapshot-20111013-2245
Source-MD5: 155d875d961626fe84b94e63c9fda328
###
#PatchFile: %n.patch
#PatchFile-MD5: e19f27c355fca4b2493f9250c8668151
###
DocFiles: AUTHORS COPYING
###
NoSetCFLAGS: true
ConfigureParams: <<
--enable-shared \
--disable-lavf \
--disable-swscale \
--enable-visualize \
--enable-pic \
--host=%m-apple-darwin`uname -r`
<<
CompileScript: <<
#!/bin/sh -ev
%{default_script}
### change CFLAGS to use -O1 to avoid clang issue
#export TMPCFLAGS="`grep CFLAGS config.mak | cut -f 2- -d '=' | sed
s/O3/O1/`"
#printenv TMPCFLAGS
#gcc ${TMPCFLAGS} -c -o encoder/analyse.o encoder/analyse.c
### just to make sure
#unset TMPCFLAGS
#make
### copy config.mak to modify the -O flag
cp config.mak config1.mak
perl -pi -e 's|-O3|-O1|g' config1.mak
### now have Makefile import config1.mak and build encoder/analyse.o
perl -pi -e 's|config.mak|config1.mak|g' Makefile
rm encoder/analyse.o
make encoder/analyse.o
### return to normal and remake
perl -pi -e 's|config1.mak|config.mak|g' Makefile
make
<<
###
InstallScript: <<
make install DESTDIR=%d
<<
###
Shlibs: %p/lib/libx264.118.dylib 0.0.0 %n (>= 0.0.20111013-1)
###
SplitOff: <<
Package: x264
Description: libx264 utilities
Depends: libx264-118-shlibs (>= %v-%r), x11
Files: <<
bin
<<
DocFiles: AUTHORS COPYING
<<
SplitOff2: <<
Package: libx264-118-dev
Description: libx264 developer files
Depends: libx264-118-shlibs (>= %v-%r)
Conflicts: <<
libx264-dev,
libx264-98-dev,
libx264-115-dev,
libx264-118-dev,
libx264-devel-dev
<<
Replaces: <<
libx264-dev,
libx264-98-dev,
libx264-115-dev,
libx264-118-dev,
libx264-devel-dev
<<
BuildDependsOnly: true
Files: <<
include
lib/libx264.dylib
lib/pkgconfig
<<
DocFiles: AUTHORS COPYING
<<
###
Description: Encoding H264/AVC video stream shared library
DescDetail: <<
x264 is a free library for encoding H264/AVC video streams
<<
DescPackaging: <<
Starting with library version -98-, the -dev splitoff is named to match the
-shlibs splitoff. In version -57-, the dev splitoff was simply named
libx264-dev, and this generated much confusion for the dependency engine.
Static library removed beginning with library version -115-.
<<
DescPort: <<
-O1 set for clang issue: http://llvm.org/bugs/show_bug.cgi?id=11859
CompileScript modified so that only encoder/analyse.o is built with -O1
<<
###
License: GPL
Maintainer: Hanspeter Niederstrasser <[email protected]>
Homepage: http://www.videolan.org/developers/x264.html
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fink-users mailing list
[email protected]
List archive:
http://news.gmane.org/gmane.os.macosx.fink.user
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users