• banner-01

Injeksi Null Audio Source dengan FFMPEG ke dalam Video

Table of Contents

  Info

The AsciiDoc format is a useful presentation format in its own right: AsciiDoc markup is simple, intuitive and as such is easily proofed and edited.

Menginjeksi audio kosong (null) ke dalam video yang tidak memiliki audio source. Cara ini saya pergunakan untuk memanipulasi video yang akan saya kirim ke Telegram, agar tidak terbaca menjadi Gif.

Penyelesaian Masalah

Formula ffmpegnya bisa seperti ini.

ffmpeg \
-i original_video.mp4 \
-f lavfi \  (1)
-i anullsrc \  (2)
-c:v copy -c:a aac \
-shortest \
target_video.mp4
1 Format -f gunakan lavfi
2 anullsrc adalah aktor utamanya
anullsrc

The null audio source, return unprocessed audio frames. It is mainly useful as a template and to be employed in analysis / debugging tools, or as the source for filters which ignore the input data (for example the sox synth filter).

 — man ffmpeg-filters

lavfi

Libavfilter input virtual device. This input device reads data from the open output pads of a libavfilter filtergraph.

 — man ffmpeg-devices

Tinggal diimplementasikan sesukanya.

***