You are not logged in.

#1 2007-05-10 10:40:01

cubo
Member
From: Slovakia
Registered: 2007-02-03
Posts: 25

dvd ripping - theora + ogg

hi,
how can i rip dvd's  and encode videos to ogm /ogg/ using theora /or  h(x)264/?

I've tried "dvdrip/transcode", "(g)mencoder" but there's no option to use this codec's.
Thoggen done this job but is very slow and the output file has bad aspect ratio and i don't know how to change this and at all has few options.

So how can i add/enable ogg/theora... work with dvdrip/gmencoder (transcode/mencoder)?

thanks

Offline

#2 2007-05-10 11:27:35

smoon
Member
Registered: 2005-08-22
Posts: 468
Website

Re: dvd ripping - theora + ogg

Handbrake should work fine for H.264. It is pretty fast and there are some PKGBUILDs in AUR.

Offline

#3 2007-05-10 12:10:17

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: dvd ripping - theora + ogg

A definitive source of information on encoding, codecs, and front-ends is:

http://forum.doom9.org/

Offline

#4 2007-05-10 12:34:42

thepizzaking
Member
From: Melbourne, Victoria, Australia
Registered: 2006-03-13
Posts: 46

Re: dvd ripping - theora + ogg

I usually rip the video files to separate .mpeg files without transcoding them, then I use 'ffmpeg2theora' to convert them to an ogg theora/vorbis file.

Offline

#5 2007-05-10 12:54:29

cubo
Member
From: Slovakia
Registered: 2007-02-03
Posts: 25

Re: dvd ripping - theora + ogg

thanks .. handbrake is great. /fast (the fastest for me), simple and easy to use ... doing the job/

what about theora support?
.. because i have read /not once/ "the best" choice is ogm=theora + vorbis and the second x264 ... /but i'm going to study doom9, because i haven't done it yet, for the final conclusion/

and one more question:

what do you use for transcoding your videos?

THANK you, guys!!!

Offline

#6 2007-05-10 15:15:06

cubo
Member
From: Slovakia
Registered: 2007-02-03
Posts: 25

Re: dvd ripping - theora + ogg

