pepoとネットワークを語ろう

40年前からこれまでとこれからのネットワークを語る

ffmpegをgitからfree版を構築してみたよ(^o^)丿

2012-06-08 05:36:48 | くじら伝説

http://dag.wieers.comのffmpegはどうもnofreeのパッケージなため自前でfree版のffmpegをgitから構築してみたよ

まずはgitでcloneを作成
[root@fedora15 src]# git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg

Cloning into ffmpeg...
remote: Counting objects: 227275, done.
remote: Compressing objects: 100% (52649/52649), done.

[root@fedora15 src]# cd ffmpeg/
[root@fedora15 ffmpeg]# ls
COPYING.GPLv2 Makefile ffmpeg.c libpostproc
COPYING.GPLv3 README ffplay.c library.mak
COPYING.LGPLv2.1 RELEASE ffprobe.c libswresample
COPYING.LGPLv3 arch.mak ffserver.c libswscale
CREDITS cmdutils.c libavcodec mt-work
Changelog cmdutils.h libavdevice presets
Doxyfile cmdutils_common_opts.h libavfilter tests
INSTALL common.mak libavformat tools
LICENSE configure libavresample version.sh
MAINTAINERS doc libavutil
[root@fedora15 ffmpeg]#

[root@fedora15 ffmpeg]# ./configure --extra-version=20120603-pepo --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-shared --enable-swscale --disable-doc
[root@fedora15 ffmpeg]# make
[root@fedora15 ffmpeg]# make install

でインストールできたffmpegのライセンスを表示させると
[root@~]# ffmpeg -L

ffmpeg version 0.10.2.git-20120603-pepo Copyright (c) 2000-2012 the FFmpeg developers
built on Jun 3 2012 19:41:10 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
configuration: --extra-version=20120603-pepo --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-shared --enable-swscale --disable-doc
libavutil 51. 56.100 / 51. 56.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.101 / 54. 6.101
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
ffmpeg is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

ffmpeg is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with ffmpeg; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
[root@~]#

fmpeg is free software; you can redistribute it and/or modify
でfree版が出来ましたとさOK!
 

pepo


ffmpegのライセンスについて注意!

2012-06-03 05:35:22 | Linux

[root@ ~]# wget http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

[root@ ~]# rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm

[root@ ~]# rm rpmforge-release-0.3.6-1.el5.rf.i386.rpm 

[root@ ~]# yum --enablerepo=rpmforge install -y ffmpeg

とffmpegをhttp://dag.wieers.comからインストールしてUSBカメラのキャプチャが出来た見たいだけれど

googleさま曰くffmpegのライセンスにはfree版とそうで無いものがあるようなのだ

http://dag.wieers.com/ からインストールしたものはnofreeのものがあり
[root@~]# ffmpeg -L >log 2>&1
で取得したlogからTherefore it is not legally redistributable. とあるので配布できない

FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 23:56:18 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
This version of FFmpeg has nonfree parts compiled in.
Therefore it is not legally redistributable.
危ない危ない 

別のマシンのubuntuではGPL2でよいとの事で、さすがubuntu

FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1.3, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5.1-1ubuntu1.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Dec 21 2011 18:37:21, gcc: 4.4.3
FFmpeg is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

FFmpeg is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FFmpeg; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

 pepo


PepoLinuxへffmpegをインストールしてみたよん

2012-06-02 21:53:24 | Linux

ここを参考にPepoLinuxへffmpegをインストールしてみた
[root@ ~]# wget http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

[root@ ~]# rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm

[root@ ~]# rm rpmforge-release-0.3.6-1.el5.rf.i386.rpm 

[root@ ~]# yum --enablerepo=rpmforge install -y ffmpeg

でもってUSBカメラを接続

[root@ ~]# tail /var/log/messages
Jun 2 21:26:57 (none) kernel: usb 1-1: USB disconnect, device number 3
Jun 2 21:27:06 (none) kernel: usb 1-1: new high-speed USB device number 4 using ehci_hcd
Jun 2 21:27:06 (none) kernel: usb 1-1: New USB device found, idVendor=056e, idProduct=700a
Jun 2 21:27:06 (none) kernel: usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jun 2 21:27:06 (none) kernel: usb 1-1: Product: Venus USB2.0 Camera
Jun 2 21:27:06 (none) kernel: usb 1-1: Manufacturer: Vimicro Corp.
Jun 2 21:27:06 (none) kernel: uvcvideo: Found UVC 1.00 device Venus USB2.0 Camera (056e:700a)
Jun 2 21:27:06 (none) kernel: input: Venus USB2.0 Camera as /devices/pci0000:00/0000:00:11.0/0000:02:04.0/usb1/1-1/1-1:1.0/input/input5

ログからカメラを認識したところで画像をjpegモードでゲット

[root@ ~]# ffmpeg  -f video4linux2 -s 640x480 -i /dev/video0 -y test.jpeg

ちなみに

[root@ ~]# ffmpeg -t 5 -f video4linux2 -s 640x480 -i /dev/video0 -y test.mpeg

とやればmpegファイルも取得できる

pepo