carykh / jumpcutter

Automatically edits vidx. Explanation here: https://www.youtube.com/watch?v=DQ8orIurGxw
MIT License
3.07k stars 544 forks source link

ValueError: zero-size array to reduction operation maximum which has no identity #189

Open Saya47 opened 3 years ago

Saya47 commented 3 years ago

Hello! This is my first time using this script, it seems like it didn't finish the process completely and it didn't give me an output file, and I got an error at the end, here's the command I ran on Windows 10's CMD: A:\jumpcutter-master/jumpcutter.py --input_file "\"C:\Users\S\Videos\2020-09-20 09-47-41 S1.mkv\"" --sounded_speed 1 --silent_speed 999 --frame_margin 2 --sample_rate 48 --frame_rate 60 --output_file S1.mp4 --frame_quality 5

F:\My Cache>A:\jumpcutter-master/jumpcutter.py --input_file "\"C:\Users\S\Videos\2020-09-20 09-47-41 S1.mkv\"" --sounded_speed 1 --silent_speed 999 --frame_margin 2 --sample_rate 48 --frame_rate 60 --output_file S1.mp4 --frame_quality 5
Input #0, matroska,webm, from 'C:\Users\S\Videos\2020-09-20 09-47-41 S1.mkv':
  Metadata:
    ENCODER         : Lavf58.29.100
  Duration: 00:40:26.77, start: 0.000000, bitrate: 688 kb/s
    Stream #0:0: Video: h264 (High), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 1k tbn, 120 tbc (default)
    Metadata:
      DURATION        : 00:40:26.767000000
    Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Mixdown
      DURATION        : 00:40:26.731000000
    Stream #0:2: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Desktop Audio
      DURATION        : 00:40:26.731000000
    Stream #0:3: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Mic
      DURATION        : 00:40:26.731000000
    Stream #0:4: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Browser
      DURATION        : 00:40:26.731000000
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 00000210515a8a40] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'TEMP/frame%06d.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 60 fps, 60 tbn, 60 tbc (default)
    Metadata:
      DURATION        : 00:40:26.767000000
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=145606 fps= 69 q=5.0 Lsize=N/A time=00:40:26.76 bitrate=N/A speed=1.15x
video:15154227kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.3.1 (GCC) 20190414
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, matroska,webm, from 'C:\Users\S\Videos\2020-09-20 09-47-41 S1.mkv':
  Metadata:
    ENCODER         : Lavf58.29.100
  Duration: 00:40:26.77, start: 0.000000, bitrate: 688 kb/s
    Stream #0:0: Video: h264 (High), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 1k tbn, 120 tbc (default)
    Metadata:
      DURATION        : 00:40:26.767000000
    Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Mixdown
      DURATION        : 00:40:26.731000000
    Stream #0:2: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Desktop Audio
      DURATION        : 00:40:26.731000000
    Stream #0:3: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Mic
      DURATION        : 00:40:26.731000000
    Stream #0:4: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Browser
      DURATION        : 00:40:26.731000000
Stream mapping:
  Stream #0:1 -> #0:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'TEMP/audio.wav':
  Metadata:
    ISFT            : Lavf58.20.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48 Hz, stereo, s16, 1 kb/s (default)
    Metadata:
      title           : Mixdown
      DURATION        : 00:40:26.731000000
      encoder         : Lavc58.35.100 pcm_s16le
size=     455kB time=00:40:26.75 bitrate=   1.5kbits/s speed= 412x
video:0kB audio:455kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.016740%
Traceback (most recent call last):
  File "A:\jumpcutter-master\jumpcutter.py", line 133, in <module>
    maxchunksVolume = float(getMaxVolume(audiochunks))/maxAudioVolume
  File "A:\jumpcutter-master\jumpcutter.py", line 22, in getMaxVolume
    maxv = float(np.max(s))
  File "<__array_function__ internals>", line 6, in amax
  File "C:\Users\S\AppData\Local\Programs\Python\Python37-32\lib\site-packages\numpy\core\fromnumeric.py", line 2706, in amax
    keepdims=keepdims, initial=initial, where=where)
  File "C:\Users\S\AppData\Local\Programs\Python\Python37-32\lib\site-packages\numpy\core\fromnumeric.py", line 87, in _wrapreduction
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation maximum which has no identity

Any help is appreciated!