VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 18 of 18
Thread
  1. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    For example, I have two video files of the same movie:

    m2ts with LPCM 2.0 audio
    mkv with FLAC 2.0 audio

    If I convert the first one to ac3 2.0 640 and the second one to ac3 2.0 640 ¿Do I have the same ac3 audio file? ¿exactly the same quality? ¿100%?
    Quote Quote  
  2. Member
    Join Date
    Aug 2006
    Location
    United States
    Search Comp PM
    FLAC is losslessly compressed digital audio. If you had a FLAC audio file that was created from an LPCM file and decompressed the FLAC file to LPCM, then the LPCM audio in the new file would be identical to that in the original LPCM audio file from which it was created

    However, unless you know that the exact same source was used for both your LPCM file and FLAC file, and know everything that was done to them before you obtained them, you should not assume that the audio on the FLAC file will be identical to that on the LPCM file once the FLAC file is decompressed.
    Ignore list: hello_hello, tried, TechLord
    Quote Quote  
  3. FLAC will provide 100% same (bit exact) version of source as PCM. It works functionally same as Zip or similar compression.
    Quote Quote  
  4. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    Originally Posted by usually_quiet View Post
    FLAC is losslessly compressed digital audio. If you had a FLAC audio file that was created from an LPCM file and decompressed the FLAC file to LPCM, then the LPCM audio in the new file would be identical to that in the original LPCM audio file from which it was created

    However, unless you know that the exact same source was used for both your LPCM file and FLAC file, and know everything that was done to them before you obtained them, you should not assume that the audio on the FLAC file will be identical to that on the LPCM file once the FLAC file is decompressed.
    Okay, I'm gonna be a little more precise.

    LPCM 2.0 bit rate: 1536 kb/s
    FLAC 2.0 bit rate: 259 kb/s

    The LPCM is 1536 kilobits per second, but the FLAC is 259. Will I have the same 640kb/s ac3 audio file converting 256kb/s FLAC audio as I would with 1536kb/s LPCM audio?

    Originally Posted by pandy View Post
    FLAC will provide 100% same (bit exact) version of source as PCM. It works functionally same as Zip or similar compression.
    So, If I have not misunderstood, I can decompress the FLAC audio with 259 kb/s to obtain the original LPCM with the 1536 kb/s? How?
    Quote Quote  
  5. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Enrik View Post
    So, If I have not misunderstood, I can decompress the FLAC audio with 259 kb/s to obtain the original LPCM with the 1536 kb/s? How?
    Open the file in Audacity and save as WAV
    Quote Quote  
  6. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    You may not realize this, but unlike LPCM, FLAC doesn't have a constant bitrate. It varies, sometimes wildly.

    So lpcm = 1536, all the time for that set of bitdepth & samplerate & channels. But your flac, which you say is 259, is only AVERAGING 259 (which btw sounds way too low to be true - flac usually has a compression of ~2.39:1). Some moments it will be less, other moments it will be more. In fact with flac, it is even possible for certain instantaneous bitrates to spike HIGHER than the lpcm rate.

    Regardless of the flac bitrate, recompression to another format is NEVER done to the flac file directly, but is done to the intermediate, decompressed lpcm version that was its source, just like u_q said. So the bitrate of the flac actually has no bearing in these equations.

    Again, *IF* your source lpcm in the one file is identical to the decompressed lpcm intermediate from the flac file, AND you perform the same recompression application on both, and have resultant files which are identical in bitrate, those SHOULD be equivalent in quality. Not identical, as lossy compression does have some variability (uniqueness, individuality) per pass, and so may not have identical hashes, but overall they can be considered as identical.

    Scott
    Quote Quote  
  7. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    Originally Posted by Cornucopia View Post
    You may not realize this, but unlike LPCM, FLAC doesn't have a constant bitrate. It varies, sometimes wildly.

    So lpcm = 1536, all the time for that set of bitdepth & samplerate & channels. But your flac, which you say is 259, is only AVERAGING 259 (which btw sounds way too low to be true - flac usually has a compression of ~2.39:1). Some moments it will be less, other moments it will be more. In fact with flac, it is even possible for certain instantaneous bitrates to spike HIGHER than the lpcm rate.

    Regardless of the flac bitrate, recompression to another format is NEVER done to the flac file directly, but is done to the intermediate, decompressed lpcm version that was its source, just like u_q said. So the bitrate of the flac actually has no bearing in these equations.

    Again, *IF* your source lpcm in the one file is identical to the decompressed lpcm intermediate from the flac file, AND you perform the same recompression application on both, and have resultant files which are identical in bitrate, those SHOULD be equivalent in quality. Not identical, as lossy compression does have some variability (uniqueness, individuality) per pass, and so may not have identical hashes, but overall they can be considered as identical.

    Scott
    Originally Posted by davexnet View Post
    Originally Posted by Enrik View Post
    So, If I have not misunderstood, I can decompress the FLAC audio with 259 kb/s to obtain the original LPCM with the 1536 kb/s? How?
    Open the file in Audacity and save as WAV
    I used mkvextract to extract the flac audio from MKV file and the result is:

    audio2.???

    The extension is .??? audacity can’t recognize the file. Should I change the file extension or import the file in any other way?

    I decided to open eac3to and import the mkv file with flac audio and the program recognized it. Would it be possible to decompress the flac with eac3to?
    Quote Quote  
  8. Originally Posted by Enrik View Post

    I used mkvextract to extract the flac audio from MKV file and the result is:

    audio2.???

    The extension is .??? audacity can’t recognize the file. Should I change the file extension or import the file in any other way?

    I decided to open eac3to and import the mkv file with flac audio and the program recognized it. Would it be possible to decompress the flac with eac3to?
    Change extension .??? to .flac - check if this will work (some applications rely on extension for example foobar 2000 don't recognize files with unknown/wrong extension even if file format is fully supported).
    Quote Quote  
  9. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    You can load the video file directly into audacity and output as ac3.
    I think,therefore i am a hamster.
    Quote Quote  
  10. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    I've finally done it with eac3to, I haven't been able to do it with Audacity. Once I fed eac3to with the mkv file I used this:

    2: %_2eng.wav

    The result is the same bitrate as the original LPCM and identical bit of depth. Thank you very much to everyone, I had no idea that FLACs were compressed audios.

    Just one more thing, what can I do if the original instead of being LPCM is DTS-HD?

    Suppose I have another MKV file with FLAC, but this time the original audio is:

    2.0 / 48 kHz / 2095 kbps / 24-bit (DTS Core: 2.0 / 48 kHz / 1509 kbps / 24-bit)

    Would it be possible to extract DTS Core from FLAC?
    Quote Quote  
  11. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    That's not how it works.

    Anytime you compress something, whether it's lossless or lossy, it is using as its source an uncompressed copy (might be a file or a decompressed intermediate or a pipe).

    If your "source" was intended to be DTS-MA, prior to compression to flac it would first decompress the dts to lpcm and then use that as input into the flac. ALWAYS.

    Scott
    Quote Quote  
  12. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    Originally Posted by Cornucopia View Post
    That's not how it works.

    Anytime you compress something, whether it's lossless or lossy, it is using as its source an uncompressed copy (might be a file or a decompressed intermediate or a pipe).

    If your "source" was intended to be DTS-MA, prior to compression to flac it would first decompress the dts to lpcm and then use that as input into the flac. ALWAYS.

    Scott
    Sorry, I don't understand what you mean by use that as input into the flac.

    This is what I did today:

    First, Flac to wav. The original bluray audio is DTS-HD instead of LPCM.

    DTS-HD Master Audio English 1554 kbps 2.0 / 48 kHz / 1554 kbps / 16-bit (DTS Core: 2.0 / 48 kHz / 1509 kbps / 16-bit)

    The resulting wav doesn't seem to have the same bit rate:

    WAV, 2.0 channels, 1:26:10, 16 bits, 1536kbps, 48kHz

    Anyway, I fed eac3to with the wav audio:

    Reading WAV...
    Writing WAVs...
    Creating file "C:\Users\AD\Desktop\video.mkv_2eng.wav_.L.wav "...
    Creating file "C:\Users\AD\Desktop\video.mkv_2eng.wav_.R.wav "...
    The original audio track has a constant bit depth of 16 bits.
    Encoding DTS <768kbps> with Surcode...
    Surcode DTS Encoder doesn't seem to be installed. <ERROR>

    3 doubts:

    1.Why this difference in bit rate? It doesn't exactly match either the DTS-HD or the DTS Core, only the bit of depth.
    2.Why eac3to separates L and R tracks and tries to encode at 768 kbps if the wav is 1536kbps.
    3.If I extract DTS -core from DTS-HD I do not receive any error message, should I install codecs to get the DTS -core from FLAC?
    Quote Quote  
  13. Originally Posted by Enrik View Post
    3 doubts:

    1.Why this difference in bit rate? It doesn't exactly match either the DTS-HD or the DTS Core, only the bit of depth.
    2.Why eac3to separates L and R tracks and tries to encode at 768 kbps if the wav is 1536kbps.
    3.If I extract DTS -core from DTS-HD I do not receive any error message, should I install codecs to get the DTS -core from FLAC?
    You need to distinguish raw data bitrate from bitrate of raw data encapsulated in some container. Even simple container add some overhead and this increase overall bitrate.

    RAW data are easy to calculate - sample rate * number of channels * bitdepth (assumption each channel has same bitdepth) equal your RAW bitrate, in real numbers this look like this: sample rate 48000 * 2 channels * 16 bit per channel = 1,536,000 bits per second.
    Some tools may report incorrectly parameters. Anything above 1536kbps may be overhead.
    Additional remark so called DTS (core) is a lossy audio compression, 768kbps DTS exist thus software may try to reencode your source to 768kbps DTS core (do not forget that whenever DTS 768 or 1536kbps is mentioned then we should talk about 5.1 audio i.e DTS compression ratio 6 or 12 to 1, for 2.0 audio 768kbps DTS provide only 2 to 1 compression)
    Quote Quote  
  14. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by Enrik View Post
    ........
    2.Why eac3to separates L and R tracks and tries to encode at 768 kbps if the wav is 1536kbps.
    Because Surcode only accepts mono .WAV files as a valid input.

    Anyway: keep in mind that Surcode is outdated and obsolete software, designed when DVD-Video "ruled" (so to speak).
    eac3to should have been updated to use ffdcaenc-2 (freeware) or/and the DTS-HD Master Audio Suite, but sadly the author (madshi) doesn't care......
    users on my IgnoreList: 161 names thus far, but featuring DB83 and manono.
    Quote Quote  
  15. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    Thank you very much. I'll try with ffdcaenc-2 as soon as possible.
    Quote Quote  
  16. Originally Posted by Enrik View Post
    Thank you very much. I'll try with ffdcaenc-2 as soon as possible.
    ffdcaenc is a DTS encoder and DTS is a lossy audio codec - there is no substantial difference between quality of AC3 (512 - 640k) and 1536k DTS.
    Quote Quote  
  17. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by pandy View Post
    Originally Posted by Enrik View Post
    Thank you very much. I'll try with ffdcaenc-2 as soon as possible.
    ffdcaenc is a DTS encoder and DTS is a lossy audio codec - there is no substantial difference between quality of AC3 (512 - 640k) and 1536k DTS.
    For 2.0 audio, the best bitrates are 256kbps with AC3 and 510kbps (at 48kHz) with DTS.
    The DVD-Video specs define the bitrates 377.25kbps and 503.25kbps for two-channel DTS audio.
    users on my IgnoreList: 161 names thus far, but featuring DB83 and manono.
    Quote Quote  
  18. Originally Posted by El Heggunte View Post
    For 2.0 audio, the best bitrates are 256kbps with AC3 and 510kbps (at 48kHz) with DTS.
    The DVD-Video specs define the bitrates 377.25kbps and 503.25kbps for two-channel DTS audio.
    ?

    You can encode 2.0 in AC3 with 640kbs if you wish...
    Quote Quote  



Similar Threads