VideoHelp Forum




+ Reply to Thread
Results 1 to 10 of 10
  1. Hi but sorry, I'm a cat

    Please I wonder: supposing I have to generate a .wav file using ffmpeg in witch the video duration have to be of the input video file (.avs) taked to ffmpeg. And if there is a difference in the lenght of duration between video and audio source... the final .wav have to be exactly the same of the video duration

    for example my video source is input.avs (of 50 seconds) meanwhile my audio source is C0010.MP4 (of 35 seconds)

    I need that ffmpeg encode a .wav file so that the total lenght duration is 50 seconds, putting the audio part (source is C0010.MP4) in the first 35 second of the final output, and silence from 35 to 50 seconds

    How can I do? thanks
    Quote Quote  
  2. really my target is tell to ffmpeg that

    if audio source lenght is lower than video.. please fill the gap with silence
    if audio source is over lenght the than video .. please cut the audio to fit the video lenght
    Quote Quote  
  3. Member
    Join Date
    Aug 2014
    Location
    India
    Search Comp PM
    Use with apad and shortest

    Code:
    ffmpeg -i input.avs -i C0010.MP4 -map 0:v -map 1:a -af apad -shortest output.mp4
    I've left out the audio and video encoding parameters.
    Quote Quote  
  4. ahn ok but I need to generate a audio-only file output .wav and not a mp4 but now I try thanks
    Quote Quote  
  5. Why don't you do it in AviSynth? Just load both video and audio and add Trim(0, 0) at the end.
    Quote Quote  
  6. but I cannot alwais extract audio correctly

    and alwais I cannot extract audio in batch mode (

    https://forum.videohelp.com/threads/377488-avisynth-error-attempted-to-cat-request-does-not-exist-!
    Quote Quote  
  7. However I prefer the ffmpeg way: we can suppose to have a video file VIDEOsource.MP4 that have duration of 50 seconds and a

    AUDIOsource1.MP4 that is video/audio file of 30 seconds
    and
    AUDIOsource2.MP4 that is video/audio file of 70 seconds

    I would like use ffmpeg so that the final output is a .WAV file based on the video lengt (50 seconds)

    so

    if the AUDIOsource1.MP4 is the audio source ---> the output .wav have to be of 50 second (30second of audio + 20 of silence)
    if the AUDIOsource2.MP4 is the audio source ---> the output .wav have to be of 50 second (the first 50 seconds, and rest cutted)
    Last edited by marcorocchini; 17th Mar 2016 at 15:32.
    Quote Quote  
  8. Name:  ohmy7.jpg
Views: 4795
Size:  10.6 KB

    I have try to put the output as .wav (instead of .mp4) but don't work

    Code:
    ffmpeg.exe  -y -i  VIDEOsource.MP4 -i AUDIOsourceX.MP4 -map 0:v -map 1:a -vcodec mjpeg -shortest -af apad -c:a pcm_s16le marco3.avi
    seems almost ok!

    this commandline adjust the audio part based on the video lenght

    but only I need to output in .wav (and not mp4 or avi)
    Last edited by marcorocchini; 17th Mar 2016 at 15:33.
    Quote Quote  
  9. Code:
    ffmpeg.exe  -y -i  VIDEOsource.MP4 -i AUDIOsourceX.MP4 -map 0:v -map 1:a -vcodec mjpeg -shortest -af apad -c:a pcm_s16le marco3.wav
    don't work because of this

    Click image for larger version

Name:	err5.jpg
Views:	694
Size:	456.2 KB
ID:	36214
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!