VideoHelp Forum
+ Reply to Thread
Results 1 to 19 of 19
Thread
  1. Member
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    I'm looking for a tool that will simply convert the ac-3 audio in an mts file, and convert/output it to a wav file.
    Any utility that can accomplish this task in one step?
    Thanks!
    Quote Quote  
  2. ffmpeg

    Code:
    ffmpeg -i input.mts output.wav
    Quote Quote  
  3. Member
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Thanks for the reply!
    I downloaded this GUI for ffmpeg: https://axiomui.github.io/
    and ran the conversion, but I notice that the new wav file is longer (much less than a frame) but will still cause sync issues. Is that to be expected when using ffmpeg. I just want to get a wav file of the correct length to use in place of the AC-3 in my video editing software.

    Update: I tested the command line directly, and it output exactly the same length as the GUI did, i.e. slightly longer than the original mts file, so same problem
    Last edited by sdsumike619; 7th Feb 2020 at 11:59.
    Quote Quote  
  4. Less than one frame should not make a difference.

    And all types of lossy compressed audio have padding. For ac3 it might be typically ~10-20ms . This extends the total length by that amount

    But sometimes there are muxing delays or offsets that different programs treat slightly differently . Maybe a few ms differences. Generally that won't be an issue. Generally you can't detect <40ms difference, or ~ 1 frame depending on the fps of the video

    But you can use your editor to export a wav from the ac3 directly, that way it should match however the editor is interpreting it
    Last edited by poisondeathray; 7th Feb 2020 at 12:05.
    Quote Quote  
  5. Member
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Unfortunately, the editor is the problem, and the whole reason I need to convert the ac3 to wav audio.
    Quote Quote  
  6. I haven't done it for MTS files before but ordinarily when I want to extract WAV audio from videos I use the free version of AOA Audio Extractor.
    Quote Quote  
  7. You can use audacity or avidemux to convert to WAV , but almost all free / open source programs are using ffmpeg libraries and you're very likely going to get the same result



    If the editor is the problem, consider addressing the problem directly

    Plenty of free NLE's , resolve, shotcut etc... to try
    Quote Quote  
  8. Member
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    The last thing I want to do is have to learn a new editor.. if this offset is always an issue with ffmpeg, then I'll have to look for another tool altogether.
    Quote Quote  
  9. Originally Posted by sdsumike619 View Post
    The last thing I want to do is have to learn a new editor.. if this offset is always an issue with ffmpeg, then I'll have to look for another tool altogether.

    It's actually the problem with AC3 (or any lossy audio) . There will always be some padding regardless of what software you use . I'm assuming that's what this is since it's < 1 frame duration . You can try cutting the padding and syncing it up

    Or you'd have to use another camera or recording that records uncompressed audio natively
    Quote Quote  
  10. Native camera files often have some sort of muxing delay. This is a container +/- muxing delay

    e.g This is a native camera MTS in mediainfo it reports

    Delay relative to video : -80 ms

    That container delay can be interpreted slightly differently in different programs. In some, it might be interpreted as -40ms. Some maybe zero.

    Sometimes that delay is actually required for sync. -80ms is getting pretty large. That's more than 2 frames for NTSC 29.97. If you ignore the delay maybe it goes out of sync in some programs

    But when you "convert" that audio to WAV do you keep that delay or not? A negative audio delay implies audio is longer than video. Do you cut the audio? If you did it would sync up without the delay . Or do you add silence or padding if audio is shorter ? A positive delay usually implies that audio is shorter (but not always) . It entirely depends on how the editor handles the video in the transport stream.




    When you open a native transport stream in an editor, there is timing information the stream that the editor uses to sync everything up. Accessory files in the folder structure also have metadata to span file clips . But the timing can be interpreted slightly differently in different programs. That's why it's the "best" to use that same program - it should use the same interpretations and assumptions for everything

    You can try stream copying the video and encoding the audio instead of audio separately and hope it works better in your editor

    Assuming 16 bit stereo
    Code:
    ffmpeg -i input.mts -c:v copy -c:a pcm_s16le output.mts

    These are separate, additional issues from lossy audio padding mentioned earlier
    Quote Quote  
  11. Member
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Yeah it's getting too complicated. What I really need to do is solve the root problem. It may have something to do with the sound card and drivers; it's really the only wonky thing in the system. It's an older sound card that doesn't have drivers for windows 10 but some searching online turned up some workaround to make it work in windows 10. So it's possible this is creating a problem in this situation.
    Quote Quote  
  12. Originally Posted by sdsumike619 View Post
    Yeah it's getting too complicated. What I really need to do is solve the root problem. It may have something to do with the sound card and drivers; it's really the only wonky thing in the system. It's an older sound card that doesn't have drivers for windows 10 but some searching online turned up some workaround to make it work in windows 10. So it's possible this is creating a problem in this situation.
    But the sound card and/or drivers won't affect the length of the audio. It has nothing to do with what you reported, unless I'm misunderstanding what you're saying

    How are you determining the converted WAV is longer ? I'm assuming you import to your editor and look at the timeline or something like that ? The sound card or drivers won't affect that .
    Quote Quote  
  13. Member
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    oh no sorry, I thought I mentioned the original problem earlier. The problem is that for some reason the video editor program isn't reading AC-3 audio correctly. When you drop it onto the timeline, the volume is much higher than it actually is, and distorts/clips. Only happens inside the program. If I play the same file in VLC, the audio level is correct. I did a clean uninstall of the software, started completely fresh and same issue. So the sound card and its drivers are my last resort.
    Quote Quote  
  14. Member
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    https://we.tl/t-cco0ppYRNF

    Can someone download this mts file, and convert the audio to wav without making any changes to the volume, and post the converted wav file for me? I think I'm going nuts.
    Quote Quote  
  15. As I said earlier:
    Originally Posted by manono View Post
    ...when I want to extract WAV audio from videos I use the free version of AOA Audio Extractor.
    Nothing to learn and would have taken you about 30 seconds, most of that defining the destination.
    Image Attached Files
    Quote Quote  
  16. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    i imported it into vegas pro 16. converted to 16bit 48khz wav, brought the wav into vegas and it matches up exactly.

    Image
    [Attachment 52026 - Click to enlarge]
    Image Attached Files
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  17. Member
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Thanks for the screenshot @aedipuss.
    The issue seems to have something to do with later versions and builds of Vegas

    @manono, yes I know how to do it, but I wanted a 3rd party conversion as I'm trying to isolate a problem.
    Quote Quote  
  18. Member
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    This is what I get in the current version/build, with your wav file aedipuss.

    So there's an issue with the way Vegas is handling ac3 audio, so don't upgrade! I didn't have the problem with build 17, build 353 as I recall...
    Image Attached Thumbnails Click image for larger version

Name:	screenshot.PNG
Views:	91
Size:	53.0 KB
ID:	52028  

    Quote Quote  
  19. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    ouch. thanks, i'll stick with 16
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  



Similar Threads

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