FORUMS: list search recent posts

Segmentation Fault while adding subtitles (libass)

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Natanael Finnz
Segmentation Fault while adding subtitles (libass)
on Nov 16, 2012 at 10:12:19 am

This is a rather specific problem, but I'm turning up little on how to troubleshoot it. I'm burning subtitles with libass in ffmpeg (latest build) on CentOS5.8, and I get a Fontconfig disabled warning, and a segmentation fault on the first frame (result is one broken frame). Here's the command and output:

[bash]$ ffmpeg -i big_buck_bunny.avi -vf ass=subtitles_siles.ass -y test.avi
ffmpeg version N-46772-g850e5c0 Copyright (c) 2000-2012 the FFmpeg developers
built on Nov 15 2012 16:39:38 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-52)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-libass
libavutil 52. 6.100 / 52. 6.100
libavcodec 54. 71.100 / 54. 71.100
libavformat 54. 36.100 / 54. 36.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 23.100 / 3. 23.100
libswscale 2. 1.102 / 2. 1.102
libswresample 0. 16.100 / 0. 16.100
libpostproc 52. 1.100 / 52. 1.100
Input #0, avi, from 'big_buck_bunny.avi':
Metadata:
encoder : Lavf53.4.0
Duration: 00:00:30.02, start: 0.000000, bitrate: 2721 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 854x480 [SAR 1:1 DAR 427:240], 24 tbr, 24 tbn, 24 tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), s16, 448 kb/s
[Parsed_ass_0 @ 0xf70000] Added subtitle file: 'subtitles_siles.ass' (1 styles, 20 events)
[Parsed_ass_0 @ 0xf70000] Fontconfig disabled, only default font will be used.
Output #0, avi, to 'test3.avi':
Metadata:
ISFT : Lavf54.36.100
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 854x480 [SAR 1:1 DAR 427:240], q=2-31, 200 kb/s, 24 tbn, 24 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> mpeg4)
Stream #0:1 -> #0:1 (ac3 -> libmp3lame)
Press [q] to stop, [?] for help
[Parsed_ass_0 @ 0xf70000] Neither PlayResX nor PlayResY defined. Assuming 384x288
Segmentation Fault


I've tried adding an environment variable:

export FONTCONFIG_PATH=/etc/fonts

But same result. I did not have this issue with version 1.0 on OSX using the same files, it points toward something to do with the fontconfig warning, but haven't found a way to resolve it since the env variable didn't work. Tried also with other output fomats ie .mp4 (video encoders) and no difference.


Return to posts index

Natanael Finnz
Re: Segmentation Fault while adding subtitles (libass)
on Nov 17, 2012 at 3:44:42 pm

I solved this error (with help from Nicolas George on ffmpeg-users) by rebuilding libass with fontconfig enabled. It seems that the libass package in yum did not have it enabled which makes it pretty useless. You may also have to compile your own fontconfig depending on which version you build of libass, as the repo version is 2.4.1. My steps:

# remove libass and fontconfig
yum erase libass fontconfig

# get fontconfig
wget http://cgit.freedesktop.org/fontconfig/snapshot/fontconfig-2.4.2.tar.gz
tar -xzf fontconfig-2.4.2.tar.gz
cd fontconfig-2.4.2
./autogen.sh
make && make install

# get libass
wget http://libass.googlecode.com/files/libass-0.10.1.tar.gz
tar libass-0.10.1.tar.gz
cd libass-0.10.1
./configure --enable-fontconfig
make && make install

# Then you'll need to rebuild and configure ffmpeg with --enable-libass --enable-fontconfig


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]