Debian Lenny AMD64 + ffmpeg-git http://www.adminsehow.com/2009/07/how-to-install-ffmpeg-on-debian-lenny-from-svn/ http://ubuntuforums.org/showpost.php?p=9114176&postcount=967 http://paulrouget.com/e/converttohtml5video/ http://howto-pages.org/ffmpeg/ http://www.encoding.com/advanced_configuration_options_for_the_libx264_video_codec http://www.webmproject.org/tools/encoder-parameters/ http://h264.code-shop.com/trac/wiki/Encoding https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox 1) pridani repa : wget http://www.debian-multimedia.org/pool/main/d/debian-multimedia-keyring/debian-multimedia-keyring_2008.10.16_all.deb dpkg -i debian-multimedia-keyring_2008.10.16_all.deb deb http://www.debian-multimedia.org lenny main deb-src http://www.debian-multimedia.org lenny main 2) istalace zakladnich balicku : apt-get install checkinstall yasm git-core subversion apt-get build-dep ffmpeg 3) x264 / libx264 git clone git://git.videolan.org/x264.git cd x264 ./configure --enable-shared --extra-cflags='-Wall -g -fPIC -DPIC' make checkinstall --pkgname=x264 --pkgversion "git`date +%Y%m%d`" --backup=no --default dpkg -i x264_git20110929-1_amd64.deb 4) libtheora wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz tar xzvf libtheora-1.1.1.tar.gz cd libtheora-1.1.1 ./configure make checkinstall --pkgname=libtheora --pkgversion "1.1.1" --backup=no --default dpkg -i libtheora_1.1.1-1_amd64.deb 5) rtmpdump wget -c http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.3.tgz tar xvfz rtmpdump-2.3.tgz cd rtmpdump-2.3 make sys=linux checkinstall --pkgname=rtmpdump --pkgversion "2.3" --backup=no --default dpkg -i rtmpdump_2.3-1_amd64.deb 6) libvpx (kdyz se pouziji cflasgs, tak se nezakompiluje do balicku include - potrebne devel knihovny) wget -c http://webm.googlecode.com/files/libvpx-v0.9.7-p1.tar.bz2 ./configure --enable-vp8 --extra-cflags='-Wall -g -fPIC -DPIC' make checkinstall --pkgname=libvpx --pkgversion "0.9.7p1" --backup=no --default dpkg -i libvpx_0.9.7p1-1_amd64.deb 7) opencore-amr cd opencore-amr-0.1.2 ./configure make checkinstall --pkgname=opencore-amr --pkgversion "0.1.2" --backup=no --default dpkg -i opencore-amr_0.1.2-1_amd64.deb 8) ffmpeg wget -c http://ffmpeg.org/releases/ffmpeg-0.8.4.tar.bz2 tar xvfj ffmpeg-0.8.4.tar.bz2 ./configure --enable-libmp3lame --enable-libgsm --enable-libvorbis --enable-libxvid --enable-libfaac --enable-pthreads --enable-libx264 --enable-libvpx --enable-libtheora --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-librtmp --enable-gpl --enable-version3 --enable-runtime-cpudetect --disable-debug --enable-nonfree --extra-cflags='-Wall -g -fPIC -DPIC' install prefix /usr/local source path . C compiler gcc ARCH x86 (generic) big-endian no runtime cpu detection yes yasm yes MMX enabled yes MMX2 enabled yes 3DNow! enabled yes 3DNow! extended enabled yes SSE enabled yes SSSE3 enabled yes AVX enabled yes CMOV enabled yes CMOV is fast yes EBX available yes EBP available yes debug symbols no strip symbols yes optimize for size no optimizations yes static yes shared yes postprocessing support yes new filter support yes network support yes threading support pthreads SDL support yes Sun medialib support no libdxva2 enabled no libva enabled no libvdpau enabled no AVISynth enabled no libcelt enabled no frei0r enabled no libcdio support no libdc1394 support no libdirac enabled no libfaac enabled yes libaacplus enabled no libgsm enabled yes libmp3lame enabled yes libnut enabled no libopencore-amrnb support yes libopencore-amrwb support yes libopencv support no libopenjpeg enabled yes librtmp enabled yes libschroedinger enabled no libspeex enabled no libstagefright-h264 enabled no libtheora enabled yes libvo-aacenc support no libvo-amrwbenc support no libvorbis enabled yes libvpx enabled yes libx264 enabled yes libxavs enabled no libxvid enabled yes openal enabled no zlib enabled yes bzlib enabled no Enabled decoders: aac dnxhd mjpegb aac_latm dpx mlp aasc dsicinaudio mmvideo ac3 dsicinvideo motionpixels adpcm_4xm dvbsub mp1 adpcm_adx dvdsub mp1float adpcm_ct dvvideo mp2 adpcm_ea dxa mp2float adpcm_ea_maxis_xa eac3 mp3 adpcm_ea_r1 eacmv mp3adu adpcm_ea_r2 eamad mp3adufloat adpcm_ea_r3 eatgq mp3float adpcm_ea_xas eatgv mp3on4 adpcm_g722 eatqi mp3on4float adpcm_g726 eightbps mpc7 adpcm_ima_amv eightsvx_exp mpc8 adpcm_ima_dk3 eightsvx_fib mpeg1video adpcm_ima_dk4 eightsvx_raw mpeg2video adpcm_ima_ea_eacs escape124 mpeg4 adpcm_ima_ea_sead ffv1 mpegvideo adpcm_ima_iss ffvhuff msmpeg4v1 adpcm_ima_qt flac msmpeg4v2 adpcm_ima_smjpeg flashsv msmpeg4v3 adpcm_ima_wav flashsv2 msrle adpcm_ima_ws flic msvideo1 adpcm_ms flv mszh adpcm_sbpro_2 fourxm mxpeg adpcm_sbpro_3 fraps nellymoser adpcm_sbpro_4 frwu nuv adpcm_swf g729 pam adpcm_thp gif pbm adpcm_xa gsm pcm_alaw adpcm_yamaha gsm_ms pcm_bluray alac h261 pcm_dvd als h263 pcm_f32be amrnb h263i pcm_f32le amrwb h264 pcm_f64be amv huffyuv pcm_f64le anm idcin pcm_lxf ansi idf pcm_mulaw ape iff_byterun1 pcm_s16be ass iff_ilbm pcm_s16le asv1 imc pcm_s16le_planar asv2 indeo2 pcm_s24be atrac1 indeo3 pcm_s24daud atrac3 indeo5 pcm_s24le aura interplay_dpcm pcm_s32be aura2 interplay_video pcm_s32le avs jpeg2000 pcm_s8 bethsoftvid jpegls pcm_u16be bfi jv pcm_u16le bink kgv1 pcm_u24be binkaudio_dct kmvc pcm_u24le binkaudio_rdft lagarith pcm_u32be bintext libgsm pcm_u32le bmp libgsm_ms pcm_u8 c93 libopencore_amrnb pcm_zork cavs libopencore_amrwb pcx cdgraphics libopenjpeg pgm cinepak libvpx pgmyuv cljr loco pgssub cook mace3 pictor cscd mace6 png cyuv mdec ppm dca mimic prores_lgpl dfa mjpeg ptx qcelp srt vorbis qdm2 sunrast vp3 qdraw svq1 vp5 qpeg svq3 vp6 qtrle targa vp6a r10k theora vp6f r210 thp vp8 ra_144 tiertexseqvideo vqa ra_288 tiff wavpack rawvideo tmv wmapro rl2 truehd wmav1 roq truemotion1 wmav2 roq_dpcm truemotion2 wmavoice rpza truespeech wmv1 rv10 tscc wmv2 rv20 tta wmv3 rv30 twinvq wmv3image rv40 txd wnv1 s302m ulti ws_snd1 sgi v210 xan_dpcm shorten v210x xan_wc3 sipr vb xan_wc4 smackaud vc1 xbin smacker vc1image xl smc vcr1 xsub snow vmdaudio yop sol_dpcm vmdvideo zlib sonic vmnc zmbv sp5x Enabled encoders: a64multi jpegls pcm_u16be a64multi5 libfaac pcm_u16le aac libgsm pcm_u24be ac3 libgsm_ms pcm_u24le ac3_fixed libmp3lame pcm_u32be adpcm_adx libopencore_amrnb pcm_u32le adpcm_g722 libtheora pcm_u8 adpcm_g726 libvorbis pcm_zork adpcm_ima_qt libvpx pcx adpcm_ima_wav libx264 pgm adpcm_ms libxvid pgmyuv adpcm_swf ljpeg png adpcm_yamaha mjpeg ppm alac mp2 qtrle amv mpeg1video ra_144 ass mpeg2video rawvideo asv1 mpeg4 roq asv2 msmpeg4v2 roq_dpcm bmp msmpeg4v3 rv10 dca msvideo1 rv20 dnxhd nellymoser sgi dpx pam snow dvbsub pbm sonic dvdsub pcm_alaw sonic_ls dvvideo pcm_f32be srt eac3 pcm_f32le svq1 ffv1 pcm_f64be targa ffvhuff pcm_f64le tiff flac pcm_mulaw v210 flashsv pcm_s16be vorbis flashsv2 pcm_s16le wmav1 flv pcm_s24be wmav2 gif pcm_s24daud wmv1 h261 pcm_s24le wmv2 h263 pcm_s32be xsub h263p pcm_s32le zlib huffyuv pcm_s8 zmbv jpeg2000 Enabled hwaccels: Enabled parsers: aac dvdsub mpegaudio aac_latm flac mpegvideo ac3 h261 pnm cavsvideo h263 rv30 dca h264 rv40 dirac mjpeg vc1 dnxhd mlp vp3 dvbsub mpeg4video vp8 Enabled demuxers: aac image2pipe pcm_u24le ac3 ingenient pcm_u32be act ipmovie pcm_u32le adf iss pcm_u8 aea iv8 pmp aiff ivf pva amr jv qcp anm latm r3d apc lmlm4 rawvideo ape loas rl2 applehttp lxf rm asf m4v roq ass matroska rpl au microdvd rso avi mjpeg rtp avs mlp rtsp bethsoftvid mm sap bfi mmf sdp bink mov segafilm bintext mp3 shorten bit mpc siff c93 mpc8 smacker caf mpegps sol cavsvideo mpegts sox cdg mpegtsraw spdif daud mpegvideo srt dfa msnwc_tcp str dirac mtv swf dnxhd mvi thp dsicin mxf tiertexseq dts mxg tmv dv nc truehd dxa nsv tta ea nut tty ea_cdata nuv txd eac3 ogg vc1 ffm oma vc1t ffmetadata pcm_alaw vmd filmstrip pcm_f32be voc flac pcm_f32le vqf flic pcm_f64be w64 flv pcm_f64le wav fourxm pcm_mulaw wc3 g722 pcm_s16be wsaud gsm pcm_s16le wsvqa gxf pcm_s24be wtv h261 pcm_s24le wv h263 pcm_s32be xa h264 pcm_s32le xbin idcin pcm_s8 xmv idf pcm_u16be xwma iff pcm_u16le yop image2 pcm_u24be yuv4mpegpipe Enabled muxers: a64 ipod pcm_s16be ac3 ivf pcm_s16le adts latm pcm_s24be aiff m4v pcm_s24le amr matroska pcm_s32be asf matroska_audio pcm_s32le asf_stream md5 pcm_s8 ass microdvd pcm_u16be au mjpeg pcm_u16le avi mlp pcm_u24be avm2 mmf pcm_u24le bit mov pcm_u32be caf mp2 pcm_u32le cavsvideo mp3 pcm_u8 crc mp4 psp daud mpeg1system rawvideo dirac mpeg1vcd rm dnxhd mpeg1video roq dts mpeg2dvd rso dv mpeg2svcd rtp eac3 mpeg2video rtsp ffm mpeg2vob sap ffmetadata mpegts sox filmstrip mpjpeg spdif flac mxf srt flv mxf_d10 swf framecrc null tg2 framemd5 nut tgp g722 ogg truehd gif pcm_alaw vc1t gxf pcm_f32be voc h261 pcm_f32le wav h263 pcm_f64be webm h264 pcm_f64le wtv image2 pcm_mulaw yuv4mpegpipe image2pipe Enabled protocols: applehttp md5 rtmps concat mmsh rtmpt crypto mmst rtmpte file pipe rtp gopher rtmp tcp http rtmpe udp Enabled filters: abuffer drawbox overlay abuffersink fade pad aconvert fieldorder pixdesctest aformat fifo rgbtestsrc amovie format scale anull gradfun select anullsink hflip setdar anullsrc hqdn3d setpts aresample lut setsar ashowinfo lutrgb settb blackframe lutyuv showinfo boxblur movie slicify buffer mp split buffersink mptestsrc testsrc color negate transpose copy noformat unsharp crop null vflip cropdetect nullsink yadif delogo nullsrc Enabled bsfs: aac_adtstoasc mjpeg2jpeg mp3_header_decompress chomp mjpega_dump_header noise dump_extradata mov2textsub remove_extradata h264_mp4toannexb mp3_header_compress text2movsub imx_dump_header Enabled indevs: alsa lavfi v4l2 dv1394 oss x11_grab_device fbdev v4l Enabled outdevs: alsa oss sdl License: nonfree and unredistributable Creating config.mak and config.h... config.asm is unchanged libavutil/avconfig.h is unchanged make checkinstall --pkgname=ffmpeg --pkgversion "0.8.4`date +%Y%m%d`" --backup=no --default dpkg -i ffmpeg_0.8.420110929-1_amd64.deb ffmpeg -version ffmpeg version 0.8.4, Copyright (c) 2000-2011 the FFmpeg developers built on Sep 29 2011 01:36:05 with gcc 4.3.2 configuration: --enable-libmp3lame --enable-libgsm --enable-libvorbis --enable-libxvid --enable-libfaac --enable-pthreads --enable-libx264 --enable-libvpx --enable-libtheora --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-librtmp --enable-gpl --enable-version3 --enable-runtime-cpudetect --disable-debug --enable-nonfree --extra-cflags='-Wall -g -fPIC -DPIC' libavutil 51. 9. 1 / 51. 9. 1 libavcodec 53. 7. 0 / 53. 7. 0 libavformat 53. 4. 0 / 53. 4. 0 libavdevice 53. 1. 1 / 53. 1. 1 libavfilter 2. 23. 0 / 2. 23. 0 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 ffmpeg 0.8.4 libavutil 51. 9. 1 / 51. 9. 1 libavcodec 53. 7. 0 / 53. 7. 0 libavformat 53. 4. 0 / 53. 4. 0 libavdevice 53. 1. 1 / 53. 1. 1 libavfilter 2. 23. 0 / 2. 23. 0 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 Celkem tedy vylezou tyto balíčky (libvpx je 2x, protoze je potreba jedna, nebo více knihoven ziskanych pri kompilaci bez parametru cflags - fPIC, dal jsem to neresil) ffmpeg_0.8.420110929-1_amd64.deb libtheora_1.1.1-1_amd64.deb libvpx_0.9.7p1-1_amd64.deb libvpx_0.9.7p1-nofPIC-1_amd64.deb opencore-amr_0.1.220110928-1_amd64.deb rtmpdump_2.320110928-1_amd64.deb x264_git20110929-1_amd64.deb Automatická konverze videa se zachováním poměru stran. Zjištění aspect ratio : ffmpeg -i video.mpg 2>&1 | sed -e '/DAR/!d; s/^.*DAR \([0-9]*:[0-9]*\).*/\1/' Přímo sranda ve ffmpeg : You could try adding this video filter: -vf "scale=-1:360" -1 in this case means variable / unknown, thus -vf "scale=-1:360" means -vf "scale=variable:360".