Opened 14 months ago

Closed 8 months ago

#7291 closed defect (fixed)

24bit flac converted to alac, bit-depth atom in output file incorrectly set at 16bit

Reported by: pssturges Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mov alac
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: 24bit flac converted to alac, bit-depth atom in output file incorrectly set at 16bit not 24bit
How to reproduce:

% ffmpeg -i 24bitflac.flac -y -map 0:0 -c:a:0 alac 24bitalac.m4a
ffmpeg version 2.8.14-0ubuntu0.16.04.1
mp4file --dump 24bitalac.m4a | grep sample
        "24bitalac.m4a": sampleSize = 16 (0x0010)
       "24bitalac.m4a": sampleSize = 0 (0x00000000)
       "24bitalac.m4a": sampleCount = 6096 (0x000017d0)

This causes the resultant file to play as white noise in some players as they attempt to play it as 16bit file. Logitech Media Server is one such player.

An extensive investigation of this issue can be found on the slim devices forum found here:
https://forums.slimdevices.com/showthread.php?102059-24-bit-ALAC-files-being-truncated-to-16-bit

Forum member 'bpa' has suggested a patch in that thread which I have tested and found to correct the problem

Attachments (1)

24bitflac.flac (498.5 KB) - added by pssturges 14 months ago.

Download all attachments as: .zip

Change History (5)

Changed 14 months ago by pssturges

comment:1 in reply to: ↑ description Changed 14 months ago by cehoyos

  • Component changed from ffmpeg to avformat
  • Keywords mov alac added
  • Version changed from unspecified to git-master

Replying to pssturges:

Forum member 'bpa' has suggested a patch in that thread which I have tested and found to correct the problem

Then why did you open this ticket?
Please send the patch - made with correct attribution and git format-patch - to the development mailing list.

comment:2 Changed 14 months ago by bpa

My understanding of patches sent to developmentlist is that have to had run the regression test which I havne't done.
https://www.ffmpeg.org/developer.html#Submitting-patches

comment:3 Changed 14 months ago by bpa

The patch is to libavformat/movenc.c but it has been updated since I created the "patch" so line number may be wrong.
1081,1083c1085
<

< if (track->par->codec_id == AV_CODEC_ID_FLAC

< track->par->codec_id == AV_CODEC_ID_ALAC) {
---

if (track->par->codec_id == AV_CODEC_ID_FLAC) {

Version 0, edited 14 months ago by bpa (next)

comment:4 Changed 8 months ago by richardpl

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.