Package Details: untrunc-git r142.e02f40e-1

Git Clone URL: https://aur.archlinux.org/untrunc-git.git (read-only, click to copy)
Package Base: untrunc-git
Description: restore a damaged (truncated) mp4, m4v, mov, 3gp video
Upstream URL: https://github.com/ponchio/untrunc
Licenses: GPL2
Submitter: jose1711
Maintainer: jose1711
Last Packager: jose1711
Votes: 23
Popularity: 0.95
First Submitted: 2015-03-10 14:30 (UTC)
Last Updated: 2021-02-19 15:41 (UTC)

Latest Comments

1 2 3 Next › Last »

Qwerty-Space commented on 2023-01-09 22:04 (UTC)

Please update the PKGBUILD to the one below:


# Maintainer: Jose Riha <jose1711 gmail com>
# Contributor: archdaemon
# Contributor: sekret

pkgname=untrunc-git
pkgver=r142.e02f40e
pkgrel=1
libav_version=12.3
pkgdesc="restore a damaged (truncated) mp4, m4v, mov, 3gp video"
arch=('x86_64' 'i686')
url="https://github.com/ponchio/untrunc"
license=('GPL2')
depends=('libvdpau' 'zlib' 'bzip2')
makedepends=('yasm' 'git' 'libx11')
source=("${pkgname}"::'git+https://github.com/ponchio/untrunc.git'
        'framealloc.patch'
    "https://github.com/libav/libav/archive/v${libav_version}.zip")
md5sums=('SKIP'
         '7f6cf1762cd93f4ce84cb218ab856ea3'
         '6ba5f8731b64704cfeb34bfa4f3f6cea')
noextract=("v${libav_version}.zip")

prepare() {
  cd $srcdir/$pkgname
  unzip ../v${libav_version}.zip
}

build() {
  cd $srcdir/$pkgname
  git submodule init
  git submodule update
  # patch -p1 -i $srcdir/framealloc.patch
  # wget http://libav.org/releases/libav-${libav_version}.tar.xz
  cd libav-"${libav_version}"
  ./configure
  make
  cd ..
  g++ -o untrunc -I./libav-${libav_version} file.cpp main.cpp track.cpp atom.cpp codec_*.cpp codecstats.cpp codec.cpp mp4.cpp log.cpp -L./libav-${libav_version}/libavformat -lavformat -L./libav-${libav_version}/libavcodec -lavcodec -L./libav-${libav_version}/libavresample -lavresample -L./libav-${libav_version}/libavutil -lavutil -lpthread -lz -lbz2 -llzma -lX11 -lvdpau -ldl
} 

pkgver() {
  cd "$srcdir/${pkgname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  install -Dm755 $srcdir/$pkgname/untrunc $pkgdir/usr/bin/untrunc
}

Qwerty-Space commented on 2023-01-09 21:38 (UTC)

libav.org no longer resolves, as a result this package cannot be built.

jose1711 commented on 2021-02-19 15:44 (UTC)

@Nitsuga thank you, PKGBUILD is now updated.

agusdallalba commented on 2021-02-19 11:10 (UTC)

It's necessary to update libav to v12.3 and use this to compile:

g++ -o untrunc -I./libav-12.3 file.cpp main.cpp track.cpp atom.cpp mp4.cpp codec_*.cpp codecstats.cpp codec.cpp mp4.cpp log.cpp -L./libav-12.3/libavformat -lavformat -L./libav-12.3/libavcodec -lavcodec -L./libav-12.3/libavresample -lavresample -L./libav-12.3/libavutil -lavutil -lpthread -lz -lbz2 -llzma -lX11 -lvdpau -ldl

Perhaps it would be more reasonable to switch to untrunc-anthwlock-cli-git since it works with the system ffmpeg and has a makefile.

sekret commented on 2018-05-10 11:28 (UTC)

Oh, thanks! :-) No need to do that, but I'm honored!

jose1711 commented on 2018-05-10 11:03 (UTC)

@sekret thank you for thorough testing, i have added you to contributors

sekret commented on 2018-05-10 09:55 (UTC) (edited on 2018-05-10 09:57 (UTC) by sekret)

Please also add libx11 to makedepends and add libvdpau, zlib and bzip2 to depends. Here's why:

After adding git the build failed with those lines:

... In file included from mp4.cpp:30: ./libav-12.2/libavformat/avformat.h:712:21: note: declared here AVCodecContext *codec; ^~~~~ /usr/bin/ld: cannot find -lX11 /usr/bin/ld: cannot find -lvdpau collect2: error: ld returned 1 exit status ==> ERROR: A failure occurred in build(). Aborting...

(I build in a clean chroot)

So I added libx11 and libvdpau to makedepends. The package built fine, but namcap says

Checking untrunc-git-r58.ec8e417-2-x86_64.pkg.tar untrunc-git E: Dependency bzip2 detected and not included (libraries ['usr/lib/libbz2.so.1.0'] needed in files ['usr/bin/untrunc']) untrunc-git E: Dependency zlib detected and not included (libraries ['usr/lib/libz.so.1'] needed in files ['usr/bin/untrunc']) untrunc-git E: Dependency libvdpau detected and not included (libraries ['usr/lib/libvdpau.so.1'] needed in files ['usr/bin/untrunc'])

After adjusting all that stuff I compiled again, now everything seems perfect :-)

sekret commented on 2018-05-10 08:26 (UTC)

Please add git to makedepends

jose1711 commented on 2018-05-09 21:09 (UTC) (edited on 2018-05-09 21:11 (UTC) by jose1711)

@danboid i was able to build it without both packages now so i removed both dependencies. thanks for sharing, j

danboid commented on 2018-05-05 13:35 (UTC)

Why does this PKGBUILD depend upon qt5-base and qconf? AFAIK untrunc is a CLI only app with no (Qt) UI or dependency.