Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#11066 closed defect (invalid)

Aborted (core dumped) when converting from h265 to av1 with opus (4.4.2-0ubuntu0.22.04.1)

Reported by: s12 Owned by:
Priority: minor Component: avcodec
Version: 4.4.4 Keywords: av1 crash
Cc: s12, MasterQuestionable Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by s12)

Summary of the bug:

I get a core dumped when trying to do 2 pass encoding to av1 with opus in an mp4 container.

How to reproduce:

I took a quick obs screen recording of the "Bug Reports" page. I then ran ffmpeg -i 2024-06-21\ 10-40-46.mkv -c:v libx265 ~/Videos/Bug\ Test.mp4 to get my test input file. I then did the following to recreate my issue (after changing directory):

% ffmpeg -i "Bug Test.mp4" -ss 00:00:03 -to 00:00:17 -c:v libaom-av1 -b:v 130576 -c:a libopus -b:a 40K -r 12 -g 4096 -cpu-used 5 -pass 1 -f null /dev/null && ffmpeg -i "Bug Test.mp4" -ss 00:00:03 -to 00:00:17 -c:v libaom-av1 -b:v 130576 -c:a libopus -b:a 40K -r 12 -g 4096 -cpu-used 5 -pass 2 "Bug Test out.mp4" 
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)

I got

ffmpeg: ./av1/encoder/temporal_filter.c:973: tf_setup_filtering_buffer: Assertion `to_filter_buf != NULL' failed.
Aborted (core dumped)

In the output.

Initially, I had tried to simply do ffmpeg -i 2024-06-21\ 09-30-17.mkv -c:v libx265 -an ~/Bug\ Test.mp4 then in home; ffmpeg -i "Bug Test.mp4" -ss 00:00:03 -to 00:00:17 -c:v libaom-av1 -b:v 130576 -cpu-used 5 -pass 1 -f null /dev/null && ffmpeg -i "Bug Test.mp4" -ss 00:00:03 -to 00:00:17 -c:v libaom-av1 -b:v 130576 -cpu-used 5 -pass 2 "Bug Test out.mp4" to try to recreate the bug, however this seemed to work just fine. Hence, I used audio and more options from my initial use case to recreate the issue.

This is probably my first foss bug report, so apologies for not being able to follow the guide perfectly. I haven't used gdb before, and I couldn't find any resources on what ffmpeg_g is. I tried using gdb anyway, and got

ffmpeg: ./av1/encoder/temporal_filter.c:973: tf_setup_filtering_buffer: Assertion `to_filter_buf != NULL' failed.

Thread 1 "ffmpeg" received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737088590656) at ./nptl/pthread_kill.c:44
44	./nptl/pthread_kill.c: No such file or directory.
(gdb)


I'll try to include my files with better names in case they help.

Please do let me know if/when fixed versions are available, and what workarounds may exist in the mean time. Many thanks.

I hope this helps!

Update:

I had a go at compiling from source in a Debian vm, and it seems to be work fine in the source build, while still being broken in the package provided by Debian. This may mean that the issue is now beyond the scope of the ffmpeg devs, so I'll set the priority to minor. A simple explanation of what can cause the crash and when it is likely to be fixed in apt builds (if known) would be very much appreciated.

Best of luck!

Attachments (3)

h265 to av1&opus Bug Test.mp4 (2.0 MB ) - added by s12 5 months ago.
Input file
h265 to av1&opus Bug Test out.mp4 (256.0 KB ) - added by s12 5 months ago.
Output file (broken)
ffmpeg2pass-0.log (118.1 KB ) - added by s12 5 months ago.
2 pass log file

Change History (7)

by s12, 5 months ago

Input file

by s12, 5 months ago

Output file (broken)

by s12, 5 months ago

Attachment: ffmpeg2pass-0.log added

2 pass log file

comment:1 by s12, 5 months ago

Description: modified (diff)

comment:2 by s12, 5 months ago

Description: modified (diff)
Priority: normalminor

comment:3 by MasterQuestionable, 5 months ago

Cc: MasterQuestionable added
Component: undeterminedavcodec
Keywords: av1 added
Version: unspecified4.4.4

͏    Try relevant debug procedures here:
͏    https://trac.ffmpeg.org/ticket/11052#comment:9

͏    I believe it only involves AV1. (per the error message)

͏    ----

͏    My guess is bad compilation options.

Version 1, edited 5 months ago by MasterQuestionable (previous) (next) (diff)

comment:4 by mkver, 5 months ago

Resolution: invalid
Status: newclosed

Seems like a bug in libaom-av1 (and given what you say about compiling from master, it seems like a bug that has been fixed already). So closing this as there is nothing we can do about it.

Note: See TracTickets for help on using tickets.