OSDN Git Service

[Qt][OPENGL][GL4.5] Tuning around "TV Renderer".
[csp-qt/common_source_project-fm7.git] / source / README.ffmpeg.txt
1 Build Common Source Code Project (CSP) with FFMPEG.
2                                               August 09, 2016 K.Ohta
3                                  <whatisthis.sowhat _at_ gmail.com>
4  
5 1. Background
6   Now, emu{foo} (for Qt) have implemented saving screen and sound as movie.
7   This using libav (a.k.a. FFMpeg).
8   But, this has different versions some distributions, because FFMpeg
9   has often changing major version (THIS IS VERY EVIL (#゜Д゜)).
10   For example, in Debian sid built with 3.1.1, in Ubuntu 16.04 LTS with 2.8.6 .
11   So, distributed binaries must be built with fixed version of FFMpeg.
12   
13   Note:
14    For Windows, shared libs are not managed by distribution, you don't
15    need below (or needs below).
16    
17 2. Install ffmpeg and CSP (if you don't have or have only FFMpeg 3).
18   a. Install libx264 and libfaac with development files (at least).
19   b. Download source code of ffmpeg-2.8.7 (or another version) from mirrors.
20   c. Extract this any folder.
21   d. Run:
22      $ cd ffmpeg-{version}
23      $ ./coinfigure --prefix=/usr/local/ffmpeg-{version} \
24         --disable-static --enable-shared --enable-gpl \
25         --enable-libx264 --enable-libmp3lame
26         (and enabling another options)
27   e. Build and install
28     $ make
29     $ sudo make install
30     $ cd /usr/local/ffmpeg-{version}
31     $ cd lib/
32     $ sudo cp lib*.so.* /usr/local/lib/{arch}/
33     $ sudo ldconfig
34     
35   f. Edit source/build-cmake/buildvars.dat of CSP, set below lines:
36      CMAKE_APPENDFLAG="-DLIBAV_ROOT_DIR=/usr/local/ffmpeg-{version}"
37      CMAKE_APPENDFLAG="${CMAKE_APPENDFLAG} -DUSE_MOVIE_SAVER=ON -DUSE_MOVIE_LOADER=ON"
38   
39   e. Cleanup building directories, must remove {foo}/build .
40   f. run config_build.sh to build and install CSP.
41   
42   Have fun,
43   Ohta.
44   
45