0

I'm trying to add a video and audio fade in and fade out to my video using the fade and afade filters. I'm using the following command:

ffmpeg -i trimmed.mp4 -vf 'fade=in:0:60,fade=out:2940:300' -af 'afade=in:st=0:d=1,afade=out:st=53:d=2' -c:a aac -c:v libx264 -crf 18 -preset veryfast fadeInOut.mp4

The resulting audio sound like TV static was overlayed. I've tried specifying audio quality by adding -b:a 128k, but that didn't help either. Any ideas what might be wrong?

Here's the output of ffmpeg -i if that's helpful:

  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: 
isomiso2avc1mp41
    encoder         : Lavf58.20.10
0
  Duration: 00:00:54.54, start: 0.000000
, bitrate: 9964 kb/s
    Stream #0:
0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 9589 kb/s, 
60 fps, 60 tbr, 
15360 tbn, 
120 tbc
 (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:
1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 364 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
  • 2
    You removed the most important info, ffmpeg version. – Paul B. Mahol Apr 10 at 15:04
  • @PaulB.Mahol Whoops, here it is: ffmpeg version 4.1.1 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8.2.1 (GCC) 20190212 – NetherGranite Apr 11 at 12:07
  • What you use to play output audio? – Paul B. Mahol Apr 11 at 20:50
  • @PaulB.Mahol Oh shoot good point, it might be my player's fault. I'm using VLC. I also just tested it with Windows's Photos app, and the same still happens. – NetherGranite Apr 12 at 2:51
  • I'm out of ideas, I can not reproduce this. Perhaps your input have edit lists? How it was created? – Paul B. Mahol Apr 12 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.