#210(undetermined:new): bit depth loss with 'lossless' encoding!
#210: bit depth loss with 'lossless' encoding! --------------------------+----------------------- Reporter: Atrocia | Type: defect Status: new | Priority: critical Component: undetermined | Version: git Keywords: | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | --------------------------+----------------------- I have 48 KHz / 24 bit audio files created by the Zoom H1 audio recorder; e.g.: $ mediainfo sample.WAV General Complete name : sample.WAV Format : Wave File size : 2.75 MiB Duration : 10s 0ms Overall bit rate : 2 304 Kbps Audio ID : 0 Format : PCM Format settings, Endianness : Little Codec ID : 1 Codec ID/Hint : Microsoft Duration : 10s 0ms Bit rate : 2 304 Kbps Channel(s) : 2 channels Sampling rate : 48.0 KHz Bit depth : 24 bits Stream size : 2.75 MiB (100%) When I convert them to flac format, they become 16 bit: $ ffmpeg -i sample.WAV sample.flac ... $ mediainfo sample.flac General Complete name : sample.flac Format : FLAC Format/Info : Free Lossless Audio Codec File size : 695 KiB Duration : 10s 0ms Overall bit rate : 569 Kbps Writing application : Lavf53.0.3 Audio Format : FLAC Format/Info : Free Lossless Audio Codec Duration : 10s 0ms Bit rate mode : Variable Bit rate : 563 Kbps Channel(s) : 2 channels Sampling rate : 48.0 KHz Bit depth : 16 bits Stream size : 687 KiB (99%) Writing library : Lavf53.0.3 ffmpeg (git-N-29954-gfc19379) throws this warning - I don't know if it's relevant: Incompatible sample format 's32' for codec 'flac', auto-selecting format 's16' The 'flac' tool, from the flac project, handles these files correctly: $ flac sample.WAV ... $ mediainfo sample.flac General Complete name : sample.flac Format : FLAC Format/Info : Free Lossless Audio Codec File size : 1.59 MiB Duration : 10s 0ms Overall bit rate : 1 336 Kbps Audio Format : FLAC Format/Info : Free Lossless Audio Codec Duration : 10s 0ms Bit rate mode : Variable Bit rate : 1 329 Kbps Channel(s) : 2 channels Sampling rate : 48.0 KHz Bit depth : 24 bits Stream size : 1.58 MiB (100%) Writing library : libFLAC 1.2.1 (UTC 2007-09-17) flac gives this warning - no idea if this is related to the one ffmpeg gives: sample.WAV: WARNING: legacy WAVE file has format type 1 but bits-per- sample=24 -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/210> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#210: bit depth loss with 'lossless' encoding! ------------------------+---------------------- Reporter: Atrocia | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced: 1 Analyzed: 0 | ------------------------+---------------------- Changes (by cehoyos): * status: new => open * reproduced: 0 => 1 * component: undetermined => avcodec * priority: critical => wish * version: git => git-master * type: defect => enhancement Comment: For future reports, please provide complete, uncut output of your ffmpeg- command (including the command line), third party application output is almost never needed. FFmpeg warns that its flac-encoder does not support 24 (or 32) bit and the content was therefore down-sampled, so this is a feature request. -- Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/210#comment:1> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#210: 24bit flac encoding ------------------------+---------------------- Reporter: Atrocia | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced: 1 Analyzed: 0 | ------------------------+---------------------- -- Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/210#comment:2> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#210: 24bit flac encoding ------------------------+---------------------- Reporter: Atrocia | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced: 1 Analyzed: 0 | ------------------------+---------------------- Comment (by Atrocia): Ok, thanks for the reporting tip. I understand that this should be called a feature request, but I still suggest that in the interim there be a clearer warning - after all, flac is synonymous with lossless encoding. Doing lossy encoding, with only a somewhat obscure warning, could result in permanent data loss if the user doesn't keep the original file. -- Ticket URL: <http://ffmpeg.org/trac/ffmpeg/ticket/210#comment:3> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#210: 24bit flac encoding ------------------------+---------------------- Reporter: Atrocia | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced: 1 Analyzed: 0 | ------------------------+---------------------- Comment (by michael): Ive added a better warning locally, will be in git with my next push -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/210#comment:4> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#210: 24bit flac encoding -------------------------------------+----------------------------------- Reporter: Atrocia | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: flac | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by cehoyos): * keywords: => flac -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/210#comment:5> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#210: 24bit flac encoding -------------------------------------+----------------------------------- Reporter: Atrocia | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: flac | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by dericed): The warning that Michael mentioned a year ago seems to no longer be enabled. Using an ffmpeg compiled from git on July 21, 2011 I would get a warning "Convertion will not be lossless'" in this scenario. In the latest git master 24 bit audio converts to 16 bit for flac encoding with no warning. pastebin here: http://pastebin.com/kGpT7fPj -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/210#comment:6> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#210: 24bit flac encoding -------------------------------------+----------------------------------- Reporter: Atrocia | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: flac | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by cehoyos): Please do not use external resources if you want to provide console output, but paste it here. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/210#comment:7> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#210: 24bit flac encoding -------------------------------------+----------------------------------- Reporter: Atrocia | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: flac | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by holunder2): Please check this patch from MakeMKV developer for 24 bit FLAC encoding: http://www.makemkv.com/download/ffmpeg/ I don't know if he has submitted the patch to ffmpeg, but it would very great if this would go upstream. :) -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/210#comment:8> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#210: 24bit flac encoding -------------------------------------+----------------------------------- Reporter: Atrocia | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: flac | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by cehoyos): * cc: holunder2 (added) Comment: I suspect this patch needs at least a copyright statement before it can be considered for inclusion. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/210#comment:9> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#210: 24bit flac encoding -------------------------------------+----------------------------------- Reporter: Atrocia | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: flac | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by michael): Replying to [comment:9 cehoyos]:
I suspect this patch needs at least a copyright statement before it can be considered for inclusion.
who should be credited as author if we merge something from this patch ? -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/210#comment:10> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#210: 24bit flac encoding -------------------------------------+----------------------------------- Reporter: Atrocia | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: flac | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by holunder2): »This patch is Public domain. No copyright is claimed. Feel free to give a link to this page.« http://www.makemkv.com/forum2/viewtopic.php?p=23025#p23025 -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/210#comment:11> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#210: 24bit flac encoding -------------------------------------+----------------------------------- Reporter: Atrocia | Owner: Type: enhancement | Status: closed Priority: wish | Component: avcodec Version: git-master | Resolution: fixed Keywords: flac | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by cehoyos): * status: open => closed * resolution: => fixed Comment: Implemented by Justin. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/210#comment:12> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg