Opened 3 weeks ago

Closed 2 weeks ago

Last modified 11 days ago

#6999 closed defect (wontfix)

Filter "aphasemeter" not working in latest FFmpeg version

Reported by: BlackScreen Owned by:
Priority: important Component: avfilter
Version: git-master Keywords: aphasemeter regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
The filter "aphasemeter" is not working.
How to reproduce:

ffmpeg -hide_banner -i "Test.wav" -filter_complex "[0:a] aphasemeter=s=hd720:rate=50:mpc=cyan, format=yuv420p [v]" -map "[v]" -map 0:a -r 50 -vcodec libx264 -s 1280x720 -pix_fmt yuv420p -preset slow -crf 20 -profile:v main -level 4.0 -acodec aac -ab 192k -ac 2 "Test_Phase.mp4"

ffmpeg version N-89925-gd4967c04e0
built with gcc 7.3.0 (Rev1, Built by MSYS2 project)

Change History (7)

comment:1 Changed 3 weeks ago by BlackScreen

Complete console output with "-v 9 -loglevel 99":

Splitting the commandline.
Reading option '-hide_banner' ... matched as option 'hide_banner' (do not show program banner) with argument '1'.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-i' ... matched as input url with argument 'Test.wav'.
Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with argument '[0:a] aphasemeter=s=hd720:rate=50:mpc=cyan, format=yuv420p [v]'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '[v]'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:a'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '50'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'libx264'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument '1280x720'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuv420p'.
Reading option '-preset' ... matched as AVOption 'preset' with argument 'slow'.
Reading option '-crf' ... matched as AVOption 'crf' with argument '20'.
Reading option '-profile:v' ... matched as option 'profile' (set profile) with argument 'main'.
Reading option '-level' ... matched as AVOption 'level' with argument '4.0'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'libfdk_aac'.
Reading option '-ab' ... matched as option 'ab' (audio bitrate (please use -b:a)) with argument '192k'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.
Reading option 'Test_Phase.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option hide_banner (do not show program banner) with argument 1.
Applying option v (set logging level) with argument 9.
Applying option filter_complex (create a complex filtergraph) with argument [0:a] aphasemeter=s=hd720:rate=50:mpc=cyan, format=yuv420p [v].
Successfully parsed a group of options.
Parsing a group of options: input url Test.wav.
Successfully parsed a group of options.
Opening an input file: Test.wav.
[NULL @ 00000000028b3900] Opening 'Test.wav' for reading
[file @ 0000000000748680] Setting default whitelist 'file,crypto'
Probing wav score:99 size:2048
[wav @ 00000000028b3900] Format wav probed with size=2048 and score=99
[wav @ 00000000028b3900] Before avformat_find_stream_info() pos: 44 bytes read:65580 seeks:1 nb_streams:1
[wav @ 00000000028b3900] probing stream 0 pp:32
[wav @ 00000000028b3900] probing stream 0 pp:31
[wav @ 00000000028b3900] probing stream 0 pp:30
[wav @ 00000000028b3900] probing stream 0 pp:29
[wav @ 00000000028b3900] probing stream 0 pp:28
[wav @ 00000000028b3900] probing stream 0 pp:27
[wav @ 00000000028b3900] probing stream 0 pp:26
[wav @ 00000000028b3900] probing stream 0 pp:25
[wav @ 00000000028b3900] probing stream 0 pp:24
[wav @ 00000000028b3900] probing stream 0 pp:23
[wav @ 00000000028b3900] probing stream 0 pp:22
[wav @ 00000000028b3900] probing stream 0 pp:21
[wav @ 00000000028b3900] probing stream 0 pp:20
[wav @ 00000000028b3900] probing stream 0 pp:19
[wav @ 00000000028b3900] probing stream 0 pp:18
[wav @ 00000000028b3900] probing stream 0 pp:17
[wav @ 00000000028b3900] probing stream 0 pp:16
[wav @ 00000000028b3900] probing stream 0 pp:15
[wav @ 00000000028b3900] probing stream 0 pp:14
[wav @ 00000000028b3900] probing stream 0 pp:13
[wav @ 00000000028b3900] probing stream 0 pp:12
[wav @ 00000000028b3900] probing stream 0 pp:11
[wav @ 00000000028b3900] probing stream 0 pp:10
[wav @ 00000000028b3900] probing stream 0 pp:9
[wav @ 00000000028b3900] probing stream 0 pp:8
[wav @ 00000000028b3900] probing stream 0 pp:7
[wav @ 00000000028b3900] probing stream 0 pp:6
[wav @ 00000000028b3900] probing stream 0 pp:5
[wav @ 00000000028b3900] probing stream 0 pp:4
[wav @ 00000000028b3900] probing stream 0 pp:3
[wav @ 00000000028b3900] probing stream 0 pp:2
[wav @ 00000000028b3900] probing stream 0 pp:1
[wav @ 00000000028b3900] probed stream 0
[wav @ 00000000028b3900] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 00000000028b3900] All info found
[wav @ 00000000028b3900] stream 0: start_time: -192153584101141.156 duration: 174.330
[wav @ 00000000028b3900] format: start_time: -9223372036854.775 duration: 174.330 bitrate=1536 kb/s
[wav @ 00000000028b3900] After avformat_find_stream_info() pos: 204844 bytes read:294956 seeks:1 frames:50
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'Test.wav':
  Duration: 00:02:54.33, bitrate: 1536 kb/s
    Stream #0:0, 50, 1/48000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Successfully opened the file.