when building mplayer (mplayer-svn from unstable, http://bugs.archlinux.org/task/7002?histring=mplayer) I've got the same error:

In file included from avformat.h:36,
                 from allformats.c:21:
../libavcodec/avcodec.h:2505: warning: 'ImgReSampleContext' is deprecated
../libavcodec/avcodec.h:2511: warning: 'ImgReSampleContext' is deprecated
In file included from allformats.c:21:
avformat.h:295: warning: 'AVFrac' is deprecated
allformats.c: In function 'av_register_all':
allformats.c:168: error: 'ENABLE_FILE_PROTOCOL' undeclared (first use in this function)
allformats.c:168: error: (Each undeclared identifier is reported only once
allformats.c:168: error: for each function it appears in.)
allformats.c:169: error: 'ENABLE_HTTP_PROTOCOL' undeclared (first use in this function)
allformats.c:170: error: 'ENABLE_PIPE_PROTOCOL' undeclared (first use in this function)
allformats.c:171: error: 'ENABLE_RTP_PROTOCOL' undeclared (first use in this function)
allformats.c:172: error: 'ENABLE_TCP_PROTOCOL' undeclared (first use in this function)
allformats.c:173: error: 'ENABLE_UDP_PROTOCOL' undeclared (first use in this function)
make[1]: *** [allformats.o] Error 1
make[1]: Leaving directory `/home/cubo/Desktop/mplayer-svn/src/mplayer-build/libavformat'
make: *** [libavformat/libavformat.a] Error 2
==> ERROR: Build Failed.  Aborting...

The error appears with unchanged PKGBUILD /with modified too - I want to try x264 and dvdnav support)

Where is the problem? Any idea?

Offline

#7 2007-05-10 18:51:48

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: dvd ripping - theora + ogg

First off, to get MPlayer-SVN running, use the PKGBUILD from post #4:

http://bbs.archlinux.org/viewtopic.php?id=28231

You will have to add x264 to the LDFLAGS line. The x264-SVN PKGBUILD from the same post works flawlessly. Upgrade x264 frequently; It's always getting better (currently 655).

With that being said, I think your MPlayer error is just a subversion break. If you add the LDFLAGS line to the current MPlayer PKGBUILD, it will compile fine with x264.

FFMPEG is always a good option also.

Last edited by skottish (2007-05-10 18:52:30)

Offline

#8 2007-05-11 17:52:59

cubo
Member
From: Slovakia
Registered: 2007-02-03
Posts: 25

Re: dvd ripping - theora + ogg

skottish wrote:

First off, to get MPlayer-SVN running, use the PKGBUILD from post #4:



You will have to add x264 to the LDFLAGS line. The x264-SVN PKGBUILD from the same post works flawlessly. Upgrade x264 frequently; It's always getting better (currently 655).

With that being said, I think your MPlayer error is just a subversion break. If you add the LDFLAGS line to the current MPlayer PKGBUILD, it will compile fine with x264.

FFMPEG is always a good option also.

I have tried to compile mplayer (with x264 support (and dvdnav too)) using PKGBUILDs from extra/mplayer, extra/mplayer-svn and  http://bbs.archlinux.org/viewtopic.php?id=28231 ; using x264, x264-svn, x264-svn /from the link and svn version 655/. I have been modificating PKGBUILDs and trying to compile mplayer but with no results. Only errors...

Error(s) of the last attempt:

stream/stream.a(stream_dvdnav.o): In function `seek':
stream_dvdnav.c:(.text+0xc3): undefined reference to `dvdnav_sector_search'
stream_dvdnav.c:(.text+0xd3): undefined reference to `dvdnav_err_to_string'
stream/stream.a(stream_dvdnav.o): In function `stream_dvdnav_close':
stream_dvdnav.c:(.text+0x151): undefined reference to `dvdnav_close'
stream/stream.a(stream_dvdnav.o): In function `control':
stream_dvdnav.c:(.text+0x1db): undefined reference to `dvdnav_current_title_info'
stream_dvdnav.c:(.text+0x1f6): undefined reference to `dvdnav_get_number_of_parts'
stream_dvdnav.c:(.text+0x22f): undefined reference to `dvdnav_current_title_info'
stream_dvdnav.c:(.text+0x24e): undefined reference to `dvdnav_part_play'
stream_dvdnav.c:(.text+0x27b): undefined reference to `dvdnav_current_title_info'
stream/stream.a(stream_dvdnav.o): In function `dvdnav_number_of_subs':
stream_dvdnav.c:(.text+0x2eb): undefined reference to `dvdnav_get_spu_logical_stream'
stream/stream.a(stream_dvdnav.o): In function `dvdnav_lang_from_sid':
stream_dvdnav.c:(.text+0x335): undefined reference to `dvdnav_get_spu_logical_stream'
stream_dvdnav.c:(.text+0x346): undefined reference to `dvdnav_spu_stream_to_lang'
stream/stream.a(stream_dvdnav.o): In function `dvdnav_sid_from_lang':
stream_dvdnav.c:(.text+0x3ee): undefined reference to `dvdnav_get_spu_logical_stream'
stream_dvdnav.c:(.text+0x404): undefined reference to `dvdnav_spu_stream_to_lang'
stream/stream.a(stream_dvdnav.o): In function `dvdnav_lang_from_aid':
stream_dvdnav.c:(.text+0x465): undefined reference to `dvdnav_get_audio_logical_stream'
stream_dvdnav.c:(.text+0x47a): undefined reference to `dvdnav_audio_stream_to_lang'
stream/stream.a(stream_dvdnav.o): In function `mp_dvdnav_update_mouse_pos':
stream_dvdnav.c:(.text+0x4d8): undefined reference to `dvdnav_get_current_nav_pci'
stream_dvdnav.c:(.text+0x4f0): undefined reference to `dvdnav_mouse_select'
stream_dvdnav.c:(.text+0x52c): undefined reference to `dvdnav_get_current_highlight'
stream/stream.a(stream_dvdnav.o): In function `mp_dvdnav_handle_input':
stream_dvdnav.c:(.text+0x564): undefined reference to `dvdnav_get_current_nav_pci'
stream_dvdnav.c:(.text+0x5c3): undefined reference to `dvdnav_upper_button_select'
stream_dvdnav.c:(.text+0x5d8): undefined reference to `dvdnav_get_current_highlight'
stream_dvdnav.c:(.text+0x5f6): undefined reference to `dvdnav_mouse_activate'
stream_dvdnav.c:(.text+0x620): undefined reference to `dvdnav_current_title_info'
stream_dvdnav.c:(.text+0x638): undefined reference to `dvdnav_menu_call'
stream_dvdnav.c:(.text+0x651): undefined reference to `dvdnav_menu_call'
stream_dvdnav.c:(.text+0x66a): undefined reference to `dvdnav_menu_call'
stream_dvdnav.c:(.text+0x686): undefined reference to `dvdnav_button_activate'
stream_dvdnav.c:(.text+0x6ad): undefined reference to `dvdnav_menu_call'
stream_dvdnav.c:(.text+0x6c0): undefined reference to `dvdnav_right_button_select'
stream_dvdnav.c:(.text+0x6d3): undefined reference to `dvdnav_left_button_select'
stream_dvdnav.c:(.text+0x6e6): undefined reference to `dvdnav_lower_button_select'
stream/stream.a(stream_dvdnav.o): In function `open_s':
stream_dvdnav.c:(.text+0x754): undefined reference to `dvdnav_open'
stream_dvdnav.c:(.text+0x7c8): undefined reference to `dvdnav_get_next_block'
stream_dvdnav.c:(.text+0x7ea): undefined reference to `dvdnav_sector_search'
stream_dvdnav.c:(.text+0x7fc): undefined reference to `dvdnav_set_readahead_flag'
stream_dvdnav.c:(.text+0x80e): undefined reference to `dvdnav_set_PGC_positioning_flag'
stream_dvdnav.c:(.text+0x844): undefined reference to `dvdnav_get_title_string'
stream_dvdnav.c:(.text+0x884): undefined reference to `dvdnav_title_play'
stream_dvdnav.c:(.text+0x8ab): undefined reference to `dvdnav_part_play'
stream_dvdnav.c:(.text+0x8c3): undefined reference to `dvdnav_angle_change'
stream_dvdnav.c:(.text+0x932): undefined reference to `dvdnav_get_position'
stream_dvdnav.c:(.text+0x9a3): undefined reference to `dvdnav_err_to_string'
stream_dvdnav.c:(.text+0xa23): undefined reference to `dvdnav_menu_call'
stream_dvdnav.c:(.text+0xa3a): undefined reference to `dvdnav_menu_call'
stream_dvdnav.c:(.text+0xaa3): undefined reference to `dvdnav_err_to_string'
stream/stream.a(stream_dvdnav.o): In function `fill_buffer':
stream_dvdnav.c:(.text+0xb4f): undefined reference to `dvdnav_get_next_block'
stream_dvdnav.c:(.text+0xb62): undefined reference to `dvdnav_err_to_string'
stream_dvdnav.c:(.text+0xbf0): undefined reference to `dvdnav_get_current_nav_pci'
stream_dvdnav.c:(.text+0xc0b): undefined reference to `dvdnav_get_current_highlight'
stream_dvdnav.c:(.text+0xcc6): undefined reference to `dvdnav_get_position'
stream_dvdnav.c:(.text+0xcfe): undefined reference to `dvdnav_current_title_info'
stream_dvdnav.c:(.text+0xd4e): undefined reference to `dvdnav_current_title_info'
stream_dvdnav.c:(.text+0xd9b): undefined reference to `dvdnav_get_current_nav_pci'
stream_dvdnav.c:(.text+0xdc2): undefined reference to `dvdnav_get_current_highlight'
stream_dvdnav.c:(.text+0xf53): undefined reference to `dvdnav_get_position'
stream_dvdnav.c:(.text+0xffa): undefined reference to `dvdnav_wait_skip'
stream_dvdnav.c:(.text+0x10b7): undefined reference to `dvdnav_still_skip'
libavcodec/libavcodec.a(faac.o): In function `Faac_encode_close':
faac.c:(.text+0x34): undefined reference to `faacEncClose'
libavcodec/libavcodec.a(faac.o): In function `Faac_encode_frame':
faac.c:(.text+0x86): undefined reference to `faacEncEncode'
libavcodec/libavcodec.a(faac.o): In function `Faac_encode_init':
faac.c:(.text+0xeb): undefined reference to `faacEncOpen'
faac.c:(.text+0xf5): undefined reference to `faacEncGetCurrentConfiguration'
faac.c:(.text+0x149): undefined reference to `faacEncClose'
faac.c:(.text+0x1f6): undefined reference to `faacEncSetConfiguration'
faac.c:(.text+0x25a): undefined reference to `faacEncGetDecoderSpecificInfo'
faac.c:(.text+0x2f5): undefined reference to `faacEncClose'
libavcodec/libavcodec.a(x264.o): In function `X264_close':
x264.c:(.text+0x1b): undefined reference to `x264_encoder_close'
libavcodec/libavcodec.a(x264.o): In function `X264_init':
x264.c:(.text+0x45): undefined reference to `x264_param_default'
x264.c:(.text+0x3cb): undefined reference to `x264_encoder_open'
x264.c:(.text+0x50a): undefined reference to `x264_encoder_headers'
x264.c:(.text+0x5b7): undefined reference to `x264_nal_encode'
libavcodec/libavcodec.a(x264.o): In function `X264_frame':
x264.c:(.text+0x6f2): undefined reference to `x264_encoder_encode'
x264.c:(.text+0x756): undefined reference to `x264_nal_encode'
collect2: ld returned 1 exit status
make: *** [mplayer] Error 1

from used PKGBUILD:

LDFLAGS="-lfaac -ltheora -lx264"

any idea???

THANKS & sorry for bad english!

Offline

#9 2007-05-11 23:49:45

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: dvd ripping - theora + ogg

I just rebuilt MPlayer using the version from ABS (so current) with the only modification to the PKGBUILD is this before './configure':

LDFLAGS="-lfaac -ltheora -lx264" ./configure...

And it compiles perfectly, dvdnav and all. I'm clueless to where your breakage is coming from.

Oh yeah, I'm using the x264-SVN PKGBUILD (using versionpkg) unmodified from the post I linked to.

Last edited by skottish (2007-05-11 23:51:56)

Offline

#10 2007-05-12 10:16:03

mic64
Member
Registered: 2005-03-03
Posts: 173

Re: dvd ripping - theora + ogg

skottish

could you provide your working svns?
I tried all those suggested LD flags etc.but gpac, mplayer  can´t be builded.
They exit with errors.

Offline

#11 2007-05-12 18:13:59

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: dvd ripping - theora + ogg

I didn't bother to update md5sums on anything that I upgraded. I'm on 64 bit, so you may want to grab the PKGBUILDs and supporting files from AUR, ABS, or the above link. Also, I didn't write any of these PKGBUILDs, so the credit goes to the author listed on top.

You'll want to update YASM to 0.6 for x264:

# Contributor: Vinay S Shastry <vinayshastry@gmail.com>
pkgname=yasm
pkgver=0.6.0
pkgrel=1
pkgdesc="Yasm is a complete rewrite of the NASM assembler designed from the ground up to allow for multiple assembler syntaxes to be supported (eg, NASM, TASM, GAS, etc.)"
url="http://www.tortall.net/projects/yasm/"
depends=('glibc')
source=(http://www.tortall.net/projects/yasm/releases/$pkgname-$pkgver.tar.gz)
#md5sums=('d4931fcce497bd4f80ed349384704240')
options=('NOLIBTOOL')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr
  make || return 1
  make DESTDIR=$startdir/pkg install
}

Use the GPAC build from AUR for 32 bit, or the one from the link above for 64 bit. Warning: Osmo4 will not build correctly against wxgtk-2.8. If it's important to you, the CVS version will.

Use versionpkg to build x264. The --enable-pic line is important for 64 bit. I believe that it's useless for 32 bit:

# Contributor: damir <damir@archlinux.org>
pkgname=x264-svn
pkgver=655
pkgrel=1
pkgdesc="free library for encoding H264/AVC video streams"
url="http://developers.videolan.org/x264.html"
arch=(i686 x86_64)
conflicts=('x264')
provides=('x264')
depends=('libx11')
makedepends=('subversion' 'nasm')
options=(NOLIBTOOL)

_svntrunk=svn://svn.videolan.org/x264/trunk
_svnmod=x264

build() {
  cd $startdir/src

  svn co $_svntrunk $_svnmod -r $pkgver

  cd $_svnmod
  export CFLAGS="$CFLAGS -O3 -ffast-math -fomit-frame-pointer -ftree-vectorize"
  ./configure --prefix=/usr \
    --enable-pthread \
    --enable-visualize \
    --enable-shared \
    --enable-pic \
    --enable-mp4-output \
    --extra-cflags="${CFLAGS}" \
  make || return 1
  make DESTDIR=${startdir}/pkg install
}

The PKGBUILD I used for MPlayer is the official build with a few modifications. Use ABS to get all the supporting files:

# $Id: PKGBUILD,v 1.8 2007/04/08 07:30:25 tpowa Exp $
# Maintainer: dorphell <dorphell@archlinux.org>
pkgname=mplayer
pkgver=1.0rc1
pkgrel=5
pkgdesc="A movie player for linux"
arch=(i686 x86_64)
depends=('libxxf86dga' 'libxv' 'libmad' 'libungif' 'cdparanoia' 'gtk2'\
         'codecs' 'sdl' 'lame' 'libtheora' 'ttf-bitstream-vera' 'xvidcore'\
         'libgl' 'smbclient' 'aalib' 'dbus-glib' 'jack-audio-connection-kit')
makedepends=('lirc-utils' 'libcaca' 'unzip')
backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
source=(ftp://ftp.mplayerhq.hu/MPlayer/releases/MPlayer-${pkgver}.tar.bz2 \
        ftp://ftp1.mplayerhq.hu/MPlayer/skins/Blue-1.7.tar.bz2 \
        mplayer-lirc-libdl.diff aalib-configure.patch \
        MPlayer-1.0rc1-gnome-screensaver.patch \
        http://www.3gpp.org/ftp/Specs/archive/2 … 04-510.zip \
        http://www.3gpp.org/ftp/Specs/archive/2 … 04-510.zip \
        http://www.mplayerhq.hu/MPlayer/patches … 61231.diff
    dmo.patch)
install=$pkgname.install
url="http://www.mplayerhq.hu/"

build() {
  cd $startdir/src/MPlayer-${pkgver}

  # Custom CFLAGS break the mplayer build
  unset CFLAGS

  # Fix potential buffer overflow
  patch -p0 -i ../asmrules_fix_20061231.diff || return 1
  # fix dmo vulnerability
  patch -Np1 -i ../dmo.patch || return 1
  # Make lirc-utils dependency optional
  [ "$CARCH" = "x86_64" ] &&  sed -i -e "s/(CFLAGS) -llirc_client/(CFLAGS) -fPIC -llirc_client/" ../mplayer-lirc-libdl.diff
  patch -p1 -i ../mplayer-lirc-libdl.diff || return 1
  # Fix aalib
  patch -p1 -i ../aalib-configure.patch || return 1
  # Add support for gnome screensaver
  patch -p1 -i ../MPlayer-1.0rc1-gnome-screensaver.patch || return 1

  # Add support for AMR codecs (3gp videos)
  mkdir libavcodec/amr_float libavcodec/amrwb_float
  cd libavcodec/amr_float
  unzip -q ${startdir}/src/26104-510_ANSI_C_source_code.zip
  cd ../amrwb_float
  unzip -q ${startdir}/src/26204-510_ANSI-C_source_code.zip
 
  cd $startdir/src/MPlayer-${pkgver}

  # i686 extra options
  [ "$CARCH" = "i686" ] && EXTRAOPTS="--with-win32libdir=/usr/lib/win32"

  LDFLAGS="-lfaac -ltheora -lx264" ./configure --prefix=/usr --enable-gui --disable-arts --enable-x11 \
      --enable-runtime-cpudetection --enable-sdl \
      --enable-theora --confdir=/etc/mplayer \
      --enable-xvid --enable-gl --enable-tv-v4l1 --enable-tv-v4l2 --enable-largefiles \
      --disable-liblzo --disable-speex --disable-openal --disable-faac \
      --enable-smb --enable-aa --disable-fribidi --disable-libdv --disable-musepack \
      --language=all --enable-lirc --enable-dvdnav --disable-esd $EXTRAOPTS

  [ "$CARCH" = "i686" ] &&  sed 's|-march=i486|-march=i686|g' -i config.mak

  make || return 1
  make DESTDIR=${startdir}/pkg install
  cp etc/{codecs.conf,input.conf,example.conf} ${startdir}/pkg/etc/mplayer/
  ln -s /usr/share/fonts/TTF/Vera.ttf ${startdir}/pkg/usr/share/mplayer/subfont.ttf
  rm -rf ${startdir}/pkg/usr/share/mplayer/font
  mv ${startdir}/src/Blue ${startdir}/pkg/usr/share/mplayer/skins/default
}
md5sums=('18c05d88e22c3b815a43ca8d7152ccdc' 'e4e2020d11b681aac898103b3ba723c4'\
         'fda186b412a76695338a17e673b96cc4' 'fa8cd2a04b994a5d74bec60f6efd59e4'\
         'a5f3a87cff594f9ed69a3453f5630bec' '9b575d01f94f50dd4dcf570cd8a14dda'\
         '607a14d090898ffb0f72c1aa6aa6ce31' 'f0b71c38b1207c1d604be091876ac051'\
         '86b7dc64d7d21b241bbff32b423dcc12')

My version of FFMPEG is a little strange. It comes with two files, a generic PKGBUILD, and a script for pulling down the sources. It will build a copy from subversion and name it after todays date.

Save this is "original_PKGBUILD":

# $Id: PKGBUILD,v 1.23 2007/02/01 04:25:00 paul Exp $
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Maintainer: Paul Mattal <paul@archlinux.org>

pkgname=ffmpeg
pkgver=00000000
pkgrel=1
pkgdesc="FFMpeg is a complete and free Internet live audio and video broadcasting solution for Linux/Unix"
arch=(i686 x86_64)
depends=('lame' 'sdl' 'libvorbis' 'a52dec' 'faad2' 'faac' 'libdts' 'xvidcore' 'zlib' 'imlib2')
source=()

url="http://ffmpeg.mplayerhq.hu/"

build() {
     cd $startdir/src/$pkgname || return 1


     # configure
     ./configure \
          --prefix=/usr \
          --log \
          --enable-gpl \
          --enable-libmp3lame \
          --enable-libogg \
          --enable-libvorbis \
          --enable-pp \
          --enable-libfaac \
          --enable-libfaad \
          --enable-liba52 \
          --enable-xvid \
          --enable-libdts \
          --enable-pp \
          --enable-shared \
          --enable-x264 \
          --enable-pthreads \
       || return 1

     # build
     make -j 2 || return 1

     # install
     mkdir -p $startdir/pkg/usr/{bin,include,lib} || return 1
     make DESTDIR=$startdir/pkg install || return 1
}

Save this as "build_ffmpeg_subversion.sh", and make it executable.

cp ./original_PKGBUILD ./PKGBUILD

sed -i "1,6 s/pkgver=00000000/pkgver=`date +%Y%m%d`/" ./PKGBUILD

mkdir src

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

mv ffmpeg ./src

makepkg

Offline

#12 2007-05-12 18:32:06

mic64
Member
Registered: 2005-03-03
Posts: 173

Re: dvd ripping - theora + ogg

thanks

but those look exactly like mine and they don´t work here.
And the mplayer is just the RC.

Offline

#13 2007-05-12 18:44:05

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: dvd ripping - theora + ogg

I stopped using MPlayer from subversion because it was introducing too many new problems. The RC works well for me, so there is no need for me to use subversion. I use FFMPEG, x264, and GPAC, for all of my encoding.

Last edited by skottish (2007-05-12 18:44:19)

Offline

Board footer

Powered by FluxBB