Looking to edit a blip out of the beginning of a video/audio file:
How can I use
ffmpeg
to only edit the first two seconds of the clip so that there's no longer that blip in the audio?How do I ensure that all 7 audio tracks are affected by the audio filter?
How do I ensure that all 7 are also present in my output file in the same input specs?
Complete output:
ffmpeg -i ~/Downloads/in.mov -vcodec copy -acodec pcm_s24le -q:a 0 -af "volume=enable='between(t,0,3)':volume=0" ~/Downloads/out2.mov
ffmpeg version 2.6.1 Copyright (c) 2000-2015 the FFmpeg developers
built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Guessed Channel Layout for Input Stream #0.1 : mono
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Guessed Channel Layout for Input Stream #0.4 : mono
Guessed Channel Layout for Input Stream #0.5 : mono
Guessed Channel Layout for Input Stream #0.6 : mono
Guessed Channel Layout for Input Stream #0.7 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '~/Downloads/in.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2014-01-16 18:02:27
Duration: 00:00:06.44, start: 0.000000, bitrate: 119128 kb/s
Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709), 1920x1080, 109843 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 2997 tbn, 2997 tbc (default)
Metadata:
creation_time : 2014-01-16 18:02:27
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 (HQ)
timecode : 01:00:00;00
Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2014-01-16 18:02:27
handler_name : Apple Alias Data Handler
Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2014-01-16 18:02:27
handler_name : Apple Alias Data Handler
Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2014-01-16 18:02:27
handler_name : Apple Alias Data Handler
Stream #0:4(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2014-01-16 18:02:27
handler_name : Apple Alias Data Handler
Stream #0:5(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2014-01-16 18:02:27
handler_name : Apple Alias Data Handler
Stream #0:6(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2014-01-16 18:02:27
handler_name : Apple Alias Data Handler
Stream #0:7(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 2 channels, s32 (24 bit), 2304 kb/s (default)
Metadata:
creation_time : 2014-01-16 18:02:27
handler_name : Apple Alias Data Handler
Stream #0:8(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
Metadata:
creation_time : 2014-01-16 18:02:28
handler_name : Apple Alias Data Handler
timecode : 01:00:00;00
File '~/Downloads/out2.mov' already exists. Overwrite ? [y/N] y
Output #0, mov, to '~/Downloads/out2.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
encoder : Lavf56.25.101
Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 109843 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 2997 tbc (default)
Metadata:
creation_time : 2014-01-16 18:02:27
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 (HQ)
timecode : 01:00:00;00
Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
Metadata:
creation_time : 2014-01-16 18:02:27
handler_name : Apple Alias Data Handler
encoder : Lavc56.26.100 pcm_s24le
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:7 -> #0:1 (pcm_s24le (native) -> pcm_s24le (native))
Press [q] to stop, [?] for help
frame= 193 fps=109 q=-1.0 Lsize= 88166kB time=00:00:06.43 bitrate=112155.7kbits/s
video:86349kB audio:1811kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.006946%
-acodec copy
at the same time.ffmpeg -i ~/Downloads/in.mov -vcodec copy -af "volume=volume='between(t,0,3)':volume=0" ~/Downloads/out2.mov
ffmpeg
.0:7
). Do you want to include the rest? They are just being ignored. The output is being encoded as AAC. Do you want that, or do you want it to be the same as the input? Also, your filtering command should probably look like:volume=enable='between(t,0,3)':volume=0
.