Browse Source

ffmpeg in its own script

Bob Mottram 8 years ago
parent
commit
850615e1d3
No account linked to committer's email
2 changed files with 53 additions and 21 deletions
  1. 0
    21
      src/freedombone-app-tox
  2. 53
    0
      src/freedombone-utils-ffmpeg

+ 0
- 21
src/freedombone-app-tox View File

@@ -48,26 +48,6 @@ TOXIC_FILE=/usr/local/bin/toxic
48 48
 
49 49
 QTOX_REPO="https://github.com/bashrc/qTox"
50 50
 QTOX_COMMIT='27a628a3789fca4f31516c3982e580052dd3c773'
51
-FFMPEG_VERSION=3.1.2
52
-
53
-function mesh_install_ffmpeg
54
-{
55
-    chroot "${rootdir}" apt-get -y remove ffmpeg libav-tools
56
-    chroot "${rootdir}" apt-get -y install build-essential
57
-    chroot "${rootdir}" apt-get -y install --reinstall libmp3lame-dev libvorbis-dev libtheora-dev libspeex-dev yasm pkg-config libopenjpeg-dev libx264-dev mjpegtools libmjpegtools-dev
58
-    mkdir -p ${rootdir}$INSTALL_DIR/ffmpeg-release
59
-    cd ${rootdir}$INSTALL_DIR
60
-    wget http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2
61
-    tar xvjf ffmpeg-${FFMPEG_VERSION}.tar.bz2
62
-    chroot ${rootdir} /bin/bash -x <<EOF
63
-cd ${INSTALL_DIR}/ffmpeg-${FFMPEG_VERSION}
64
-./configure --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libspeex --enable-shared --enable-pthreads --enable-libopenjpeg --enable-ffplay --enable-encoder=mjpeg --enable-decoder=mjpeg --enable-muxer=mjpeg
65
-make
66
-make install
67
-EOF
68
-    chroot "${rootdir}" apt-get install libav-tools
69
-    chroot "${rootdir}" ldconfig
70
-}
71 51
 
72 52
 function mesh_tox_qtox {
73 53
     if [ ! ${rootdir}$INSTALL_DIR ]; then
@@ -80,7 +60,6 @@ function mesh_tox_qtox {
80 60
 
81 61
     chroot "${rootdir}" apt-get -y install build-essential libatk1.0-0 libbz2-1.0 libc6 libcairo2 libdbus-1-3 libegl1-mesa libfontconfig1 libfreetype6 libgcc1 libgdk-pixbuf2.0-0 libgl1-mesa-glx libglib2.0-0 libgtk2.0-0 libice6 libicu52 libjpeg62-turbo libmng1 libmtdev1 libopenal1 libopus0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpng12-0 libqrencode3 libsm6 libsodium13 libsqlite3-0 libssl1.0.0 libstdc++6 libtiff5 libudev1 libvpx1 libwayland-client0 libwayland-cursor0 libwayland-egl1-mesa libwebp5 libx11-6 libx11-xcb1 libxcb-glx0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcb-xinerama0 libxcb1 libxext6 libxfixes3 libxi6 libxrender1 libxss1 zlib1g libopus-dev libvpx-dev
82 62
     chroot "${rootdir}" apt-get -y install build-essential qt5-qmake qt5-default qttools5-dev-tools libqt5opengl5-dev libqt5svg5-dev libopenal-dev libxss-dev qrencode libqrencode-dev libglib2.0-dev libgdk-pixbuf2.0-dev libgtk2.0-dev libsqlcipher-dev libopus-dev libvpx-dev libavformat-dev libavdevice-dev libswscale-dev libavutil-dev libavcodec-dev libavcodec56 libavcodec57 libavfilter-dev libavfilter6
83
-    #chroot "${rootdir}" apt-get -y install --force-yes tox-ffmpeg-dev
84 63
 
85 64
     mesh_install_ffmpeg
86 65
 

+ 53
- 0
src/freedombone-utils-ffmpeg View File

@@ -0,0 +1,53 @@
1
+#!/bin/bash
2
+#
3
+# .---.                  .              .
4
+# |                      |              |
5
+# |--- .--. .-.  .-.  .-.|  .-. .--.--. |.-.  .-. .--.  .-.
6
+# |    |   (.-' (.-' (   | (   )|  |  | |   )(   )|  | (.-'
7
+# '    '     --'  --'  -' -  -' '  '   -' -'   -' '   -  --'
8
+#
9
+#                    Freedom in the Cloud
10
+#
11
+# ffmpeg functions
12
+#
13
+# License
14
+# =======
15
+#
16
+# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to>
17
+#
18
+# This program is free software: you can redistribute it and/or modify
19
+# it under the terms of the GNU Affero General Public License as published by
20
+# the Free Software Foundation, either version 3 of the License, or
21
+# (at your option) any later version.
22
+#
23
+# This program is distributed in the hope that it will be useful,
24
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
25
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26
+# GNU Affero General Public License for more details.
27
+#
28
+# You should have received a copy of the GNU Affero General Public License
29
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
30
+
31
+FFMPEG_VERSION=3.1.2
32
+
33
+function mesh_install_ffmpeg
34
+{
35
+    chroot "${rootdir}" apt-get -y remove ffmpeg libav-tools
36
+    chroot "${rootdir}" apt-get -y install build-essential
37
+    chroot "${rootdir}" apt-get -y install --reinstall libmp3lame-dev libvorbis-dev libtheora-dev libspeex-dev yasm pkg-config libopenjpeg-dev libx264-dev mjpegtools libmjpegtools-dev
38
+    mkdir -p ${rootdir}$INSTALL_DIR/ffmpeg-release
39
+    cd ${rootdir}$INSTALL_DIR
40
+    wget http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2
41
+    tar xvjf ffmpeg-${FFMPEG_VERSION}.tar.bz2
42
+    chroot ${rootdir} /bin/bash -x <<EOF
43
+cd ${INSTALL_DIR}/ffmpeg-${FFMPEG_VERSION}
44
+./configure --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libspeex --enable-shared --enable-pthreads --enable-libopenjpeg --enable-ffplay --enable-encoder=mjpeg --enable-decoder=mjpeg --enable-muxer=mjpeg
45
+make
46
+make install
47
+EOF
48
+    chroot "${rootdir}" apt-get install libav-tools
49
+    chroot "${rootdir}" ldconfig
50
+}
51
+
52
+
53
+# NOTE: deliberately there is no "exit 0"