EIRTeam / EIRTeam.FFmpeg

Plugin for godot that adds an FFmpeg-based decoder.
https://eirteam-docs.readthedocs.io/en/latest/documentation/ffmpeg/ffmpeg_getting_started.html
MIT License
140 stars 20 forks source link

When loading these two MP4 files, the app crashes ... Why ? #37

Open cyberpsyche opened 1 week ago

cyberpsyche commented 1 week ago

https://github.com/user-attachments/assets/a75afe9f-dbc2-4f8f-9a32-dff371933759

When I want to load the former listed mp4 files, the app will crash. In the meanwhile, I cound load other mp4 files successfully. These two files could be played without any problem with mpv or ffplay. I wonder that is the reason this issue.

I use EIRTeam.FFmpeg 1.0.4 with Godot 4.3 stable on a MacOS。

The crash info listed as follows. Could anybody take a look to these two mp4 files ?

 ERROR: Caller thread can't call this function in this node (/root). Use call_deferred() or call_thread_group() instead.
   at: propagate_notification (scene/main/node.cpp:2422)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.stable.custom_build (77dcf97d82cbfe4e4615475fa52ca03da645dbd8)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] 1   libsystem_platform.dylib            0x0000000188c534a4 _sigtramp + 56
[2] VideoDecoder::_decode_next_frame(AVPacket*, AVFrame*)
[3] VideoDecoder::_thread_func(void*)
[4] void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(void*), VideoDecoder*> >(void*)
[5] 5   libsystem_pthread.dylib             0x0000000188c3c26c _pthread_start + 148
[6] 6   libsystem_pthread.dylib             0x0000000188c3708c thread_start + 8
-- END OF BACKTRACE --
================================================================
EIREXE commented 1 week ago

The reason for the crash is likely that the file has a second stream that is unrecognized by ffmpeg, this can be shown with ffprobe:

❯ ffprobe 376036222-a75afe9f-dbc2-4f8f-9a32-dff371933759.mp4
ffprobe version n7.0.2 Copyright (c) 2007-2024 the FFmpeg developers
  built with gcc 14.2.1 (GCC) 20240910
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '376036222-a75afe9f-dbc2-4f8f-9a32-dff371933759.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.71.100
  Duration: 00:00:19.88, start: 0.000000, bitrate: 642 kb/s
  Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 630x332 [SAR 2931:2933 DAR 131895:69554], 639 kb/s, SAR 30773:30794 DAR 256:135, 25 fps, 25 tbr, 12800 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        timecode        : 17:14:07:10
  Stream #0:1[0x2](eng): Data: none (tmcd / 0x64636D74), 0 kb/s
      Metadata:
        handler_name    : TimeCodeHandler
        timecode        : 17:14:07:10
Unsupported codec with id 0 for input stream 1