VideoHelp Forum
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. I want to convert my AVI files to MKV, but my WD media player only support MKVs with AAC-LC audio profile.

    I almost tried everything in "Format Factory" to convert an AVI to MKV with AAC-LC audio profile, but it only enables me to convert to AAC-Main . I wonder if there is an option which I didn't see , or I should use another software.

    I'm waiting for your suggestions.
    Last edited by Behrang_a; 2nd Feb 2013 at 05:35.
    Quote Quote  
  2. MediaCoder. You don't mention the video codec but perhaps you may use "copy" for it.
    Quote Quote  
  3. Originally Posted by videobruger View Post
    MediaCoder. You don't mention the video codec but perhaps you may use "copy" for it.
    I don't know what choosing the Copy will do , so I chose "AAC" which only convert the audio of the video file to AAC-Main.
    Quote Quote  
  4. AAC-Main = AAC-LC
    Quote Quote  
  5. Originally Posted by Atak_Snajpera View Post
    AAC-Main = AAC-LC
    according to this : http://en.wikipedia.org/wiki/Advanced_Audio_Coding
    I did not think so, and my WD media player plays files with AAC-LC audio format but for files with AAC-Main it says unsupported audio format.
    Quote Quote  
  6. Banned
    Join Date
    Oct 2004
    Location
    Freedonia
    Search Comp PM
    Originally Posted by Behrang_a View Post
    I want to convert my AVI files to MKV, but my WD media player only support MKVs with AAC-LC audio profile.
    While this may be true, I think you are missing the point.

    I'm pretty sure your AVI files do NOT contain any AAC audio right now. If so then there is no reason to convert the audio at all. Just convert the video and leave the audio alone. Converting to AAC will decrease the quality any way.

    Please be sure that you do not misunderstand and think that MKV can have only AAC-LC audio or the WD won't play them. That is absolutely not correct.
    Quote Quote  
  7. Member bat999's Avatar
    Join Date
    Feb 2008
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by Atak_Snajpera View Post
    AAC-Main = AAC-LC
    That's what I thought.
    But it seems there's a difference.


    Code:
    ffmpeg -i foo.wav -c:a libfaac -b:a 128k -ar 44100 -ac 2 low.m4a
    Code:
    ffmpeg -i foo.wav -c:a libfaac -b:a 128k -ar 44100 -ac 2 -profile:a aac_main main.m4a
    MediaInfo shows
    Format profile : LC
    Format profile : Main
    Image Attached Files
    Quote Quote  
  8. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    @bat999, thanks for the nitpick.

    http://en.wikipedia.org/wiki/Advanced_Audio_Coding#Modular_encoding says:

    Low Complexity (LC) – the simplest and most widely used and supported;
    Main Profile (Main) – like the LC profile, with the addition of backwards prediction;
    and faac --long-help says:

    Code:
    --obj-type X  AAC object type. (LC (Low Complexity, default), Main or LTP (Long Term Prediction)
    Quote Quote  
  9. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    Or convert to AC3 which should be in the MKV container anyway, not ACC. AAC is for mp4. I've never seen an AVI with AAC audio but I've seen plenty of AVI with AC3 audio. If the AVI has AC3 audio then just direct stream copy the audio. If it's MP3, direct stream copy since MKV and the WDTV supports MP3 audio also. No need to convert the audio to AAC.

    Also,make sure that you not use header compression in mkvmerge. Not sure about the newer WDTV but the older one that I have will not play MKV with header compression.
    Quote Quote  
  10. Thanks Guys for your help,

    @videobruger : The MediaCoder solved my problem. it has variety of options, Thank you very much.

    @jman98 : AVI audio was not AAC it's MP3 but the reason I insisted on converting the audio to AAC is that I saw files with MKV AAC format with much less size so I decided to convert all my AVIs to MKV and free up lots of space on my HDDs.

    @DarrellS : Thanks, I know that the device is able to play AC3 , but I didn't know which one ( AAC or AC3 ) has better quality.now it seems AC3 has better quality. no WDTV support header compression yet, my device has some difficulty with MP4 too, my only way to free some space is to convert them to MKV.
    Quote Quote  
  11. If the player supports MP3 audio, why convert it? You're going to save virtually no space, if any, by converting MP3 to another format. All you'll do is reduce the quality. Any MKV vs AVI file size you may have noticed isn't too relevant as it probably only relates to how the video is compressed. If the MP3 audio happens to be 128kb/s, for example, and you convert it to 128kb/s AAC, it can't get any smaller as it's the same bitrate. If you convert it to 192kb/s AC3, which would be a common bitrate for stereo AC3 audio, then the audio size can only increase.
    Even if the MP3 audio is 192kb/s and you convert it to 128kb/s AAC, if you do the math......
    192kb/s audio in terms of file size will be about 84MB per hour. At 128kb/s, an hour of audio will be around 56MB in size. So for every hour of audio you convert you're only saving about 26MB of hard drive space. It hardly seems worth it to me. If you're re-encoding multi-channel audio while downmixing it to stereo you might save some space that way, because then you're probably going from around 448kb/s to 128kb/s, which will reduce the file size for the audio by around 140MB per hour.

    Re-compressing the video using the x264 encoder might be a different story, but even then, buying another hard drive if you're running out of space would probably be a better option than converting the video, which will generally only lose you quality. Once again though, if the average bitrate isn't less after encoding, the file size won't be any smaller.

    Where the "AC3 should be in the MKV container, not ACC" rule mentioned above comes from is a mystery to me. I've literally got 100s of MKV files containing AAC audio, and AC3 audio, and MP3 audio..... you can put any of them in an MKV container without a problem. Even the media player built into my TV will play it.

    Personally, I'd at least be copying the audio and converting the video, with MKV as the output container. Try using a converter which has a copy option for the audio (ffcoder comes to mind). Or convert only the video, open then MKV containing the converted video using MKVMergeGUI, add the original AVI, de-select the original video stream in the list, and remux the encoded video and original audio as a new MKV.
    Last edited by hello_hello; 2nd Feb 2013 at 23:10.
    Quote Quote  
  12. Originally Posted by hello_hello View Post
    Where the "AC3 should be in the MKV container, not ACC" rule mentioned above comes from is a mystery to me. I've literally got 100s of MKV files containing AAC audio, and AC3 audio, and MP3 audio..... you can put any of them in an MKV container without a problem. Even the media player built into my TV will play it.
    Most of MKV 480p videos files I saw in torrents have AAC audio format , so I thought that the combination is based on a best practice,and if I use any other audio format the video plays out of sync on my device. thanks for you suggestion, I'm going to try the easiest way
    Quote Quote  
  13. AAC is used because compared to MP3 you can get the same quality at a lower bitrate. Plus AAC supports multi-channel audio whereas standard MP3 doesn't. DTS and AC3 are also pretty common in MKVs. MP3 not so much, but mainly due to the AAC reasons I just mentioned.

    It seems a little odd the audio is out of sync when the video is played on your device if it contains anything but AAC, however anything's possible.
    Quote Quote  
  14. Banned
    Join Date
    Oct 2004
    Location
    Freedonia
    Search Comp PM
    Originally Posted by hello_hello View Post
    It seems a little odd the audio is out of sync when the video is played on your device if it contains anything but AAC, however anything's possible.
    This has not been my experience with my old WD player. Maybe the OP has VBR MP3, but still the WD players should all be able to handle that OK. Mine can.

    Actually, AAC can theoretically be more problematic than any other audio format I know of because you can turn on variable frame rate and that can really screw up playback if you use that.
    Quote Quote  
  15. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    I stated that wrong. What I meant was that AAC is part of the MP4 spec so there is no need to encode the audio to AAC if he is just putting it in an mkv container. The audio in an AVI file is most likely mp3 or AC3 from a DVD conversion so the best option is just to direct stream copy the audio. As stated above, you can put any audio in an mkv container. You can put any video in an mkv container. It doesn't mean that the video and audio that you decide to use will play in the device that you want to play it in. The OP mentioned that some mp4 do not play in his WDTV (which I have noticed also but those same files will play if in an mkv container) so the best option for me is to use a .bat file to copy all those H264/AAC.mp4 files into an mkv container. I was just trying to steer him from having to re-encode all his audio files to AAC because he thought that you had to have AAC audio in MKV.


    For converting MP4 to MKV to play in the WDTV...

    Put a copy of ffmpeg in the folder with the mp4 files and create a batch file to convert them to MKV. Right click in the folder and choose "create new text document". Paste the following text and save as "MP4-2-MKV.bat" ...

    for %%a in ("*.mp4") do ffmpeg -i %%a -vcodec copy -acodec copy %%~na.mkv

    Double click the bat file and all the files in the folder will be converted to mkv.

    For converting AVI to H264 MKV ...

    Put a copy of ffmpeg in the folder with the AVI files and create a batch file to convert them to MKV. Right click in the folder and choose "create new text document". Paste the following text and save as "AVI-2-MKV.bat" ...

    for %%a in ("*.avi") do ffmpeg -i %%a -vcodec h264 -q 20.0 -acodec copy %%~na.mkv

    Double click the bat file and all the files in the folder will be converted to mkv.

    Replace spaces in filename with dashes

    ffmpeg will ignore files with spaces in filenames so you'll need to rename those filenames. I can't find a way to that with ffmpeg but I did find a VBS script that will replace spaces in filenames with dashes in a directory. Copy the text below and save as "replace spaces-with-dashes.vbs" and double click the file. A box will pop up asking you what directory to work in. Paste the path into the box and click OK.


    dim objFileSys, file, folderName, folderObj, fileColl, objRegEx, newFile

    set objFileSys = CreateObject("Scripting.FileSystemObject")
    folderName = InputBox("Enter the full path where the files are located.", "Full path is required")

    set folderObj = objFileSys.GetFolder(folderName)
    set fileColl = folderObj.Files
    set objRegEx = new RegExp

    objRegEx.Pattern = " " ' the pattern is one space
    objRegEx.Global = true

    for each objFile in fileColl
    newFile = objRegEx.Replace(objFile.Name, "-") ' each pattern gets replaced with one dash

    objFileSys.MoveFile objFile, folderName & "\" & newFile
    next


    Example:

    Alison Krauss_Union Station_Forget About It.avi

    becomes

    Alison-Krauss_Union-Station_Forget-About-It.avi

    If you'd rather have underscores instead of dashes, just change the line...

    newFile = objRegEx.Replace(objFile.Name, "-") ' each pattern gets replaced with one dash

    to

    newFile = objRegEx.Replace(objFile.Name, "_") ' each pattern gets replaced with one underscore

    Alison_Krauss_Union_Station_Forget_About_It.avi
    Quote Quote  



Similar Threads

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