Transcoding: Difference between revisions

From Hydrogenaudio Knowledgebase
m (subjective)
m (→‎Lossy-to-lossy transcoding: fix broken lofiversion link)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''Transcoding''' means converting a file from one encoding method (i.e. file format) to another. Transcoding can be performed from [[lossless]] to lossless, from lossless to [[lossy]], and from lossy to lossy.
'''Transcoding''' means converting a file from one encoding method (i.e. file format) to another. Transcoding can be performed from [[lossless]] to lossless, from lossless to [[lossy]], from lossy to lossy, and from lossy to lossless.


Some transcoding tools you can find in the [[Download page#Transcoders|download page]].
Some transcoding tools you can find in the [[Download page#Transcoders|download page]].
Line 9: Line 9:
Transcoding between lossy formats is therefore generally not recommended. The sound quality of the result will always be worse than the (lossy) source file. Reasons to use this approach anyway could be:
Transcoding between lossy formats is therefore generally not recommended. The sound quality of the result will always be worse than the (lossy) source file. Reasons to use this approach anyway could be:


*Lowering the bitrate for use in portable players, for which a listener may not care so much about sound quality.
*Lowering the bitrate or changing the format for use in portable players, for which a listener may not care so much about sound quality.
*Saving storage space. Raw CD-audio data is about 1411 kbps (605 MB per hour); lossless encoders achieve around 700 kbps (300 MB/h). Lossy encoders such as [[Vorbis]], [[MPC]], and [[AAC]] achieve transparency for most people at 150--170 kbps (69 MB/h). For [[MP3]] (with the [[LAME]] encoder), transparency is usually achieved around 192 kbps (82 MB/h). For a large music collection, this could make a significant difference in disk space as compared to lossless archiving.
*Saving storage space. Raw CD-audio data is about 1411 kbps (605 MB per hour); lossless encoders achieve around 700 kbps (300 MB/h). Lossy encoders such as [[Vorbis]], [[MPC]], and [[AAC]] achieve transparency for most people at 150--170 kbps (69 MB/h). For [[MP3]] (with the [[LAME]] encoder), transparency is usually achieved around 192 kbps (82 MB/h). For a large music collection, this could make a significant difference in disk space as compared to lossless archiving.


Line 16: Line 16:
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=32440&hl= Transcoding to mp3] - Listening test by guruboolez, from 256 kbps lossy to 128 kbps mp3. According to this test, Ogg Vorbis and MPC performed best, followed by WV4 and AAC with a marginal difference. Transcoding from 256 kbps MP3 to 128 mp3 caused a very significant deterioration compared to 128 kbps mp3 directly from the original.
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=32440&hl= Transcoding to mp3] - Listening test by guruboolez, from 256 kbps lossy to 128 kbps mp3. According to this test, Ogg Vorbis and MPC performed best, followed by WV4 and AAC with a marginal difference. Transcoding from 256 kbps MP3 to 128 mp3 caused a very significant deterioration compared to 128 kbps mp3 directly from the original.
*[http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=1545&view=findpost&p=348892 192 kbps Ogg to 128 kbps Ogg] Remark that this is a bad idea, although apparently without thorough [[ABX]] testing.
*[http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=1545&view=findpost&p=348892 192 kbps Ogg to 128 kbps Ogg] Remark that this is a bad idea, although apparently without thorough [[ABX]] testing.
*[http://www.hydrogenaudio.org/forums/lofiversion/index.php/t41845.html Transcoding from 192 kbps (preset standard) mp3]. Informal subjective findings (no ABX test) with classic rock music: Ogg 96 or 128 kbps are audibly different from the source mp3, but still acceptable. Mp3 and WMA at 128 kbps had an unacceptable deterioration. AAC 96 kbps was better than Mp3 and WMA, but still had objectionable artifacts.
*[https://hydrogenaud.io/index.php/topic,41845.0.html Transcoding from 192 kbps (preset standard) mp3]. Informal subjective findings (no ABX test) with classic rock music: Ogg 96 or 128 kbps are audibly different from the source mp3, but still acceptable. Mp3 and WMA at 128 kbps had an unacceptable deterioration. AAC 96 kbps was better than Mp3 and WMA, but still had objectionable artifacts.
*[http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=39315&view=findpost&p=347373 Mp3 to Ogg] Ogg -q6 was required to achieve transparency against the (high-quality) mp3 with difficult samples.
*[http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=39315&view=findpost&p=347373 Mp3 to Ogg] Ogg -q6 was required to achieve transparency against the (high-quality) mp3 with difficult samples.


==Lossless-to-lossless transcoding==
==Lossless-to-lossless transcoding==


Unlike the aforementioned lossy transcoding, quality '''will not''' decrease. Thus you may transcode from one lossless format to another as often as you like (e.g. to take advantage of better compression or better error-correction or better hardware support).
Unlike the aforementioned lossy transcoding, quality '''will not''' decrease. Thus you may transcode from one lossless format to another as often as you like (e.g. to take advantage of better compression or better hardware support).


==Lossless-to-lossy transcoding==
==Lossless-to-lossy transcoding==


Keeping lossless archives gives you the opportunity to re-encode music in the future to other lossy formats as encoder technology improves. For example, if currently lossy format X is transparent at 192 kbps, while in three years lossy format Y is transparent at 128 kbps, it is still not likely that transcoding from X@192 to Y@128 will give acceptable results, contrary to transcoding from lossless.
Keeping lossless archives gives you the opportunity to re-encode music in the future to other lossy formats as encoder technology improves. For example, if currently lossy format X is transparent at 192 kbps, while in three years lossy format Y is transparent at 128 kbps, it is still not likely that transcoding from X@192 to Y@128 will give acceptable results, contrary to transcoding from lossless. This is due to the fact that X, being lossy, already removes some information it considers unimportant, but which in fact is important for Y. The result is Y's encoding will be greatly maimed.


If you are transcoding to lossy encoding from a lossless source, it is strongly recommended to '''keep the lossless source files'''. Thus, if the lossy result is not satisfactory, you can reencode easily.
If you are transcoding to lossy encoding from a lossless source, it is strongly recommended to '''keep the lossless source files'''. Thus, if the lossy result is not satisfactory, you can reencode easily.


Note that some transcoding tools have the option to automatically delete source files. Make sure that this option is '''turned off'''.
Note that some transcoding tools have the option to automatically delete source files. Make sure that this option is '''turned off'''.
==Lossy-to-lossless transcoding==
People often think that they can improve audio quality by transcoding from lossy to lossless. Lossy-to-lossless is actually an oxymoron, because once subjected to lossy encoding, by definition, loss has occurred, and there's simply no way to undo it. So, although you can convert from a lossy format to a lossless format (as normally happens internally when playing the lossy file), the audio doesn't change at all; it's just being stored differently.
If you ever do it, you should indicate its lossy origins in the file name, if not also in tags, so that you (and anyone else using the file) will know at a glance that it's not a first-generation lossless encode.
Use cases involving lossy-to-lossless transcoding include:
# Archiving audio originally in an obsolete or proprietary lossy format, without introducing additional loss.
# Editing audio that can't be directly edited in the lossy format.
# As an in-between format for lossy-to-lossy encoding.
In order to weed out lossy content that was purported to be first-generation lossless encodes, users and administrators of file-sharing venues are increasingly using spectral analysis and other methods to spot transcodes of this type. These methods are also employed by consumers who buy CDs and lossless files in order to find out if lossy encoding has occurred in the production or distribution chain; it can and does happen.
[[Category:Technical]]

Latest revision as of 21:58, 23 December 2023

Transcoding means converting a file from one encoding method (i.e. file format) to another. Transcoding can be performed from lossless to lossless, from lossless to lossy, from lossy to lossy, and from lossy to lossless.

Some transcoding tools you can find in the download page.

Lossy-to-lossy transcoding

Every time you encode with a lossy encoder, the quality will decrease. There's no way to gain quality back even if you transcode your 128kbps MP3 into a 320kbps MP3 (or any other high-quality compression).

Transcoding between lossy formats is therefore generally not recommended. The sound quality of the result will always be worse than the (lossy) source file. Reasons to use this approach anyway could be:

  • Lowering the bitrate or changing the format for use in portable players, for which a listener may not care so much about sound quality.
  • Saving storage space. Raw CD-audio data is about 1411 kbps (605 MB per hour); lossless encoders achieve around 700 kbps (300 MB/h). Lossy encoders such as Vorbis, MPC, and AAC achieve transparency for most people at 150--170 kbps (69 MB/h). For MP3 (with the LAME encoder), transparency is usually achieved around 192 kbps (82 MB/h). For a large music collection, this could make a significant difference in disk space as compared to lossless archiving.

Lossy transcoding has been discussed in a few forum threads:

  • Transcoding to mp3 - Listening test by guruboolez, from 256 kbps lossy to 128 kbps mp3. According to this test, Ogg Vorbis and MPC performed best, followed by WV4 and AAC with a marginal difference. Transcoding from 256 kbps MP3 to 128 mp3 caused a very significant deterioration compared to 128 kbps mp3 directly from the original.
  • 192 kbps Ogg to 128 kbps Ogg Remark that this is a bad idea, although apparently without thorough ABX testing.
  • Transcoding from 192 kbps (preset standard) mp3. Informal subjective findings (no ABX test) with classic rock music: Ogg 96 or 128 kbps are audibly different from the source mp3, but still acceptable. Mp3 and WMA at 128 kbps had an unacceptable deterioration. AAC 96 kbps was better than Mp3 and WMA, but still had objectionable artifacts.
  • Mp3 to Ogg Ogg -q6 was required to achieve transparency against the (high-quality) mp3 with difficult samples.

Lossless-to-lossless transcoding

Unlike the aforementioned lossy transcoding, quality will not decrease. Thus you may transcode from one lossless format to another as often as you like (e.g. to take advantage of better compression or better hardware support).

Lossless-to-lossy transcoding

Keeping lossless archives gives you the opportunity to re-encode music in the future to other lossy formats as encoder technology improves. For example, if currently lossy format X is transparent at 192 kbps, while in three years lossy format Y is transparent at 128 kbps, it is still not likely that transcoding from X@192 to Y@128 will give acceptable results, contrary to transcoding from lossless. This is due to the fact that X, being lossy, already removes some information it considers unimportant, but which in fact is important for Y. The result is Y's encoding will be greatly maimed.

If you are transcoding to lossy encoding from a lossless source, it is strongly recommended to keep the lossless source files. Thus, if the lossy result is not satisfactory, you can reencode easily.

Note that some transcoding tools have the option to automatically delete source files. Make sure that this option is turned off.

Lossy-to-lossless transcoding

People often think that they can improve audio quality by transcoding from lossy to lossless. Lossy-to-lossless is actually an oxymoron, because once subjected to lossy encoding, by definition, loss has occurred, and there's simply no way to undo it. So, although you can convert from a lossy format to a lossless format (as normally happens internally when playing the lossy file), the audio doesn't change at all; it's just being stored differently.

If you ever do it, you should indicate its lossy origins in the file name, if not also in tags, so that you (and anyone else using the file) will know at a glance that it's not a first-generation lossless encode.

Use cases involving lossy-to-lossless transcoding include:

  1. Archiving audio originally in an obsolete or proprietary lossy format, without introducing additional loss.
  2. Editing audio that can't be directly edited in the lossy format.
  3. As an in-between format for lossy-to-lossy encoding.

In order to weed out lossy content that was purported to be first-generation lossless encodes, users and administrators of file-sharing venues are increasingly using spectral analysis and other methods to spot transcodes of this type. These methods are also employed by consumers who buy CDs and lossless files in order to find out if lossy encoding has occurred in the production or distribution chain; it can and does happen.