Unmanic / unmanic-plugins

Official plugins for the Unmanic application
21 stars 68 forks source link

Bug: Remux plugin throwing exceptions #150

Open EvilTactician opened 2 years ago

EvilTactician commented 2 years ago

Noticed a number of failures on files from a series where the majority succeeded. Those which failed all have the same error, so I am using one as example.

Finished Tasks Details:

RUNNER:

Strip all image streams from file [Pass #1] Executing plugin runner... Please wait Runner did not request to execute a command

RUNNER:

Remux Video Files [Pass #1] Executing plugin runner... Please wait PLUGIN FAILED!

Failed to execute Plugin 'Remux Video Files'

Check Unmanic logs for more information

No Plugin requested to run commands for this file '/library/unraid/Animated/Family Guy/Season 12/Family Guy - s12e16 - Herpe, the Love Sore.mp4'

Unmanic Logs:

2021-11-24T16:00:02:ERROR:Unmanic.PluginExecutor - [FORMATTED] - Exception while carrying out 'worker.process_item' plugin runner 'video_remuxer'
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/unmanic/libs/unplugins/executor.py", line 276, in execute_plugin_runner
    runner(data)
  File "/config/.unmanic/plugins/video_remuxer/plugin.py", line 248, in on_worker_process
    mapper.streams_need_processing()
  File "/config/.unmanic/plugins/video_remuxer/lib/ffmpeg/stream_mapper.py", line 319, in streams_need_processing
    return self.__set_stream_mapping()
  File "/config/.unmanic/plugins/video_remuxer/lib/ffmpeg/stream_mapper.py", line 246, in __set_stream_mapping
    if not self.test_stream_needs_processing(stream_info):
  File "/config/.unmanic/plugins/video_remuxer/plugin.py", line 99, in test_stream_needs_processing
    codec_name = stream_info.get('codec_name').lower()
AttributeError: 'NoneType' object has no attribute 'lower'
2021-11-24T16:00:03:WARNING:Unmanic.Worker-W0 - [FORMATTED] - No Plugin requested to run commands for this file '/library/unraid/Animated/Family Guy/Season 12/Family Guy - s12e16 - Herpe, the Love Sore.mp4'
2021-11-24T16:00:03:WARNING:Unmanic.Worker-W0 - [FORMATTED] - Failed to convert file '/library/unraid/Animated/Family Guy/Season 12/Family Guy - s12e16 - Herpe, the Love Sore.mp4'
2021-11-24T16:00:03:INFO:Unmanic.Worker-W0 - [FORMATTED] - Finished job - /library/unraid/Animated/Family Guy/Season 12/Family Guy - s12e16 - Herpe, the Love Sore.mp4
Josh5 commented 2 years ago

Could you please get me the ffprobe of one of those files? This should be a simple fix...

EvilTactician commented 2 years ago
ffprobe version 4.3.1-Jellyfin Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-gpl --enable-version3 --enable-static --enable-libfontconfig --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --arch=amd64 --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-vdpau --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvenc --enable-nvdec --enable-ffnvcodec
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Family Guy - s12e16 - Herpe, the Love Sore.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isom
    creation_time   : 2014-04-07T00:57:15.000000Z
  Duration: 00:20:57.22, start: 0.000000, bitrate: 433 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/unknown/unknown), 720x404, 311 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
    Metadata:
      creation_time   : 2014-04-07T00:39:51.000000Z
      encoder         : AVC Coding
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 117 kb/s (default)
    Metadata:
      creation_time   : 2014-04-07T00:57:15.000000Z
    Stream #0:2(und): Data: none (mp4s / 0x7334706D), 0 kb/s (default)
    Metadata:
      creation_time   : 2014-04-07T00:57:15.000000Z
    Stream #0:3(und): Data: none (mp4s / 0x7334706D), 0 kb/s (default)
    Metadata:
      creation_time   : 2014-04-07T00:57:15.000000Z
Unsupported codec with id 0 for input stream 2
Unsupported codec with id 0 for input stream 3
Josh5 commented 2 years ago

I think I will need the stream info. Do you mind giving me the ffprobe data with this:

ffprobe -show_format -show_streams -print_format json
EvilTactician commented 2 years ago
ffprobe version 4.3.1-Jellyfin Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-gpl --enable-version3 --enable-static --enable-libfontconfig --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --arch=amd64 --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-vdpau --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvenc --enable-nvdec --enable-ffnvcodec
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
{
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Family Guy - s12e16 - Herpe, the Love Sore.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isom
    creation_time   : 2014-04-07T00:57:15.000000Z
  Duration: 00:20:57.22, start: 0.000000, bitrate: 433 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/unknown/unknown), 720x404, 311 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
    Metadata:
      creation_time   : 2014-04-07T00:39:51.000000Z
      encoder         : AVC Coding
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 117 kb/s (default)
    Metadata:
      creation_time   : 2014-04-07T00:57:15.000000Z
    Stream #0:2(und): Data: none (mp4s / 0x7334706D), 0 kb/s (default)
    Metadata:
      creation_time   : 2014-04-07T00:57:15.000000Z
    Stream #0:3(und): Data: none (mp4s / 0x7334706D), 0 kb/s (default)
    Metadata:
      creation_time   : 2014-04-07T00:57:15.000000Z
Unsupported codec with id 0 for input stream 2
Unsupported codec with id 0 for input stream 3
    "streams": [
        {
            "index": 0,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "High",
            "codec_type": "video",
            "codec_time_base": "1001/48000",
            "codec_tag_string": "avc1",
            "codec_tag": "0x31637661",
            "width": 720,
            "height": 404,
            "coded_width": 720,
            "coded_height": 416,
            "closed_captions": 0,
            "has_b_frames": 2,
            "pix_fmt": "yuv420p",
            "level": 31,
            "color_range": "tv",
            "color_space": "bt709",
            "chroma_location": "left",
            "refs": 1,
            "is_avc": "true",
            "nal_length_size": "4",
            "r_frame_rate": "24000/1001",
            "avg_frame_rate": "24000/1001",
            "time_base": "1/24000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 30171040,
            "duration": "1257.126667",
            "bit_rate": "311066",
            "bits_per_raw_sample": "8",
            "nb_frames": "30141",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "creation_time": "2014-04-07T00:39:51.000000Z",
                "language": "und",
                "encoder": "AVC Coding"
            }
        },
        {
            "index": 1,
            "codec_name": "aac",
            "codec_long_name": "AAC (Advanced Audio Coding)",
            "profile": "LC",
            "codec_type": "audio",
            "codec_time_base": "1/48000",
            "codec_tag_string": "mp4a",
            "codec_tag": "0x6134706d",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/48000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 60346368,
            "duration": "1257.216000",
            "bit_rate": "117933",
            "max_bit_rate": "195952",
            "nb_frames": "58932",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "creation_time": "2014-04-07T00:57:15.000000Z",
                "language": "und"
            }
        },
        {
            "index": 2,
            "codec_type": "data",
            "codec_tag_string": "mp4s",
            "codec_tag": "0x7334706d",
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/600",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 754329,
            "duration": "1257.215000",
            "bit_rate": "80",
            "nb_frames": "1",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "creation_time": "2014-04-07T00:57:15.000000Z",
                "language": "und"
            }
        },
        {
            "index": 3,
            "codec_type": "data",
            "codec_tag_string": "mp4s",
            "codec_tag": "0x7334706d",
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/600",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 754329,
            "duration": "1257.215000",
            "bit_rate": "64",
            "nb_frames": "1",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "creation_time": "2014-04-07T00:57:15.000000Z",
                "language": "und"
            }
        }
    ],
    "format": {
        "filename": "Family Guy - s12e16 - Herpe, the Love Sore.mp4",
        "nb_streams": 4,
        "nb_programs": 0,
        "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
        "format_long_name": "QuickTime / MOV",
        "start_time": "0.000000",
        "duration": "1257.215000",
        "size": "68067415",
        "bit_rate": "433131",
        "probe_score": 100,
        "tags": {
            "major_brand": "isom",
            "minor_version": "1",
            "compatible_brands": "isom",
            "creation_time": "2014-04-07T00:57:15.000000Z"
        }
    }
}