illustrate
Products            Buy            Support Forum            Registrations            Professional            About           
 

AAC to anything, resulting file has shortened duration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • j-pierre

    • Feb 2005
    • 6

    AAC to anything, resulting file has shortened duration

    Hi,

    I'm trying to convert an AAC file (2h 2mn 21sec) to WAV and the resulting file is only 2h 2mn 18sec.

    I tried to open the original file with different players (WMP, Real, Media Player Classic and probably 1 or 2 others), they all indicate the same duration.

    I also tried to convert the AAC to MP3 and MP2 (and a few more) and opened these resulting files with all my players, they all indicate the same shortened duration.
    I controlled the sound after exactly 2 hours, there is a 3 seconds difference...

    If somebody has a brillant idea....... :smile2:
    Jean-Pierre
  • ChristinaS
    dBpoweramp Guru

    • Apr 2004
    • 4097

    #2
    Re: AAC to anything, resulting file has shortened duration

    Have you established where the 3 seconds are missing from? The beginning or the end or is it sort of evenly distributed? And is it exactly 3 seconds or is it 2.51 seconds or 3.49 seconds or things in between?

    Finally have you calculated what the error actually is? 3/7941 is less than 0.0378%. For the average songs of 4 minutes duration this would be equivalent to a shortened duration of 0.09 seconds overall. In fact not easily measurable at all.

    I don't know if you have a particular reason to wish for 100% accuracy, but I have a feeling it's not possible with conversions, especially from a lossy format. Your computer's components are probably not that finely calibrated themselves.

    Comment

    • j-pierre

      • Feb 2005
      • 6

      #3
      Re: AAC to anything, resulting file has shortened duration

      Hello Christina,

      Thanks for the quick answer :smile2:

      They are no missing 3 seconds, but rather the total duration is shorter, probably regularly distributed over the whole file (A trial after one hour shows a difference of 1 and something second). It's very close to 3 seconds, to get an exact number, I should be able to display and analyze the wave, which I can do for wav or mp3 files with Adobe Audition, not for other formats........

      I agree with you, a difference of 0.0378% should be negligeable. The problem is that I have the video in RMVB format, when I'm converting it to DIVX (avi extension) or MPEG-2 (mpg), the conversion is fine, and I'm getting a increasing desync between sound and video over the time. At the end, I ear the voices 3 seconds before the lips are moving. And 0.0378% becomes enormeous !!!!!!

      I'm now using DBPowerAmp for over 2 years, it's probably the best software to convert audio (for free!!!), making any kind of conversion (15 codecs installed !!!) and never had this problem. I'm not sure I agree with you, a loosy format means worst quality, not modified duration, i.e, (this example does'nt apply to DBPowerAmp) when you're extracting the sound from an DIVX file and convert it to wav or mp2, you get the resulting sound file with the same duration as the original, with a accurracy of 0,001 second, which can be easily checked with appropriate softwares like VirtualDub or Adobe Audition.

      So, it must be possible and I suspect the codec. By the way, I'm using "dBpowerAMP-codec-mp4-aac-decode.exe" from Codec Central.

      Jean-Pierre

      Comment

      • adaywayne
        dBpoweramp Guru

        • Nov 2004
        • 383

        #4
        Re: AAC to anything, resulting file has shortened duration

        Originally posted by j-pierre
        Hello Christina,

        Thanks for the quick answer :smile2:

        They are no missing 3 seconds, but rather the total duration is shorter, probably regularly distributed over the whole file (A trial after one hour shows a difference of 1 and something second). It's very close to 3 seconds, to get an exact number, I should be able to display and analyze the wave, which I can do for wav or mp3 files with Adobe Audition, not for other formats........

        I agree with you, a difference of 0.0378% should be negligeable. The problem is that I have the video in RMVB format, when I'm converting it to DIVX (avi extension) or MPEG-2 (mpg), the conversion is fine, and I'm getting a increasing desync between sound and video over the time. At the end, I ear the voices 3 seconds before the lips are moving. And 0.0378% becomes enormeous !!!!!!

        I'm now using DBPowerAmp for over 2 years, it's probably the best software to convert audio (for free!!!), making any kind of conversion (15 codecs installed !!!) and never had this problem. I'm not sure I agree with you, a loosy format means worst quality, not modified duration, i.e, (this example does'nt apply to DBPowerAmp) when you're extracting the sound from an DIVX file and convert it to wav or mp2, you get the resulting sound file with the same duration as the original, with a accurracy of 0,001 second, which can be easily checked with appropriate softwares like VirtualDub or Adobe Audition.

        So, it must be possible and I suspect the codec. By the way, I'm using "dBpowerAMP-codec-mp4-aac-decode.exe" from Codec Central.

        Jean-Pierre
        ~~~~~~~~~~~
        Well, just for fun, I took a wave file of 45m51.861s and converted it to an AAC file using the latest AAC encoder from Codec Central. I then decoded it using the latest AAC decoder from Codec Central. Using the same wave editor software, it was indicated to have a duration of 45m51.836s........shorter by 25 millisecond. I think this could easily be attributed to my "consumer-grade" sofware inaccuracy, especially since I cannot conceive of any way in which compressing and decompressing an audio file could cause it to play either faster or slower.

        So I looked into it a bit more and examined the actual waveform of the original and the compressed/decompressed file at exactly the same time in the file, and with the same view settings. The two pictures are below, with the first one being the original wave file.







        As you can see, at 34m45.848s, the compressed/decompressed file is lagging the original by exactly 20ms!

        I don't know if this helps but it's interesting (to me, at least!)
        Then

        Comment

        • neilthecellist
          dBpoweramp Guru

          • Dec 2004
          • 1288

          #5
          Re: AAC to anything, resulting file has shortened duration

          Actually, i can tell all of you for sure, whenever i convert aac to wav, i get a shorter file.

          Comment

          • adaywayne
            dBpoweramp Guru

            • Nov 2004
            • 383

            #6
            Re: AAC to anything, resulting file has shortened duration

            Originally posted by neilthecellist
            Actually, i can tell all of you for sure, whenever i convert aac to wav, i get a shorter file.
            Can you provide some examples, Neil?

            Comment

            • j-pierre

              • Feb 2005
              • 6

              #7
              Re: AAC to anything, resulting file has shortened duration

              Hi adaywayne,

              The test you've made is interesting, but doesn't correspond to the problem, you're demonstrating that wav->aac->wav, both wav files have the same duration, but what about the duration of the aac file ?

              You also say

              especially since I cannot conceive of any way in which compressing and decompressing an audio file could cause it to play either faster or slower.

              Well, I'm not posting for the pleasure, I really have the problem, and apparently, I'm not the only one...... I would be delighted to provide you with a couple of aac files to be converted to wav (sized 52 to 56 meg !!!!) :smile2: :smile2:

              You're also mentioning the newest codec from codec central. So I reinstalled the codec, but the problem persists :cry: :cry:

              Any good idea ?
              Jean-Pierre

              Comment

              • ChristinaS
                dBpoweramp Guru

                • Apr 2004
                • 4097

                #8
                Re: AAC to anything, resulting file has shortened duration

                I don't quite follow the steps you mentioned.

                You say your video and audio tracks get desynchronized when converting your video from one format to another. I think the piece I'm missing is where does the aac format come in. Is that the format of the audio track of your original video? And is wav the format of the audio track of your converted video?

                Comment

                • j-pierre

                  • Feb 2005
                  • 6

                  #9
                  Re: AAC to anything, resulting file has shortened duration

                  You're right:

                  The original video is in rmvb format, which I converted first to avi (Divx) then m2v (MPEG-2), duration remains unchanged (2h 2m 21s).
                  The original audio is in aac format, which I converted to wav, mp3 and mp2 (I mean aac->wav, aac->mp3, aac->mp2), the resulting audio is always shortened (2h 2mn 18s).

                  When I'm muxing either avi+wav or m2v+mp2, audio get desync with the video.

                  Jean-Pierre
                  Last edited by j-pierre; February 26, 2005, 11:17 AM.

                  Comment

                  • adaywayne
                    dBpoweramp Guru

                    • Nov 2004
                    • 383

                    #10
                    Re: AAC to anything, resulting file has shortened duration

                    Hi adaywayne,

                    The test you've made is interesting, but doesn't correspond to the problem, you're demonstrating that wav->aac->wav, both wav files have the same duration, but what about the duration of the aac file ?

                    [COLOR=DarkSlateBlue]Unfortunately I do not have a program that will tell me the length of an audio
                    aac file to within milliseconds so my method was the only one I could think of.[/COLOR]

                    You also say

                    especially since I cannot conceive of any way in which compressing and decompressing an audio file could cause it to play either faster or slower.

                    Well, I'm not posting for the pleasure, I really have the problem, and apparently, I'm not the only one...... I would be delighted to provide you with a couple of aac files to be converted to wav (sized 52 to 56 meg !!!!) :smile2: :smile2:

                    [COLOR=DarkSlateBlue]Oh....I'm not disputing that you have the problem.....I just said that I can't think of any reason why that should happen! I also said that I didn't think my response would be particularly helpful. Re your files, I'd be interested in looking at them, but I don't think most email programs will accept such large attachments.[/COLOR]

                    You're also mentioning the newest codec from codec central. So I reinstalled the codec, but the problem persists :cry: :cry: [COLOR=DarkSlateBlue](I'll cry with you!)[/COLOR]

                    Any good idea ?

                    [COLOR=DarkSlateBlue]Well, I suppose you could take the wave file and add a few milliseconds of silence at various places, as needed, to keep it synchronised. That should be fairly easy, if not very elegant!
                    [/COLOR]

                    [COLOR=DarkSlateBlue]PS. I think I said the processed file "lagged" the original. I should have said it was led the original (ie. it ran faster)[/COLOR]

                    Comment

                    • adaywayne
                      dBpoweramp Guru

                      • Nov 2004
                      • 383

                      #11
                      Re: AAC to anything, resulting file has shortened duration

                      Got it!!! Calculate by what percentage (to several decimal places) you need to change the length of the wave file to make it the exact length you need.

                      Then load the wave file into the free audio editor "Audacity"..

                      Download Audacity for free. A free multi-track audio editor and recorder. Audacity is a free, easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems. Audacity is free software, developed by a group of volunteers and distributed under the GNU General Public License (GPL).


                      Then "select" the whole wave file and change the "Tempo" to (for example) -0.08% (that's minus ***) and click OK. Then go to "File" > "Export as Wave" and save the file to some other location other than the original. The resulting wave file will be "stretched" (ie, slowed down) by exactly the number of milliseconds you need. I just tried it with a 45 minute wave file and the result was right on the button to the nearest 2 milliseconds! Good luck.
                      Last edited by adaywayne; February 26, 2005, 04:28 PM.

                      Comment

                      • Spoon
                        Administrator
                        • Apr 2002
                        • 44669

                        #12
                        Re: AAC to anything, resulting file has shortened duration

                        Are you sure you are not running any DSP Effects (such as silence removal)?
                        Spoon
                        www.dbpoweramp.com

                        Comment

                        • neilthecellist
                          dBpoweramp Guru

                          • Dec 2004
                          • 1288

                          #13
                          Re: AAC to anything, resulting file has shortened duration

                          adaywayne......

                          I must say this: Good job and thanks for helping me with our problems with AAC and WAV.

                          Comment

                          • j-pierre

                            • Feb 2005
                            • 6

                            #14
                            Re: AAC to anything, resulting file has shortened duration

                            Just getting up and I get your answer, adaywayne......

                            Can you think about any better way to start a new day ??????

                            I'll try it today and I comme back to tell you.

                            BTW, just move your cursor over the aac file name, and a popup windows opens with dbpoweramp retrieved information (the duration in seconds, but for large file, it's more than enough to see if there is a difference)

                            Till soon

                            Jean-Pierre

                            Comment

                            • j-pierre

                              • Feb 2005
                              • 6

                              #15
                              Re: AAC to anything, resulting file has shortened duration

                              Many thanks for your help, it worked fine.

                              However, I tried to convert another movie (same type of files, RMVB video + AAC sound), and they remain perfectly sync..... I probably did some mistake, but which one ???????????

                              The problem is now solved, thanks again
                              Jean-Pierre

                              Comment

                              Working...