Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [Bug]: ERROR : Keyerror : duration #103

Open
zhlmi opened this issue Sep 13, 2023 · 1 comment
Open

🐛 [Bug]: ERROR : Keyerror : duration #103

zhlmi opened this issue Sep 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@zhlmi
Copy link

zhlmi commented Sep 13, 2023

What happened?

ERROR : Keyerror : duration

What type of browser are you seeing the problem on?

Chrome

What type of Operating System are you seeing the problem on?

Windows

Python Version

3.10.10

Application Version

v0.1.3

Expected Behavior

There is a duration issue that occurs when reaching the eighth step.

Error Message

No response

Code to produce this issue.

Step 1 _generateScript
Step 2 _generateTempAudio
Step 3 _speedUpAudio
ffmpeg version 6.0-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
[mp3 @ 000001feeb9a0c00] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '.editing_assets/facts_shorts_assets/391f7dea008e4c2ea266b201/temp_audio_path.wav':
  Duration: 00:00:28.27, start: 0.000000, bitrate: 48 kb/s
  Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 48 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '.editing_assets/facts_shorts_assets/391f7dea008e4c2ea266b201/audio_voice.wav':
  Metadata:
    ISFT            : Lavf60.3.100
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 24000 Hz, mono, s16, 384 kb/s
    Metadata:
      encoder         : Lavc60.3.100 pcm_s16le
size=    1325kB time=00:00:28.24 bitrate= 384.3kbits/s speed=1.12e+03x
video:0kB audio:1325kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.005748%
Step 4 _timeCaptions
Detected language: English
100%|████████████████████████████████████████████████████████████████████████| 2827/2827 [00:01<00:00, 1580.83frames/s]
Step 5 _generateImageSearchTerms
Step 6 _generateImageUrls
Search engine queries for images...: 100%|█████████████████████████████████████████████| 17/17 [01:43<00:00,  6.09s/it]
Step 7 _chooseBackgroundMusic
Step 8 _chooseBackgroundVideo
Error   File "J:\ShortGPT\shortgpt\gui\ui_tab_short_automation.py", line 103, in create_short
    for step_num, step_info in shortEngine.makeContent():
  File "J:\ShortGPT\shortgpt\shortGPT\engine\abstract_content_engine.py", line 74, in makeContent
    self.stepDict[currentStep]()
  File "J:\ShortGPT\shortgpt\shortGPT\engine\content_short_engine.py", line 95, in _chooseBackgroundVideo
    self._db_background_video_duration = AssetDatabase.get_asset_duration(
  File "J:\ShortGPT\shortgpt\shortGPT\config\asset_db.py", line 149, in get_asset_duration
    return cls._get_local_asset_duration(key)
  File "J:\ShortGPT\shortgpt\shortGPT\config\asset_db.py", line 244, in _get_local_asset_duration
    if 'duration' not in asset and asset['duration'] is not None:

Screenshots/Assets/Relevant links

No response

@zhlmi zhlmi added the bug Something isn't working label Sep 13, 2023
@jackyin68
Copy link

Is this fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants