VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Well, i got a bunch of MP4 (x.264/acc) videos of like 2-30 min duration each, all durations vary...
    So, i now decided to demux the audio tracks from these MP4 vids and mux them with my friends songs instead. So i'll have songs converted to AAC, but shit, each song takes its duration that doesn't match with the video durations....

    Is there some way or tool to mux MP4 with AAC audio which would cut the audio stream off when video stream ends? Most likely it's not an easy to understand, what i wrote, heh...
    Imagine, i have a song of 5 min and a video of 3 min. If i mux the MP4 this way, i'll get MP4 with video of 3 min duration, and then when video ends it will play another 2 minutes of audio (without video)...
    How can i automate the work to pick video file and audio file to mux them into 3 min MP4, without the need of loading the audio track into editor to crop it to 3 minutes manually for each video clip?

    Also, is there a tool to batch mux a lot of MP4s so i won't end up spending a lot of time by doing hundred of videos by hands?

    Thanks in advance
    Quote Quote  
  2. OK, i have found a way to batch remove audio stream and add new one by using .bat file with a command line for Mp4Box:

    Code:
    for %%a in (*.mp4) do "C:\Path\to\Your\Copy\Of\MP4Box.exe" -add "%%a:fps=23.976043" -add "%%~na.aac" -rem "2" "C:\Your\Output\Folder\%%~na.mp4"
    Question:
    what to do to match audio length to video length?
    Quote Quote  
  3. Member bat999's Avatar
    Join Date
    Feb 2008
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by spycam View Post
    Is there some way or tool to mux MP4 with AAC audio which would cut the audio stream off when video stream ends? ...
    Imagine, i have a song of 5 min and a video of 3 min.
    I could do this job using FFmpeg.

    With a video named "video.mp4".
    And a new (longer) soundtrack named "soundtrack.m4a".

    Remove the old soundtrack from the video.
    Like this:-
    Code:
    ffmpeg -i video.mp4 -vcodec copy -an silent_video.mp4
    Then add new soundtrack using "-shortest".
    Like this:-
    Code:
    ffmpeg -i silent_video.mp4 -i soundtrack.m4a -shortest -vcodec copy -acodec copy new_video.mp4
    But maybe somebody else knows a quicker way...
    Quote Quote  
  4. can song be named "song.aac"?
    Quote Quote  



Similar Threads

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