Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Mar 2009 13:06:59 +0100
From:      Tomek <tomek@slimaczek.pl>
To:        freebsd-multimedia@freebsd.org
Subject:   ffmpeg patch
Message-ID:  <763980187.20090302130659@slimaczek.pl>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hello

FFMpeg needs to include <sys/types.h> to correctly understand types:
u_short, u_int etc.

How to applay:
$ svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
$ patch -p0 < ffmpeg.bsd.patch
$ cd ffmpeg
$ ./configure --cc=cc --prefix=/usr/local --disable-debug --enable-memalign-hack --enable-shared --enable-postproc --extra-cflags="-I/usr/local/include/vorbis -I/usr/local/include" --extra-ldflags="-L/usr/local/lib -la52" --extra-libs=-pthread --enable-gpl --enable-pthreads --enable-swscale --mandir=/usr/local/man  --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libamr-nb --enable-nonfree --enable-libamr-wb --enable-nonfree --disable-mmx --enable-libgsm --enable-libmp3lame --disable-ffplay --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-ipv6
$ gmake

# gmake install

$ ffmpeg
FFmpeg version SVN-r17655, Copyright (c) 2000-2009 Fabrice Bellard, et al.
[...] 

I tested it (on i386 and amd64) by converting a few films (with a new
x264 version):
$ ffmpeg -i "[input_file]" -g 300 -keyint_min 25 -bf 16 -b_strategy 1 -flags2 +bpyramid -coder 1 -refs 8 -flags +loop -crf 23 -partitions +partp8x8+partb8x8+parti8x8+parti4x4 -flags2 +wpred -me_method hex -me_range 16 -subq 9 -trellis 2 -vcodec libx264 -acodec libfaac -ab 96k -ac 2 -threads 1 -async 25 "[output_file_without_ext].mp4"
and it works perfect.

Some problems were only with the lame audio codec, such as:
[libmp3lame @ 0x8108410]lame: output buffer too small (buffer index: 9404, free bytes: 388)

-- 
Tomasz Sowa
[-- Attachment #2 --]
diff -urN ffmpeg/libavdevice/bktr.c ffmpeg.new/libavdevice/bktr.c
--- ffmpeg/libavdevice/bktr.c	2009-02-28 10:57:32.000000000 +0000
+++ ffmpeg.new/libavdevice/bktr.c	2009-02-28 11:59:05.000000000 +0000
@@ -24,6 +24,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define __BSD_VISIBLE 1
+#include <sys/types.h>
+
 #define _BSD_SOURCE 1
 #include "libavformat/avformat.h"
 #if HAVE_DEV_BKTR_IOCTL_METEOR_H && HAVE_DEV_BKTR_IOCTL_BT848_H
diff -urN ffmpeg/libavdevice/oss_audio.c ffmpeg.new/libavdevice/oss_audio.c
--- ffmpeg/libavdevice/oss_audio.c	2009-02-28 10:57:33.000000000 +0000
+++ ffmpeg.new/libavdevice/oss_audio.c	2009-02-28 11:59:20.000000000 +0000
@@ -19,6 +19,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define __BSD_VISIBLE 1
+#include <sys/types.h>
+
 #include "config.h"
 #include <stdlib.h>
 #include <stdio.h>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?763980187.20090302130659>