[FFmpeg-user] can I compress a video and remove the audio with a single command?

German Geraskin german.geraskin at gmail.com
Thu Mar 16 18:40:42 EET 2023

> > On 16 Mar 2023, at 17:14, Natalia Molinero Mingorance <eng.nataliamolinero at gmail.com> wrote:
> >
> > I'm using it in an Android app, so it's the Android player. If I remove the
> > "-an" and copy the audio, the video is successfully compressed.
> You might learn top posting.
> And you could try toying around yourself / do research.
> Perhaps you app does not like ’no sound’
> Why not do a test with sound as you have it, and set the level to extremely low?
> Or (what I would do) read the specs on what your target eats?
> Bouke

Yes! You are right.
I had a similar problem many years ago (but not with playback).
I solved that problem by adding a blank audio to the output stream (-f
lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000).
But of course the filter option that mutes audio also will work (-af volume=0).

P.S: In general it is weird that the file without audio is not
playable. It is definitely the player bug.

More information about the ffmpeg-user mailing list