[FFmpeg-devel] [PATCH 001/293 v8] avutil/channel_layout: Add a new channel layout API

James Almer jamrial at gmail.com
Thu Mar 17 21:51:03 EET 2022



On 3/17/2022 4:46 PM, James Almer wrote:
> 
> 
> On 3/17/2022 4:39 PM, Michael Niedermayer wrote:
>> On Tue, Mar 15, 2022 at 11:00:02PM -0300, James Almer wrote:
>>> On 3/15/2022 9:41 PM, Michael Niedermayer wrote:
>>>> On Mon, Jan 24, 2022 at 05:46:56PM -0300, James Almer wrote:
>>>>> From: Anton Khirnov <anton at khirnov.net>
>>>>>
>>>>> The new API is more extensible and allows for custom layouts.
>>>>> More accurate information is exported, eg for decoders that do not
>>>>> set a channel layout, lavc will not make one up for them.
>>>>>
>>>>> Deprecate the old API working with just uint64_t bitmasks.
>>>>>
>>>>> Expanded and completed by Vittorio Giovara 
>>>>> <vittorio.giovara at gmail.com>
>>>>> and James Almer <jamrial at gmail.com>.
>>>>> Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
>>>>> Signed-off-by: James Almer <jamrial at gmail.com>
>>>>> ---
>>>>> Changes since last version:
>>>>>
>>>>> *Both av_channel_layout_describe() and 
>>>>> av_channel_layout_from_string() now
>>>>>    support a "2 channels (FL+LFE)" syntax, to signal native (usually
>>>>>    non-standard) or custom order layouts.
>>>>> *a single decimal value is now interpreted as a mask by
>>>>>    av_channel_layout_from_string(), same as a single hexadecimal 
>>>>> value.
>>>>> *De-duplicated code by simplifying 
>>>>> av_channel_layout_channel_from_string().
>>>>>
>>>>> The entire set can still be found in
>>>>> https://github.com/jamrial/FFmpeg/commits/channel_layout4
>>>>>
>>>>>    libavutil/channel_layout.c | 661 
>>>>> +++++++++++++++++++++++++++++++++----
>>>>>    libavutil/channel_layout.h | 551 +++++++++++++++++++++++++++++--
>>>>>    libavutil/version.h        |   1 +
>>>>>    3 files changed, 1110 insertions(+), 103 deletions(-)
>>>>
>>>> didnt bisect but
>>>>
>>>> this
>>>> ./ffmpeg -i ~/tickets/3542/out.mov -channel_layout stereo -acodec 
>>>> pcm_s16be file.mov
>>>> fails after the patchset but not before
>>>>
>>>> [graph_0_in_0_0 @ 0x5642d659ec40] filter context - fmt: s16 r: 44100 
>>>> layout: 3 ch: 2, incoming frame - fmt: s16 r: 44100 layout: 60000000 
>>>> ch: 2 pts_time: 0
>>>> [graph_0_in_0_0 @ 0x5642d659ec40] Changing audio frame properties on 
>>>> the fly is not supported.
>>>> Error while filtering: Invalid argument
>>>> Failed to inject frame into filter network: Invalid argument
>>>> Error while processing the decoded data for stream #0:0
>>>> Conversion failed!
>>>
>>> Should be fixed.
>>
>> Heres another which broke around the channel change
>> ./ffmpeg -i tickets//2064/mus_sympathy_for_the_devil_l.wav file.wav
>>
>> "tickets//2064/mus_sympathy_for_the_devil_l.wav: Function not 
>> implemented"
>>
>> file seems here:
>> https://www.djxmmx.net/ffmpeg/2064/
> 
> What was this file read as before the set? Ticket 2064 mentions a file 
> with a wav extension that's an "unknown container", and then the ticket 
> was closed as fixed without referencing a commit.

Nevermind, it's "Black ops audio" container. I see what's wrong.
Will fix in a bit.


More information about the ffmpeg-devel mailing list