VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. Hello, I have a long list of H.264/AAC .MP4 video files that I need to cut, resize and save back to H.264 as well as Xvid formats. However, I've yet to find a practical solution.

    I originally started with Avidemux, which was simple to use and seemed to have everything I needed, but it had a serious sync problem with all of my videos. Avidemux would import the video as out of sync, so encode settings had nothing to do with it. Offsetting the audio wouldn't work either, as it starts in sync then gradually goes out of sync, then goes back in sync by the time the video ends.

    So next I tried AviSynth and MeGUI. MeGUI seems to require a separate file for the audio stream, if not, loading the same source video as the audio stream definitely wasn't working for me. So I thought I'd skip MeGUI and just use the command line encoders with AviSynth. However, no matter what I do I can't seem to get AviSynth to load the audio stream when I play the avs. All of the source audio streams are AAC, and apparently there is no ACM codec for ACC, so I'm not sure if what I'm trying to do is even possible. I do have the FFDShow Direct Show AAC decoder installed, and here is the script that I've been using:
    DirectShowSource("C:\test.mp4", audio=true)
    Trim(0,2254)
    Crop(4,12,-4,0).Spline36Resize(848,480)
    ConvertToYV12()
    I also tried variations with "video=" and "audio=" each pointing to the same file, as well as including "fps=25, convertfps=true) # adjust fps if necessary", but with the same result.

    I've tried mencoder with a front end, YAMF, but to use the trim feature I have to set the container to AVI, and even when I do it doesn't encode any frames, just makes an empty container. I've also tried virtualdub with very bad results.

    So basically, I'm looking for any advice that can either help me with any of the above problems, or suggestions for other alternatives. Also any method that doesn't involve splitting audio and video is preferred, as that would significantly cost me a lot more time, as I have a lot of videos to edit/convert. Plus I already had issues with that as well, if I remux the MP4 to an MKV, then extract the audio stream to a raw AAC, there's a lot of blank space on the track and encoders don't seem to like it.

    Any information is helpful, thank you in advance.
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Maybe latest videoredo preview would be something to test. Not free though.
    Quote Quote  
  3. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by Norio View Post
    However, no matter what I do I can't seem to get AviSynth to load the audio stream when I play the avs. All of the source audio streams are AAC, and apparently there is no ACM codec for ACC, so I'm not sure if what I'm trying to do is even possible. I do have the FFDShow Direct Show AAC decoder installed, and here is the script that I've been using:
    DirectShowSource("C:\test.mp4", audio=true)
    Trim(0,2254)
    Crop(4,12,-4,0).Spline36Resize(848,480)
    ConvertToYV12()
    I also tried variations with "video=" and "audio=" each pointing to the same file, as well as including "fps=25, convertfps=true) # adjust fps if necessary", but with the same result.
    What is that result, exactly? Do you get an error message from Avisynth, or simply missing, silent, or out-of sync audio?

    DirectShowSource uses only DirectShow codecs, so ACM is irrelevant.
    Do you have an mp4 file splitter installed?
    Quote Quote  
  4. Originally Posted by Baldrick View Post
    Maybe latest videoredo preview would be something to test. Not free though.
    It's worth giving try, I'd rather avoid anything that isn't freeware so for now I'll keep it as a last result. Thanks for the tip.

    Originally Posted by Gavino View Post
    What is that result, exactly? Do you get an error message from Avisynth, or simply missing, silent, or out-of sync audio?

    DirectShowSource uses only DirectShow codecs, so ACM is irrelevant.
    Do you have an mp4 file splitter installed?
    The audio is simply missing, no message in WMP. MPC however, gives me the log shown in the attachment, then proceeds to play without the audio.

    I'm using Haali Media Splitter as my mp4 splitter.
    Image Attached Files
    Quote Quote  
  5. What happens when you render the .mp4 in graphstudio? do the pins connect?

    You can avoid all the directshow issues by using another source filter, like ffmpegsource2

    http://code.google.com/p/ffmpegsource/

    FFMpegSource2("test.mp4",atrack=-1)
    Quote Quote  
  6. Originally Posted by poisondeathray View Post
    What happens when you render the .mp4 in graphstudio? do the pins connect?

    You can avoid all the directshow issues by using another source filter, like ffmpegsource2

    http://code.google.com/p/ffmpegsource/

    FFMpegSource2("test.mp4",atrack=-1)
    Thanks, I managed to find my problem when rendering it in graphstudio, lol.
    Microsoft was still set as the default DirectShow filter for AAC for some reason. So I changed it to FFDShow in Win7DSFilterTweaker and the audio works now with my script.

    EDIT:
    Is there no way to encode with x264 and keep the audio stream? I can get my scripts to play in WMP with the audio now, but when I encode them in x264 I'm back to having no audio.
    Last edited by Norio; 1st May 2010 at 17:00.
    Quote Quote  



Similar Threads

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