From: Pavel Koshevoy <pkoshevoy@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] libswresample/rematrix.c sane_layout
Date: Sat, 1 Feb 2025 17:01:26 -0700
Message-ID: <CAJgjuoxJObtX96RpkwVE15iHR8fqRG2VCFv=YTU0jnRV68ThwA@mail.gmail.com> (raw)
In-Reply-To: <CAJgjuozSoEwfTaiDbZGUwgoL1NgRNYi4XX4bQiA9p3F5znA5JA@mail.gmail.com>
On Wed, Jan 29, 2025 at 8:29 PM Pavel Koshevoy <pkoshevoy@gmail.com> wrote:
> Hi,
>
> I have a file which I can't down-mix to stereo due to
> AV_CHANNEL_ORDER_NATIVE requirement in sane_layout.
>
> ```
> $ ffmpeg -i COMMUNITY_HERO_2.mov -vn -af
> 'aformat=sample_rates=48000:channel_layouts=stereo' -y /tmp/out.wav
> ffmpeg version N-118381-g4ba9ae7742 Copyright (c) 2000-2025 the FFmpeg
> developers
> built with gcc 7 (SUSE Linux)
> configuration: --prefix=/Developer/x86_64 --prefix=/Developer/x86_64
> --enable-runtime-cpudetect --enable-libzimg --enable-libx264
> --enable-libass --enable-libmodplug --enable-libxml2 --enable-libvmaf
> --enable-shared --enable-pthreads --enable-gpl --enable-version3
> --enable-gnutls --enable-libfreetype --enable-pic --disable-static
> --enable-shared --enable-rpath --enable-ffnvcodec --enable-debug
> --disable-stripping --disable-optimizations --disable-mmx
> libavutil 59. 56.100 / 59. 56.100
> libavcodec 61. 31.101 / 61. 31.101
> libavformat 61. 9.106 / 61. 9.106
> libavdevice 61. 4.100 / 61. 4.100
> libavfilter 10. 9.100 / 10. 9.100
> libswscale 8. 13.100 / 8. 13.100
> libswresample 5. 4.100 / 5. 4.100
> libpostproc 58. 4.100 / 58. 4.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'COMMUNITY_HERO_2.mov':
> Metadata:
> major_brand : qt
> minor_version : 512
> compatible_brands: qt
> encoder : Lavf58.29.100
> Duration: 00:02:02.86, start: 0.000000, bitrate: 97805 kb/s
> Stream #0:0[0x1]: Video: prores (LT) (apcs / 0x73637061),
> yuv422p10le(top first), 1920x1080, 88583 kb/s, SAR 1:1 DAR 16:9, 29.97 fps,
> 29.97 tbr, 30k tbn (default)
> Metadata:
> handler_name : VideoHandler
> vendor_id : FFMP
> encoder : Lavc58.54.100 prores
> timecode : 14:25:46;28
> Stream #0:1[0x2]: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 8
> channels (FL+FR+FC+LFE+SL+SR+BL+BR), s32 (24 bit), 9216 kb/s (default)
> Metadata:
> handler_name : SoundHandler
> vendor_id : [0][0][0][0]
> Stream #0:2[0x3](eng): Data: none (tmcd / 0x64636D74)
> Metadata:
> handler_name : TimeCodeHandler
> timecode : 14:25:46;28
> Stream mapping:
> Stream #0:1 -> #0:0 (pcm_s24le (native) -> pcm_s16le (native))
> Press [q] to stop, [?] for help
> [auto_aresample_0 @ 0x7ff5bc004900] [SWR @ 0x7ff5bc0049f0] Input channel
> layout '8 channels (FL+FR+FC+LFE+SL+SR+BL+BR)' is not supported
> [auto_aresample_0 @ 0x7ff5bc004900] Failed to configure output pad on
> auto_aresample_0
> [af#0:0 @ 0x21841830] Error reinitializing filters!
> [af#0:0 @ 0x21841830] Task finished with error code: -22 (Invalid argument)
> [af#0:0 @ 0x21841830] Terminating thread with return code -22 (Invalid
> argument)
> [aost#0:0/pcm_s16le @ 0x218412b0] [enc:pcm_s16le @ 0x21841770] Could not
> open encoder before EOF
> [aost#0:0/pcm_s16le @ 0x218412b0] Task finished with error code: -22
> (Invalid argument)
> [aost#0:0/pcm_s16le @ 0x218412b0] Terminating thread with return code -22
> (Invalid argument)
> [out#0/wav @ 0x21840b80] Nothing was written into output file, because at
> least one of its streams received no packets.
> size= 0KiB time=N/A bitrate=N/A speed=N/A
> Conversion failed!
> ```
>
> If I remove 2 lines from sane_layout then I am able to process this file
> successfully.
> However IDK the implications of this change.
> In any case, I'm attaching the patch here, and hopefully someone more
> knowledgeable can come up with a more appropriate fix.
>
>
>
Just want to mention that this issue does not exist on release/6.1 branch,
so it's probably a regressions introduced in ffmpeg 7+
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2025-02-02 0:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-30 3:29 Pavel Koshevoy
2025-02-02 0:01 ` Pavel Koshevoy [this message]
2025-02-02 16:04 ` James Almer
2025-02-02 22:01 ` Pavel Koshevoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJgjuoxJObtX96RpkwVE15iHR8fqRG2VCFv=YTU0jnRV68ThwA@mail.gmail.com' \
--to=pkoshevoy@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git