Commit a447d1b2 authored by Jan Gerber's avatar Jan Gerber
Browse files

update to new ffmpeg git repository, only print aspect ratio once in --info

parent bbc41436
svn
- select resize method via commandline
- fix 5.1 channel ordering
- use ffmpeg trunk
0.27 2010-06-18
- Use Skeleton 4.0 by default (including index),
......
......@@ -3,7 +3,7 @@ Compiling from tarball or subversion:
you need
- scons (http://www.scons.org/)
- the latest version of libtheora <http://downloads.xiph.org/releases/theora/>
- ffmpeg svn <http://ffmpeg.sf.net> by running ./get_ffmpeg_svn.sh
- ffmpeg git <http://ffmpeg.org> by running ./get_ffmpeg.sh
(this script downloads ffmpeg and runs configure and compiles ffmpeg)
- for subtitles support, libkate <http://code.google.com/p/libkate/>,
or by running ./get_libkate.sh (this script downloads libkate, and
......
......@@ -139,16 +139,25 @@ if not conf.CheckPKG(XIPH_LIBS):
Exit(1)
ParsePKGConfig(env, XIPH_LIBS)
FFMPEG_LIBS=["libavcodec >= 52.30.0", "libavdevice", "libavformat", "libpostproc", "libswscale"]
FFMPEG_LIBS=[
"libavdevice",
"libavformat",
"libavcodec >= 52.30.0",
"libpostproc",
"libswscale",
]
if os.path.exists("./ffmpeg"):
os.environ['PKG_CONFIG_PATH'] = "./ffmpeg/libavutil:./ffmpeg/libavformat:./ffmpeg/libavcodec:./ffmpeg/libavdevice:./ffmpeg/libswscale:./ffmpeg/libpostproc:" + os.environ.get('PKG_CONFIG_PATH', '')
pkg_path = list(set(map(os.path.dirname, glob('./ffmpeg/*/*.pc'))))
pkg_path.append(os.environ.get('PKG_CONFIG_PATH', ''))
os.environ['PKG_CONFIG_PATH'] = ':'.join(pkg_path)
if not conf.CheckPKG(' '.join(FFMPEG_LIBS)):
print """
Could not find %s.
You can install it via
sudo apt-get install %s
or update PKG_CONFIG_PATH to point to ffmpeg's source folder
or run ./get_ffmpeg_svn.sh (for more information see INSTALL)
or run ./get_ffmpeg.sh (for more information see INSTALL)
""" %(" ".join(FFMPEG_LIBS), " ".join(["%s-dev"%l.split()[0] for l in FFMPEG_LIBS]))
Exit(1)
......
FFMPEG_CO_DIR=ffmpeg
FFMPEG_SVN=svn://svn.ffmpeg.org/ffmpeg/branches/0.6
#not required fro 0.6 branch
# Because ffmpeg checks out libswscale via an svn:externals, checking
# out an old ffmpeg does not check out a corresponding libswscale.
# Keep the swscale checkout manually synchronized, then. Update this
# when you update FFMPEG_REVISION.
#FFMPEG_REVISION=23309
#FFMPEG_EXTERNALS_REVISION=31211
FFMPEG_URL=git://git.videolan.org/ffmpeg
#FFMPEG_REVISION=54bc6403620286f595becd01842947395020e2f4
......@@ -21,15 +21,14 @@ uname | grep MINGW && options="$common --enable-memalign-hack --enable-mingw32 -
# load FFMPEG specific properties
. ./ffmpegrev
#Get ffmpeg from svn
#svn -r $FFMPEG_REVISION co $FFMPEG_SVN $FFMPEG_CO_DIR
#svn update -r $FFMPEG_EXTERNALS_REVISION $FFMPEG_CO_DIR/libswscale
#Get ffmpeg from svn 0.6 branch
svn co $FFMPEG_SVN $FFMPEG_CO_DIR
test -e $FFMPEG_CO_DIR || git clone $FFPMEG_URL $FFMPEG_CO_DIR
cd $FFMPEG_CO_DIR
#git pull -r $FFMPEG_REVISION
git pull
cd ..
apply_patches() {
cd ffmpeg
cd $FFMPEG_CO_DIR
for patch in ../patches/*.patch; do
patch -p0 < $patch
done
......@@ -37,7 +36,7 @@ apply_patches() {
cd ..
}
test -e ffmpeg/.ffmpeg2theora_patched || apply_patches
test -e $FFMPEG_CO_DIR/.ffmpeg2theora_patched || apply_patches
#configure and build ffmpeg
cd ffmpeg && ./configure $options && make
cd $FFMPEG_CO_DIR && ./configure $options && make
......@@ -316,20 +316,6 @@ static void json_stream_format(FILE *output, AVFormatContext *ic, int i, int ind
fprintf(output, "{\n");
json_codec_info(output, st->codec, indent + 1);
if (st->sample_aspect_ratio.num && // default
av_cmp_q(st->sample_aspect_ratio, st->codec->sample_aspect_ratio)) {
AVRational display_aspect_ratio;
av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den,
st->codec->width*st->sample_aspect_ratio.num,
st->codec->height*st->sample_aspect_ratio.den,
1024*1024);
snprintf(buf1, sizeof(buf1), "%d:%d",
st->sample_aspect_ratio.num, st->sample_aspect_ratio.den);
json_add_key_value(output, "pixel_aspect_ratio", buf1, JSON_STRING, 0, indent + 1);
snprintf(buf1, sizeof(buf1), "%d:%d",
display_aspect_ratio.num, display_aspect_ratio.den);
json_add_key_value(output, "display_aspect_ratio", buf1, JSON_STRING, 0, indent + 1);
}
if(st->codec->codec_type == CODEC_TYPE_VIDEO){
if (st->time_base.den && st->time_base.num && av_q2d(st->time_base) > 0.001) {
snprintf(buf1, sizeof(buf1), "%d:%d",
......
......@@ -1284,7 +1284,7 @@ void oggmux_add_audio (oggmux_info *info, int16_t * buffer, int bytes, int sampl
if (op.packetno != 4) {
/* We only expect negative start granule in the first content
packet, not any of the others... */
fprintf(stderr, "WARNING: vorbis packet %d has calculated start"
fprintf(stderr, "WARNING: vorbis packet %lld has calculated start"
" granule of %lld, but it should be non-negative!",
op.packetno, start_granule);
}
......@@ -1295,7 +1295,7 @@ void oggmux_add_audio (oggmux_info *info, int16_t * buffer, int bytes, int sampl
allowed by the specification in the last packet only, and the
trailing samples should be discarded and not played/indexed. */
if (!op.e_o_s) {
fprintf(stderr, "WARNING: vorbis packet %d (granulepos %lld) starts before"
fprintf(stderr, "WARNING: vorbis packet %lld (granulepos %lld) starts before"
" the end of the preceeding packet!", op.packetno, op.granulepos);
}
start_granule = info->vorbis_granulepos;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment