ffmpeg
Per estrarre la traccia suono da un video HD postato in YouTube (e scaricato con youtube-dl), niente di più facile:
- prima si analizza il video
francesco@serverHP:~$ ffmpeg -i Halcyon.mp4 ffmpeg version 0.7.13, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 13 2012 14:14:09 with gcc 4.4.5 configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g ' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac --disable-decoder=libdirac --enable-libfreetype --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --extra-libs=-lgcrypt --disable-altivec --disable-armv5te --disable-armv6 --disable-vis libavutil 50. 43. 0 / 50. 43. 0 libavcodec 52.123. 0 / 52.123. 0 libavformat 52.111. 0 / 52.111. 0 libavdevice 52. 5. 0 / 52. 5. 0 libavfilter 1. 80. 0 / 1. 80. 0 libswscale 0. 14. 1 / 0. 14. 1 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 0 codec frame rate differs from container frame rate: 59.83 (29917/500) -> 29.92 (359/12) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Halcyon.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2011-06-18 17:54:45 Duration: 00:11:10.37, start: 0.000000, bitrate: 1636 kb/s Stream #0.0(und): Video: h264 (High), yuv420p, 1440x1080, 1478 kb/s, 29.97 fps, 29.92 tbr, 1k tbn, 59.83 tbc Metadata: creation_time : 1970-01-01 00:00:00 Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 151 kb/s Metadata: creation_time : 2011-06-18 17:54:47 At least one output file must be specified
- e poi si estrae la traccia Flac (questo vuol dire aac in Stream #0.1, credo):
francesco@serverHP:~$ ffmpeg -i Halcyon.mp4 Halcyon.flac ffmpeg version 0.7.13, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 13 2012 14:14:09 with gcc 4.4.5 configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g ' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac --disable-decoder=libdirac --enable-libfreetype --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --extra-libs=-lgcrypt --disable-altivec --disable-armv5te --disable-armv6 --disable-vis libavutil 50. 43. 0 / 50. 43. 0 libavcodec 52.123. 0 / 52.123. 0 libavformat 52.111. 0 / 52.111. 0 libavdevice 52. 5. 0 / 52. 5. 0 libavfilter 1. 80. 0 / 1. 80. 0 libswscale 0. 14. 1 / 0. 14. 1 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 0 codec frame rate differs from container frame rate: 59.83 (29917/500) -> 29.92 (359/12) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Halcyon.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2011-06-18 17:54:45 Duration: 00:11:10.37, start: 0.000000, bitrate: 1636 kb/s Stream #0.0(und): Video: h264 (High), yuv420p, 1440x1080, 1478 kb/s, 29.97 fps, 29.92 tbr, 1k tbn, 59.83 tbc Metadata: creation_time : 1970-01-01 00:00:00 Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 151 kb/s Metadata: creation_time : 2011-06-18 17:54:47 Output #0, flac, to 'Halcyon.flac': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2011-06-18 17:54:45 encoder : Lavf52.111.0 Stream #0.0(und): Audio: flac, 44100 Hz, stereo, s16, 64 kb/s Metadata: creation_time : 2011-06-18 17:54:47 Stream mapping: Stream #0.1 -> #0.0 Press [q] to stop, [?] for help size= 71337kB time=00:11:10.40 bitrate= 871.7kbits/s video:0kB audio:71329kB global headers:0kB muxing overhead 0.011443%
In questo modo non abbiamo perso nulla della qualità originaria. Certo, i files che risultano non sono proprio leggeri:
francesco@serverHP:~$ ll | grep Halcyon -rw-r--r-- 1 francesco francesco 70M 8 juil. 15:38 Halcyon.flac -rw-r--r-- 1 francesco francesco 131M 19 juin 2011 Halcyon.mp4 -rw-r--r-- 1 francesco francesco 60M 8 juil. 15:39 Halcyon_on_on.flac -rw-r--r-- 1 francesco francesco 145M 26 févr. 2009 Halcyon_on_on.mp4
ffmpeg.txt · Last modified: 2012/07/08 15:47 by admin