VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or try DVDFab and copy, convert Blu-ray and DVDs! :)
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Hi!
    I want to generate a silent audio track with the same duration of a video.
    The solution should work for every video file.
    I have tried
    Code:
    ffmpeg.exe -i input1.mkv -f lavfi -i anullsrc -vn -c:a flac -shortest silence.flac
    
    ffmpeg.exe -f lavfi -i anullsrc=channel_layout=5.1(side):sample_rate=48000 -i input1.mkv -vn -c:a flac -shortest silence.flac
    
    ffmpeg.exe -f lavfi -i anullsrc=channel_layout=5.1:sample_rate=48000 -i input1.mkv -vn -c:a flac -shortest silence.flac
    
    ffmpeg.exe -f lavfi -i anullsrc=channel_layout=5.1:sample_rate=48000 -i input1.mkv -shortest -vn -c:a flac silence.flac
    
    ffmpeg.exe -f lavfi -i anullsrc=r=48000:cl=1 -i input1.mkv -shortest -vn -c:a flac silence.flac
    None worked.
    It always creates either a flac with audio in it, or a silent track which duration is longer than the video (I stop the process because it would continue producing silence), it ignores the -shortest flag...

    What am I doing wrong?
    Thanks.
    Quote Quote  
  2. Since you are discarding the video -shortest is the length of the generated audio. Output video and audio to an MKV file then extract the audio.
    Quote Quote  
  3. Thank you for your reply!
    Then what should I do so that the video part is as small as possible, so the process is quite quick and resulting file is as small as possible?
    something like creating a continuous blank frame...
    Quote Quote  



Similar Threads