learn-video / mosaic-video

Generate mosaics from video inputs
Apache License 2.0
35 stars 6 forks source link

Extract audio only when mosaic is set to have audio support #1

Closed mauricioabreu closed 9 months ago

mauricioabreu commented 9 months ago

Currently, every mosaic configuration is retrieved from the following struct:

Mosaic struct {
    Name      string  `json:"name"`
    Medias    []Media `json:"medias"`
    WithAudio bool    `json:"with_audio"`
}

WithAudio field should be respected while firing the ffmpeg command.

rafiramadhana commented 9 months ago

WithAudio field should be respected while firing the ffmpeg command.

is this related to ffmpeg's -an flag?

ref: https://superuser.com/a/268986

PS. sry I haven't used ffmpeg before

mauricioabreu commented 9 months ago

@rafiramadhana I think the part of the command you are talking about is another option. For the command we are currently using, I guess we need to remove the "-map", "1:a",