[Parsed_aphasemeter_0 @ 00000000028b7bc0] Setting 's' to value 'hd720'
[Parsed_aphasemeter_0 @ 00000000028b7bc0] Setting 'rate' to value '50'
[Parsed_aphasemeter_0 @ 00000000028b7bc0] Setting 'mpc' to value 'cyan'
[Parsed_format_1 @ 00000000028b7d80] Setting 'pix_fmts' to value 'yuv420p'
[Parsed_aphasemeter_0 @ 00000000028b7bc0] Media type mismatch between the 'Parsed_aphasemeter_0' filter output pad 0 (audio) and the 'Parsed_format_1' filter input pad 0 (video)
[AVFilterGraph @ 000000000290e3c0] Cannot create the link aphasemeter:0 -> format:0
Error initializing complex filters.
Invalid argument
[AVIOContext @ 00000000028bc040] Statistics: 294956 bytes read, 1 seeks

comment:2 Changed 3 weeks ago by cehoyos

  • Keywords regression added; filter removed
  • Priority changed from normal to important

For future tickets please remember that using -hide_banner when reporting a bug (or asking a question on the user mailing list) is not ok unless you want to report an issue with this particular option.

comment:3 Changed 2 weeks ago by richardpl

  • Resolution set to wontfix
  • Status changed from new to closed

The syntax of filter have simply changed, by default it will output both audio and video stream at once.

comment:4 follow-up: Changed 2 weeks ago by BlackScreen

Then please tell me how I would use it.

comment:5 in reply to: ↑ 4 ; follow-up: Changed 11 days ago by MReedAustin

Replying to BlackScreen:

Then please tell me how I would use it.

aphasemeter outputs the audio received (with metadata injection) on its first output pad, and the generated video on the second, so in your case you were attempting to map the audio output into the video of your output file. The modified command below should work for you, I believe.

ffmpeg -hide_banner -i "Test.wav" -filter_complex "[0:a] aphasemeter=s=hd720:rate=50:mpc=cyan, format=yuv420p [a][v]" -map "[v]" -map [a] -r 50 -vcodec libx264 -s 1280x720 -pix_fmt yuv420p -preset slow -crf 20 -profile:v main -level 4.0 -acodec aac -ab 192k -ac 2 "Test_Phase.mp4"

comment:6 in reply to: ↑ 5 Changed 11 days ago by BlackScreen

Replying to MReedAustin:

aphasemeter outputs the audio received (with metadata injection) on its first output pad, and the generated video on the second, so in your case you were attempting to map the audio output into the video of your output file. The modified command below should work for you, I believe.

ffmpeg -hide_banner -i "Test.wav" -filter_complex "[0:a] aphasemeter=s=hd720:rate=50:mpc=cyan, format=yuv420p [a][v]" -map "[v]" -map [a] -r 50 -vcodec libx264 -s 1280x720 -pix_fmt yuv420p -preset slow -crf 20 -profile:v main -level 4.0 -acodec aac -ab 192k -ac 2 "Test_Phase.mp4"

I tried your solution, but it does not work either. I tried it with quotes for "[a]", but I get more or less the same error. See here:

[Parsed_aphasemeter_0 @ 000000000016cd40] Media type mismatch between the 'Parsed_aphasemeter_0' filter output pad 0 (audio) and the 'Parsed_format_1' filter input pad 0 (video)
[AVFilterGraph @ 0000000000170bc0] Cannot create the link aphasemeter:0 -> format:0
Error initializing complex filters.
Invalid argument

comment:7 Changed 11 days ago by richardpl

Because you inserted format filter, besides this is not support site. There are other sites for that.

Note: See TracTickets for help on using tickets.