Rephrasing the requirement. We have an audio pipeline which redacts the audios using the set of start time and end time provided from our ML team. To achieve this, we execute the ffmpeg command with filter "volume=enable='between(t,starttime,endtime)':volume=0". For some cases, we are receiving audio files with codecs which are causing the outputs to have large file sizes. One such example is below, ffprobe and ffmpeg output of the file is attached to the mail. *command:* ffmpeg -i call.wav -af "volume=enable='between(t,0,1)':volume=0" output.wav *behaviour: *executed within a second, input file size 2.1 mb, output file size 176 mb
As we can see here, the output file size is 88 times the original. The objective here is to achieve the output file size of less than 2-3 times the original without reducing the sound quality. I went through the documentation but couldn't find any suitable way to fix it. Let me know if anyone knows the issue in my command. Please point me to some resource containing the details of audio codecs and filtering. Regards, Shubham On Wed, Apr 20, 2022 at 11:33 PM Shubham Tiwari <[email protected]> wrote: > Thanks Bouke for the opinion. > Help from any other person is appreciated!! > > Regards, > Shubham > > On Wed, Apr 20, 2022 at 11:27 PM Bouke / edit 'B <[email protected]> wrote: > >> >> >> > On 20 Apr 2022, at 19:50, Shubham Tiwari <[email protected]> >> wrote: >> > >> > 1 million audio files per day. >> >> Hire a specialist. Now. Immediately. Pay him / her well. Do NOT hesitate. >> Do NOT think, just do it. Right now. >> It WILL pay off. >> Did I mention you DO NOT HAVE time to waste? >> >> >> Bouke / edit 'B >> >> videotoolshed.com >> Van Oldenbarneveltstraat 33 >> 6512 AS Nijmegen, the Netherlands >> +31 6 21817248 >> If you want to send me large files, please use: >> https://videotoolshed.wetransfer.com/ < >> https://videotoolshed.wetransfer.com/> >> >> >> >> >> _______________________________________________ >> ffmpeg-user mailing list >> [email protected] >> https://ffmpeg.org/mailman/listinfo/ffmpeg-user >> >> To unsubscribe, visit link above, or email >> [email protected] with subject "unsubscribe". >> >
~/Downloads/ffprobe -i call.wav ffprobe version 4.4.1-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2007-2021 the FFmpeg developers built with Apple clang version 11.0.0 (clang-1100.0.33.17) configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Input #0, ogg, from 'call.wav': Duration: 00:15:36.90, start: 0.000000, bitrate: 19 kb/s Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp ------------------------------------------------------------------------------------------------------------------------------------------------------ With WAV output ~/Downloads/ffmpeg -i call.wav -af "volume=enable='between(t,0,1)':volume=0" output.wav ffmpeg version 4.4.1-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers built with Apple clang version 11.0.0 (clang-1100.0.33.17) configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Input #0, ogg, from 'call.wav': Duration: 00:15:36.90, start: 0.000000, bitrate: 19 kb/s Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp Stream mapping: Stream #0:0 -> #0:0 (opus (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help Output #0, wav, to 'output.wav': Metadata: ISFT : Lavf58.76.100 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s Metadata: encoder : Lavc58.134.100 pcm_s16le [opus @ 0x7f78d8009800] Error parsing the packet header.peed= 609x Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. Error while decoding stream #0:0: Invalid data found when processing input [opus @ 0x7f78d8009800] Error parsing the packet header. [opus @ 0x7f78d8009800] Too many errors when draining, this is a bug. Stop draining and force EOF. Error while decoding stream #0:0: Internal bug, should not have happened size= 175668kB time=00:15:36.87 bitrate=1536.0kbits/s speed= 608x video:0kB audio:175667kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000043% in-shtiwari@in-shtiwari temp % du -sh call.wav 2.1M call.wav in-shtiwari@in-shtiwari temp % du -sh output.wav 176M output.wav
_______________________________________________ ffmpeg-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
