Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Tobias Rapp <t.rapp@noa-archive.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v2 9/9] avformat/pcm: decrease target audio frame per sec to 10
Date: Thu, 14 Mar 2024 09:10:16 +0100
Message-ID: <ca09d0bc-0b64-4e63-a578-a85d34d37f05@noa-archive.com> (raw)
In-Reply-To: <20240308005333.12416-9-cus@passwd.hu>

On 08/03/2024 01:53, Marton Balint wrote:

> This makes the wav and pcm demuxer demux bigger packets, which is more
> efficient.
>
> Signed-off-by: Marton Balint<cus@passwd.hu>
> ---
>   libavformat/pcm.c                             |   2 +-
>   tests/ref/acodec/pcm-s16be                    |   2 +-
>   tests/ref/acodec/pcm-s16be_planar             |   4 +-
>   tests/ref/acodec/pcm-s16le_planar             |   4 +-
>   tests/ref/acodec/pcm-s24be                    |   2 +-
>   tests/ref/acodec/pcm-s24le_planar             |   4 +-
>   tests/ref/acodec/pcm-s32be                    |   2 +-
>   tests/ref/acodec/pcm-s32le_planar             |   4 +-
>   tests/ref/acodec/pcm-s8_planar                |   4 +-
>   tests/ref/acodec/pcm-u16be                    |   4 +-
>   tests/ref/acodec/pcm-u16le                    |   4 +-
>   tests/ref/acodec/pcm-u24be                    |   4 +-
>   tests/ref/acodec/pcm-u24le                    |   4 +-
>   tests/ref/acodec/pcm-u32be                    |   4 +-
>   tests/ref/acodec/pcm-u32le                    |   4 +-
>   tests/ref/acodec/s302m                        |   8 +-
>   tests/ref/fate/dcinema-encode                 |  63 +-
>   tests/ref/fate/filter-acrossfade              | 623 ++++--------------
>   tests/ref/fate/filter-adelay                  | 324 ++-------
>   tests/ref/fate/filter-aecho                   | 324 ++-------
>   tests/ref/fate/filter-aemphasis-50fm          | 324 ++-------
>   tests/ref/fate/filter-aemphasis-75kf          | 324 ++-------
>   tests/ref/fate/filter-afade-esin              | 324 ++-------
>   tests/ref/fate/filter-afade-exp               | 324 ++-------
>   tests/ref/fate/filter-afade-hsin              | 324 ++-------
>   tests/ref/fate/filter-afade-iqsin             | 324 ++-------
>   tests/ref/fate/filter-afade-log               | 324 ++-------
>   tests/ref/fate/filter-afade-qsin              | 324 ++-------
>   tests/ref/fate/filter-agate                   | 324 ++-------
>   tests/ref/fate/filter-alimiter                | 324 ++-------
>   tests/ref/fate/filter-amerge                  | 324 ++-------
>   tests/ref/fate/filter-anequalizer             | 324 ++-------
>   tests/ref/fate/filter-apad                    | 324 ++-------
>   .../ref/fate/filter-asegment-samples-absolute | 324 ++-------
>   .../ref/fate/filter-asegment-samples-relative | 324 ++-------
>   .../fate/filter-asegment-timestamps-absolute  | 326 ++-------
>   .../fate/filter-asegment-timestamps-relative  | 326 ++-------
>   tests/ref/fate/filter-asetrate                |  40 +-
>   tests/ref/fate/filter-atrim-mixed             |   4 +-
>   tests/ref/fate/filter-atrim-time              |   5 +-
>   tests/ref/fate/filter-chorus                  |  20 +-
>   tests/ref/fate/filter-compand                 |  40 +-
>   tests/ref/fate/filter-crystalizer             | 324 ++-------
>   tests/ref/fate/filter-dcshift                 |  40 +-
>   tests/ref/fate/filter-earwax                  |  40 +-
>   tests/ref/fate/filter-extrastereo             |  40 +-
>   tests/ref/fate/filter-pan-downmix1            |  40 +-
>   tests/ref/fate/filter-pan-downmix2            |  40 +-
>   tests/ref/fate/filter-pan-mono1               |  40 +-
>   tests/ref/fate/filter-pan-mono2               |  40 +-
>   tests/ref/fate/filter-pan-stereo1             |  40 +-
>   tests/ref/fate/filter-pan-stereo2             |  40 +-
>   tests/ref/fate/filter-pan-stereo3             |  40 +-
>   tests/ref/fate/filter-pan-stereo4             |  40 +-
>   tests/ref/fate/filter-pan-upmix1              |  40 +-
>   tests/ref/fate/filter-pan-upmix2              |  40 +-
>   tests/ref/fate/filter-stereotools             |  40 +-
>   tests/ref/fate/flcl1905                       | 612 ++++++++---------
>   tests/ref/fate/g722-encode                    | 282 +++-----
>   tests/ref/fate/g726-encode-2bit               | 282 +++-----
>   tests/ref/fate/g726-encode-3bit               | 282 +++-----
>   tests/ref/fate/g726-encode-4bit               | 282 +++-----
>   tests/ref/fate/g726-encode-5bit               | 282 +++-----
>   tests/ref/fate/matroska-move-cues-to-front    |  18 +-
>   tests/ref/fate/mov-channel-description        |   4 +-
>   tests/ref/fate/mov-mp4-pcm                    |   4 +-
>   tests/ref/fate/mov-mp4-pcm-float              |   2 +-
>   tests/ref/lavf/ast                            |   4 +-
>   tests/ref/lavf/mov                            |  12 +-
>   tests/ref/lavf/mov_rtphint                    |   4 +-
>   tests/ref/lavf/s16.voc                        |   4 +-
>   tests/ref/lavf/smjpeg                         |   6 +-
>   tests/ref/lavf/voc                            |   4 +-
>   tests/ref/seek/acodec-adpcm-ima_wav           |  54 +-
>   tests/ref/seek/acodec-adpcm-ima_wav-trellis   |  54 +-
>   tests/ref/seek/acodec-adpcm-ms                |  54 +-
>   tests/ref/seek/acodec-adpcm-ms-trellis        |  54 +-
>   tests/ref/seek/acodec-adpcm-yamaha            |  54 +-
>   tests/ref/seek/acodec-adpcm-yamaha-trellis    |  54 +-
>   tests/ref/seek/acodec-pcm-alaw                |  54 +-
>   tests/ref/seek/acodec-pcm-f32be               |  54 +-
>   tests/ref/seek/acodec-pcm-f32le               |  54 +-
>   tests/ref/seek/acodec-pcm-f64be               |  54 +-
>   tests/ref/seek/acodec-pcm-f64le               |  54 +-
>   tests/ref/seek/acodec-pcm-mulaw               |  54 +-
>   tests/ref/seek/acodec-pcm-s16le               |  54 +-
>   tests/ref/seek/acodec-pcm-s24le               |  54 +-
>   tests/ref/seek/acodec-pcm-s32le               |  54 +-
>   tests/ref/seek/acodec-pcm-u8                  |  54 +-
>   tests/ref/seek/lavf-al                        |  46 +-
>   tests/ref/seek/lavf-au                        |  30 +-
>   tests/ref/seek/lavf-mov                       |  44 +-
>   tests/ref/seek/lavf-ul                        |  46 +-
>   tests/ref/seek/lavf-voc                       |  22 +-
>   tests/ref/seek/lavf-wav                       |  30 +-
>   95 files changed, 3153 insertions(+), 7912 deletions(-)
>
> diff --git a/libavformat/pcm.c b/libavformat/pcm.c
> index b7728dd15e..314275bb0a 100644
> --- a/libavformat/pcm.c
> +++ b/libavformat/pcm.c
> @@ -25,7 +25,7 @@
>   #include "internal.h"
>   #include "pcm.h"
>   
> -#define PCM_DEMUX_TARGET_FPS  25
> +#define PCM_DEMUX_TARGET_FPS  10
>   
>   int ff_pcm_default_packet_size(AVCodecParameters *par)
>   {
>
> [...]
>
> diff --git a/tests/ref/fate/dcinema-encode b/tests/ref/fate/dcinema-encode
> index ce5e9d2550..9c2b6f72f1 100644
> --- a/tests/ref/fate/dcinema-encode
> +++ b/tests/ref/fate/dcinema-encode
> @@ -27,4 +27,65 @@
>   0,      34000,      34000,     2000,    24000, acffdfa3337a082091398ac8085882e1
>   0,      36000,      36000,     2000,    24000, 5daaa9b578b92270de0394baadf37a2c
>   0,      38000,      38000,     2000,    24000, 67a3b8af025b212a62229ae57f99f7a6
> -0,      40000,      40000,      960,    11520, c6d89c32b3337e204245ec6f8d144aef
> +0,      40000,      40000,     2000,    24000, e8f6f41edfdf4b198055349e90f36cd4
> +0,      42000,      42000,     2000,    24000, 43d7cd1917a7e1ecfcae1c762a4f8284
> +0,      44000,      44000,     2000,    24000, 21cc3c1b9dc3994df6ce90cc3f0bf03d
> +0,      46000,      46000,     2000,    24000, 763a76a1dca46e743fbe1ef90dac1b68
> +0,      48000,      48000,     2000,    24000, 5d307e637e1dc4218d88e48a0189beb0
> +0,      50000,      50000,     2000,    24000, dafc392287225811c1cb1c813789f2b8
> +0,      52000,      52000,     2000,    24000, c1a58740c9b731bc1f2702dc56ba3cd6
> +0,      54000,      54000,     2000,    24000, 891e6d94c34a60e24925ea28f19ccf2a
> +0,      56000,      56000,     2000,    24000, afc88ea476094f7b5accb8ca080a69a5
> +0,      58000,      58000,     2000,    24000, 74ab38c75d3810f7bf74901305eab47c
> +0,      60000,      60000,     2000,    24000, 838144d8da6a6eca8aef01195b430363
> +0,      62000,      62000,     2000,    24000, ebfb8a30c334061361241fd53067b416
> +0,      64000,      64000,     2000,    24000, 83324adc64db2f46a94363bf04a60773
> +0,      66000,      66000,     2000,    24000, 34606f116338b7045515c3b56e1633f9
> +0,      68000,      68000,     2000,    24000, 7450cc8b2c3746380140a47a47b41b73
> +0,      70000,      70000,     2000,    24000, 0f6d7bc6adf2facbd72403b17d035bf5
> +0,      72000,      72000,     2000,    24000, 844f2585154aa770ebe4df514c6139af
> +0,      74000,      74000,     2000,    24000, 36b5914af624b3f301bce43c42ec0523
> +0,      76000,      76000,     2000,    24000, 9fc415ae7ae0db7f9be51a2a5654bafd
> +0,      78000,      78000,     2000,    24000, bad8e1b1b484405ea814683eca929e1d
> +0,      80000,      80000,     2000,    24000, 25ad314aaa14e866327d9d58c65b49e7
> +0,      82000,      82000,     2000,    24000, 468fafbd7548d9c79284cdc9207bab4e
> +0,      84000,      84000,     2000,    24000, 7f3c9b931f21d4afa4319b4cd5dfc850
> +0,      86000,      86000,     2000,    24000, a96e220a2c9c4f85d843074bc4b966b6
> +0,      88000,      88000,     2000,    24000, ccaf7968a2cf2811f44e68555bdb421b
> +0,      90000,      90000,     2000,    24000, 9a308f3af192f1a232924f61e9558358
> +0,      92000,      92000,     2000,    24000, 8a11dbc1b0292a08848d6207be61cfce
> +0,      94000,      94000,     2000,    24000, ab261359b88b39c36786b6c181846096
> +0,      96000,      96000,     2000,    24000, c2dd68e56ef0d402725167cb44d57be1
> +0,      98000,      98000,     2000,    24000, 892250bb4cbce7c2784d09dfd06526b6
> +0,     100000,     100000,     2000,    24000, 121e981c4128df538fe551ea4d5a8225
> +0,     102000,     102000,     2000,    24000, 4b2a5d77951b07f81ae924abac73b8d1
> +0,     104000,     104000,     2000,    24000, b7f4c1ef2daa35c6cdcf1116eecfdb91
> +0,     106000,     106000,     2000,    24000, a9dd31482a4fa41b67ebaba1b4ff97e8
> +0,     108000,     108000,     2000,    24000, 672e5e89906d030a05b98d64d9eaefe4
> +0,     110000,     110000,     2000,    24000, 7455205e802f5c737e9867e19cb80b35
> +0,     112000,     112000,     2000,    24000, 49181c9defd9cfe163ed94bda127b64f
> +0,     114000,     114000,     2000,    24000, 76efe094889bfc9fca0a80fc628c2184
> +0,     116000,     116000,     2000,    24000, 667385cbeff8074ad31fbfaf372d3036
> +0,     118000,     118000,     2000,    24000, d5a0dd00353f92dd2d0298a98fcf68ff
> +0,     120000,     120000,     2000,    24000, c95d627e1899be337f01412ac708cebc
> +0,     122000,     122000,     2000,    24000, 0cae246a75aa327304c13b051cc43883
> +0,     124000,     124000,     2000,    24000, e244e6793f933c8309495796fd7d4cb5
> +0,     126000,     126000,     2000,    24000, d78955106c5f0acca4b61e2cc27a962b
> +0,     128000,     128000,     2000,    24000, 630581ff6634952db8ad3a791501c596
> +0,     130000,     130000,     2000,    24000, b70414eb688bc1abcd8ed08b38c90cd0
> +0,     132000,     132000,     2000,    24000, 284a1822740697edd2d6cceb4eac232e
> +0,     134000,     134000,     2000,    24000, ce67357e80bdb6bc0caa226abdf934aa
> +0,     136000,     136000,     2000,    24000, f952be1e1c7d48acd73d652ef4ea3aad
> +0,     138000,     138000,     2000,    24000, e42cbabef9d9675429dcb6fa28ce39f4
> +0,     140000,     140000,     2000,    24000, 9c6613b980bcbe9ebacbb6a492f53b16
> +0,     142000,     142000,     2000,    24000, 1882d1ae4b08fa7cc848eba60d645463
> +0,     144000,     144000,     2000,    24000, a361b56ba31c90557689631f0e7afc63
> +0,     146000,     146000,     2000,    24000, 341fbe24112c4060bb643750895a9041
> +0,     148000,     148000,     2000,    24000, 38340ef2ef764bb8007efe9cd0af54d7
> +0,     150000,     150000,     2000,    24000, 9b013a00bbedad211ba33326a3cfaa6e
> +0,     152000,     152000,     2000,    24000, 9d3469da4442cdfd2b8a5beacb789701
> +0,     154000,     154000,     2000,    24000, cf8e3880ecb46011328135dba1015044
> +0,     156000,     156000,     2000,    24000, 3be9fa7d0e0541269339ee032bda4021
> +0,     158000,     158000,     2000,    24000, ffd2646acf86524651416bc412afd846
> +0,     160000,     160000,     2000,    24000, 715163d8f82f007b1b6c42b06bd08b5a
> +0,     162000,     162000,     1840,    22080, c2079a237d021d7aa27e44acf979b1f0

Noob question: Isn't a much larger total number of samples produced here?

Also it might be good to mention in the commit that the audio duration 
is less exact when using commands like "ffmpeg -i $INPUT -c:a copy -t 
1.0 $OUTPUT".

Regards, Tobias
_______________________________________________
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".

  reply	other threads:[~2024-03-14  8:10 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05 22:51 [FFmpeg-devel] [PATCH 1/9] avcodec/bsf/pcm_rechunk: reorder supported codec list Marton Balint
2024-03-05 22:51 ` [FFmpeg-devel] [PATCH 2/9] avcodec/bsf/pcm_rechunk: add some more supported PCM formats Marton Balint
2024-03-06 14:18   ` Stefano Sabatini
2024-03-05 22:51 ` [FFmpeg-devel] [PATCH 3/9] avformat/daudenc: force 2000 sample packet size with a bsf Marton Balint
2024-03-06 14:24   ` Stefano Sabatini
2024-03-05 22:51 ` [FFmpeg-devel] [PATCH 4/9] fate: make filter-channelsplit test use a fixed frame size Marton Balint
2024-03-05 22:51 ` [FFmpeg-devel] [PATCH 5/9] fate: use a fixed wav demux packet size for amix tests Marton Balint
2024-03-05 22:51 ` [FFmpeg-devel] [PATCH 6/9] fate: use atrim filter instead of -frames:a 20 for fate-filter-tremolo Marton Balint
2024-03-05 22:51 ` [FFmpeg-devel] [PATCH 7/9] avformat/pcm: use a common default packet size function for both wav and pcm Marton Balint
2024-03-06 20:37   ` Michael Niedermayer
2024-03-05 22:51 ` [FFmpeg-devel] [PATCH 8/9] avformat/pcm: remove max samples cap when calculating the default packet size Marton Balint
2024-03-05 22:51 ` [FFmpeg-devel] [PATCH 9/9] avformat/pcm: decrease target audio frame per sec to 10 Marton Balint
2024-03-06 13:47 ` [FFmpeg-devel] [PATCH 1/9] avcodec/bsf/pcm_rechunk: reorder supported codec list Stefano Sabatini
2024-03-08  0:53   ` [FFmpeg-devel] [PATCH v2 " Marton Balint
2024-03-08  0:53     ` [FFmpeg-devel] [PATCH v2 2/9] avcodec/bsf/pcm_rechunk: add some more supported PCM formats Marton Balint
2024-03-09 16:21       ` Stefano Sabatini
2024-03-08  0:53     ` [FFmpeg-devel] [PATCH v2 3/9] avformat/daudenc: force 2000 sample packet size with a bsf Marton Balint
2024-03-09 16:23       ` Stefano Sabatini
2024-03-08  0:53     ` [FFmpeg-devel] [PATCH v2 4/9] fate: make filter-channelsplit test use a fixed frame size Marton Balint
2024-03-08  0:53     ` [FFmpeg-devel] [PATCH v2 5/9] fate: use a fixed wav demux packet size for amix tests Marton Balint
2024-03-08  0:53     ` [FFmpeg-devel] [PATCH v2 6/9] fate: use atrim filter instead of -frames:a 20 for fate-filter-tremolo Marton Balint
2024-03-08  0:53     ` [FFmpeg-devel] [PATCH v2 7/9] avformat/pcm: factorize and improve determining the default packet size Marton Balint
2024-03-12 21:31       ` Marton Balint
2024-03-14 23:18         ` [FFmpeg-devel] [PATCH v3 " Marton Balint
2024-03-16  8:45           ` Marton Balint
2024-03-08  0:53     ` [FFmpeg-devel] [PATCH v2 8/9] avformat/wavdec: use ff_pcm_default_packet_size for " Marton Balint
2024-03-08  0:53     ` [FFmpeg-devel] [PATCH v2 9/9] avformat/pcm: decrease target audio frame per sec to 10 Marton Balint
2024-03-14  8:10       ` Tobias Rapp [this message]
2024-03-14 11:12         ` Paul B Mahol
2024-03-14 22:30           ` Marton Balint
2024-03-17 12:44             ` Paul B Mahol
2024-03-14 22:04         ` Marton Balint
2024-03-15  7:54           ` Tobias Rapp
2024-03-09 16:20     ` [FFmpeg-devel] [PATCH v2 1/9] avcodec/bsf/pcm_rechunk: reorder supported codec list Stefano Sabatini

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=ca09d0bc-0b64-4e63-a578-a85d34d37f05@noa-archive.com \
    --to=t.rapp@noa-archive.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