Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] tests/fate/ffmpeg: silence the audio for fate-ffmpeg-streamloop-transcode-av
Date: Tue, 20 Jun 2023 16:50:38 -0300
Message-ID: <0312c295-0fd7-29fe-556c-bd129b9c1e35@gmail.com> (raw)
In-Reply-To: <168729009130.9711.16248011863887429642@lain.khirnov.net>

On 6/20/2023 4:41 PM, Anton Khirnov wrote:
> Quoting James Almer (2023-06-20 21:39:22)
>> On 6/20/2023 3:53 PM, Anton Khirnov wrote:
>>> Fixed-point AAC decoder currently does not produce the same output on
>>> all platforms. Until that is fixed, silence the audio stream using the
>>> volume filter.
>>>
>>> Also, actually use the aac_fixed decoder as was the original intent.
>>> ---
>>>    tests/fate/ffmpeg.mak                         |   7 +-
>>>    tests/ref/fate/ffmpeg-streamloop-transcode-av | 144 +++++++++---------
>>>    2 files changed, 77 insertions(+), 74 deletions(-)
>>>
>>> diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak
>>> index 87cd0b46d0..763ed381ee 100644
>>> --- a/tests/fate/ffmpeg.mak
>>> +++ b/tests/fate/ffmpeg.mak
>>> @@ -132,9 +132,12 @@ fate-ffmpeg-fix_sub_duration_heartbeat: CMD = fmtstdout srt -fix_sub_duration \
>>>      -c:s srt \
>>>      -f null -
>>>    
>>> -FATE_SAMPLES_FFMPEG-$(call FRAMECRC, MATROSKA, H264 AAC_FIXED, PCM_S32LE_ENCODER) += fate-ffmpeg-streamloop-transcode-av
>>> +# FIXME: the integer AAC decoder does not produce the same output on all platforms
>>> +# so until that is fixed we use the volume filter to silence the data
>>> +FATE_SAMPLES_FFMPEG-$(call FRAMECRC, MATROSKA, H264 AAC_FIXED, PCM_S32LE_ENCODER VOLUME_FILTER) += fate-ffmpeg-streamloop-transcode-av
>>>    fate-ffmpeg-streamloop-transcode-av: CMD = \
>>> -	framecrc -auto_conversion_filters -stream_loop 3 -i $(TARGET_SAMPLES)/mkv/1242-small.mkv -c:a pcm_s32le
>>> +    framecrc -auto_conversion_filters -stream_loop 3 -c:a aac_fixed -i $(TARGET_SAMPLES)/mkv/1242-small.mkv \
>>> +    -af volume=0 -c:a pcm_s32le
>>
>> Maybe do volume=0:precision=fixed so you can remove the
>> -auto_conversion_filters part.
> 
> It's mainly there to interleave s32p to s32 for encoding

Yeah, just checked and it fails without -auto_conversion_filters even if 
you force fixed point in the filter.
Still, even if it's a temporal change, it's best to add precision=fixed 
since it will prevent conversion to float and back to fixed from auto 
inserting two aresample instances in the filterchain.

With precision=fixed

