From 600d5378dadf22b8517d52ac19500594bce4b66d Mon Sep 17 00:00:00 2001 From: root Date: Sun, 13 Nov 2011 23:14:59 +0000 Subject: Sun Nov 13 23:14:59 UTC 2011 --- extra/transcode/PKGBUILD | 16 ++-- extra/transcode/transcode-1.1.5-ffmpeg.patch | 124 +++++++++++++++++++++++++++ 2 files changed, 131 insertions(+), 9 deletions(-) create mode 100644 extra/transcode/transcode-1.1.5-ffmpeg.patch (limited to 'extra/transcode') diff --git a/extra/transcode/PKGBUILD b/extra/transcode/PKGBUILD index a7e6a6530..9ba6c94ad 100644 --- a/extra/transcode/PKGBUILD +++ b/extra/transcode/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 137997 2011-09-13 21:30:20Z eric $ +# $Id: PKGBUILD 142644 2011-11-12 17:15:42Z ibiru $ # Maintainer: # Contributor: Sarah Hay # Contributor: roberto @@ -6,31 +6,29 @@ pkgname=transcode _sripver=0.3-4 pkgver=1.1.5 -pkgrel=6 +pkgrel=7 pkgdesc="A video/DVD ripper and encoder for the terminal/console" arch=('i686' 'x86_64') url="http://tcforge.berlios.de/" license=('GPL') -depends=('imagemagick' 'lzo2' 'libdvdread' 'ffmpeg' 'mjpegtools' +depends=('gawk' 'imagemagick' 'lzo2' 'libdvdread' 'ffmpeg' 'mjpegtools' 'libmpeg2' 'libxaw' 'libxml2' 'libxv' 'a52dec') makedepends=('nasm') options=('!libtool' '!makeflags') source=(http://download2.berlios.de/tcforge/${pkgname}-${pkgver}.tar.bz2 http://downloads.sourceforge.net/sourceforge/subtitleripper/subtitleripper-${_sripver}.tgz - transcode-1.1.5-jpeg-7.patch transcode-1.1.5-mpa.patch) -md5sums=('41ac6b1c0fe30f3aab286e771fc31b9e' - 'c0bd49a88f667c68c4430ad25bbed510' - 'af4056b7530a6f147594f676849e7c7b' - 'c299cfc6c4be6a5512d1a129f04e5450') + transcode-1.1.5-jpeg-7.patch transcode-1.1.5-mpa.patch transcode-1.1.5-ffmpeg.patch) sha1sums=('48c36e06ca0cd1cdc1a9c6a241e231f896eefd26' 'd93ff3578dd5f722c8f4ef16bc0903eec5781a0d' '9e380c00a3b31725dc3ec483fa7bf5e3d8a8a977' - '6f45d9167c3aa15a83cb29545749f55eb1f1e5a2') + '6f45d9167c3aa15a83cb29545749f55eb1f1e5a2' + '2d3bb4486394ee55540e772f134e193874e5c2b4') build() { cd "${srcdir}/${pkgname}-${pkgver}" patch -p0 < ../transcode-1.1.5-jpeg-7.patch patch -p1 < ../transcode-1.1.5-mpa.patch + patch -p1 < ../transcode-1.1.5-ffmpeg.patch # building from here ./configure --prefix=/usr \ diff --git a/extra/transcode/transcode-1.1.5-ffmpeg.patch b/extra/transcode/transcode-1.1.5-ffmpeg.patch new file mode 100644 index 000000000..86e8272e9 --- /dev/null +++ b/extra/transcode/transcode-1.1.5-ffmpeg.patch @@ -0,0 +1,124 @@ +Index: transcode-1.1.5/encode/encode_lavc.c +=================================================================== +--- transcode-1.1.5.orig/encode/encode_lavc.c ++++ transcode-1.1.5/encode/encode_lavc.c +@@ -955,8 +955,6 @@ static void tc_lavc_config_defaults(TCLa + /* + * context *transcode* (not libavcodec) defaults + */ +- pd->ff_vcontext.mb_qmin = 2; +- pd->ff_vcontext.mb_qmax = 31; + pd->ff_vcontext.max_qdiff = 3; + pd->ff_vcontext.max_b_frames = 0; + pd->ff_vcontext.me_range = 0; +@@ -1116,8 +1114,6 @@ static int tc_lavc_read_config(TCLavcPri + // handled by transcode core + // { "vqmax", PCTX(qmax), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 }, + // handled by transcode core +- { "mbqmin", PCTX(mb_qmin), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 }, +- { "mbqmax", PCTX(mb_qmax), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 }, + { "lmin", PAUX(lmin), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0 }, + { "lmax", PAUX(lmax), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0 }, + { "vqdiff", PCTX(max_qdiff), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31 }, +Index: transcode-1.1.5/export/aud_aux.c +=================================================================== +--- transcode-1.1.5.orig/export/aud_aux.c ++++ transcode-1.1.5/export/aud_aux.c +@@ -347,7 +347,7 @@ static int tc_audio_init_ffmpeg(vob_t *v + //-- set parameters (bitrate, channels and sample-rate) -- + //-------------------------------------------------------- + memset(&mpa_ctx, 0, sizeof(mpa_ctx)); // default all +- mpa_ctx.codec_type = CODEC_TYPE_AUDIO; ++ mpa_ctx.codec_type = AVMEDIA_TYPE_AUDIO; + mpa_ctx.bit_rate = vob->mp3bitrate * 1000; // bitrate dest. + mpa_ctx.channels = vob->dm_chan; // channels + mpa_ctx.sample_rate = vob->a_rate; +Index: transcode-1.1.5/export/export_ffmpeg.c +=================================================================== +--- transcode-1.1.5.orig/export/export_ffmpeg.c ++++ transcode-1.1.5/export/export_ffmpeg.c +@@ -643,8 +643,6 @@ MOD_init + + lavc_venc_context->bit_rate = vob->divxbitrate * 1000; + lavc_venc_context->bit_rate_tolerance = lavc_param_vrate_tolerance * 1000; +- lavc_venc_context->mb_qmin = lavc_param_mb_qmin; +- lavc_venc_context->mb_qmax = lavc_param_mb_qmax; + lavc_venc_context->lmin= (int)(FF_QP2LAMBDA * lavc_param_lmin + 0.5); + lavc_venc_context->lmax= (int)(FF_QP2LAMBDA * lavc_param_lmax + 0.5); + lavc_venc_context->max_qdiff = lavc_param_vqdiff; +Index: transcode-1.1.5/import/decode_lavc.c +=================================================================== +--- transcode-1.1.5.orig/import/decode_lavc.c ++++ transcode-1.1.5/import/decode_lavc.c +@@ -261,8 +261,12 @@ void decode_lavc(decode_t *decode) + + //tc_log_msg(__FILE__, "SIZE: (%d) MP4(%d) blen(%d) BUF(%d) read(%ld)", len, mp4_size, buf_len, READ_BUFFER_SIZE, bytes_read); + do { +- len = avcodec_decode_video(lavc_dec_context, &picture, +- &got_picture, buffer+buf_len, mp4_size-buf_len); ++ AVPacket pkt; ++ av_init_packet( &pkt ); ++ pkt.data = buffer+buf_len; ++ pkt.size = mp4_size-buf_len; ++ len = avcodec_decode_video2(lavc_dec_context, &picture, ++ &got_picture, &pkt); + + if (len < 0) { + tc_log_error(__FILE__, "frame decoding failed"); +Index: transcode-1.1.5/import/probe_ffmpeg.c +=================================================================== +--- transcode-1.1.5.orig/import/probe_ffmpeg.c ++++ transcode-1.1.5/import/probe_ffmpeg.c +@@ -47,7 +47,7 @@ static void translate_info(const AVForma + for (i = 0; i < ctx->nb_streams; i++) { + st = ctx->streams[i]; + +- if (st->codec->codec_type == CODEC_TYPE_VIDEO) { ++ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { + info->bitrate = st->codec->bit_rate / 1000; + info->width = st->codec->width; + info->height = st->codec->height; +@@ -65,7 +65,7 @@ static void translate_info(const AVForma + for (i = 0; i < ctx->nb_streams; i++) { + st = ctx->streams[i]; + +- if (st->codec->codec_type == CODEC_TYPE_AUDIO ++ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO + && j < TC_MAX_AUD_TRACKS) { + info->track[j].format = 0x1; /* known wrong */ + info->track[j].chan = st->codec->channels; +Index: transcode-1.1.5/export/ffmpeg_cfg.c +=================================================================== +--- transcode-1.1.5.orig/export/ffmpeg_cfg.c ++++ transcode-1.1.5/export/ffmpeg_cfg.c +@@ -34,8 +34,6 @@ int lavc_param_vme = 4; + //int lavc_param_vqscale = 0; + //int lavc_param_vqmin = 2; + //int lavc_param_vqmax = 31; +-int lavc_param_mb_qmin = 2; +-int lavc_param_mb_qmax = 31; + int lavc_param_lmin = 2; + int lavc_param_lmax = 31; + int lavc_param_vqdiff = 3; +@@ -140,8 +138,6 @@ TCConfigEntry lavcopts_conf[]={ + // {"vqscale", &lavc_param_vqscale, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31}, + // {"vqmin", &lavc_param_vqmin, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31}, + // {"vqmax", &lavc_param_vqmax, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31}, +- {"mbqmin", &lavc_param_mb_qmin, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31}, +- {"mbqmax", &lavc_param_mb_qmax, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31}, + {"lmin", &lavc_param_lmin, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0}, + {"lmax", &lavc_param_lmax, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0}, + {"vqdiff", &lavc_param_vqdiff, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31}, +Index: transcode-1.1.5/export/ffmpeg_cfg.h +=================================================================== +--- transcode-1.1.5.orig/export/ffmpeg_cfg.h ++++ transcode-1.1.5/export/ffmpeg_cfg.h +@@ -13,8 +13,6 @@ extern int lavc_param_vme; + //extern int lavc_param_vqscale; + //extern int lavc_param_vqmin; + //extern int lavc_param_vqmax; +-extern int lavc_param_mb_qmin; +-extern int lavc_param_mb_qmax; + extern int lavc_param_lmin; + extern int lavc_param_lmax; + extern int lavc_param_vqdiff; -- cgit v1.2.3-54-g00ecf