> [AVFilterGraph @ 000001f29a306e20] Setting 'volume' to value '0'
> [AVFilterGraph @ 000001f29a306e20] Setting 'precision' to value 'fixed'
> [graph_0_in_0_0 @ 000001f29a30eea0] Setting 'time_base' to value '1/48000'
> [graph_0_in_0_0 @ 000001f29a30eea0] Setting 'sample_rate' to value '48000'
> [graph_0_in_0_0 @ 000001f29a30eea0] Setting 'sample_fmt' to value 's32p'
> [graph_0_in_0_0 @ 000001f29a30eea0] Setting 'channel_layout' to value 'stereo'
> [graph_0_in_0_0 @ 000001f29a30eea0] tb:1/48000 samplefmt:s32p samplerate:48000 chlayout:stereo
> [format_out_0_0 @ 000001f29a0defa0] Setting 'sample_fmts' to value 's32'
> [format_out_0_0 @ 000001f29a0defa0] auto-inserting filter 'auto_aresample_0' between the filter 'Parsed_volume_0' and the filter 'format_out_0_0'
> [AVFilterGraph @ 000001f29a306e20] query_formats: 4 queried, 4 merged, 6 already done, 0 delayed
> [graph_0_in_0_0 @ 000001f29a30eea0] tb:0.000021 sample_rate:48000.000000 nb_channels:2.000000
> [Parsed_volume_0 @ 000001f29a026f60] n:nan t:nan pts:nan precision:fixed volume_i:0/255 volume:0.000000 volume_dB:-inf
> [auto_aresample_0 @ 000001f29a0df8a0] [SWR @ 000001f29a1cbf60] Using s32p internally between filters
> [auto_aresample_0 @ 000001f29a0df8a0] ch:2 chl:stereo fmt:s32p r:48000Hz -> ch:2 chl:stereo fmt:s32 r:48000Hz

Without it

> [AVFilterGraph @ 000001ccb6036aa0] Setting 'volume' to value '0'
> [graph_0_in_0_0 @ 000001ccb603b6c0] Setting 'time_base' to value '1/48000'
> [graph_0_in_0_0 @ 000001ccb603b6c0] Setting 'sample_rate' to value '48000'
> [graph_0_in_0_0 @ 000001ccb603b6c0] Setting 'sample_fmt' to value 's32p'
> [graph_0_in_0_0 @ 000001ccb603b6c0] Setting 'channel_layout' to value 'stereo'
> [graph_0_in_0_0 @ 000001ccb603b6c0] tb:1/48000 samplefmt:s32p samplerate:48000 chlayout:stereo
> [format_out_0_0 @ 000001ccb5e0eec0] Setting 'sample_fmts' to value 's32'
> [Parsed_volume_0 @ 000001ccb5d56f80] auto-inserting filter 'auto_aresample_0' between the filter 'graph_0_in_0_0' and the filter 'Parsed_volume_0'
> [format_out_0_0 @ 000001ccb5e0eec0] auto-inserting filter 'auto_aresample_1' between the filter 'Parsed_volume_0' and the filter 'format_out_0_0'
> [AVFilterGraph @ 000001ccb6036aa0] query_formats: 4 queried, 2 merged, 9 already done, 0 delayed
> [auto_aresample_0 @ 000001ccb5d59be0] picking fltp out of 2 ref:s32p
> [auto_aresample_0 @ 000001ccb5d59be0] [SWR @ 000001ccb5efbf80] Using fltp internally between filters
> [auto_aresample_0 @ 000001ccb5d59be0] ch:2 chl:stereo fmt:s32p r:48000Hz -> ch:2 chl:stereo fmt:fltp r:48000Hz
> [auto_aresample_0 @ 000001ccb5d59be0] tb:0.000021 sample_rate:48000.000000 nb_channels:2.000000
> [Parsed_volume_0 @ 000001ccb5d56f80] n:nan t:nan pts:nan precision:float volume:0.000000 volume_dB:-inf
> [auto_aresample_1 @ 000001ccb5d5ae80] [SWR @ 000001ccb5f10fc0] Using fltp internally between filters
> [auto_aresample_1 @ 000001ccb5d5ae80] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s32 r:48000Hz
_______________________________________________
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:[~2023-06-20 19:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 18:53 Anton Khirnov
2023-06-20 19:25 ` James Almer
2023-06-20 19:39 ` James Almer
2023-06-20 19:41   ` Anton Khirnov
2023-06-20 19:50     ` James Almer [this message]
2023-06-21  8:31       ` Anton Khirnov

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=0312c295-0fd7-29fe-556c-bd129b9c1e35@gmail.com \
    --to=jamrial@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