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

Getting Error while Predicting Videos or Live streaming #5

Open
MrFahad opened this issue Dec 23, 2023 · 3 comments
Open

Getting Error while Predicting Videos or Live streaming #5

MrFahad opened this issue Dec 23, 2023 · 3 comments

Comments

@MrFahad
Copy link

MrFahad commented Dec 23, 2023

Hi, Thank you so much for such a nice work.

I have ran the repo successfully and for predicting images it works fine, but wenever i try to predict on videos or live streaming it give me error as under:

output_video / 1.mp4/ model.json not found

please guide me in this regard.

@OMEGAMAX10
Copy link
Owner

Hello, I made a small change in the code, please tell me if the error persists.

@hhenne1
Copy link

hhenne1 commented Feb 17, 2024

hello, i ran into the same/similar problem..

testfile is called "playground swoosh.mp4" (69.0MB)

im running docker-compose and have mapped the whole /yolov8-docker folder to my filesystem to see what its doing..
the upload-function works fine.. it drops the file into the the /yolov8-docker folder.

then it creates /yolov8-docker/output_videos/playground swoosh/playground swoosh_yolov8s_output.json

then it seems to work on it.. it creates /yolov8-docker/temp.mp4 which grows in file size.

when its done it deletes both mp4 files (the temp and the original upload) but does not create/move a final video file and gives the following error:

FileNotFoundError: [Errno 2] No such file or directory: 'output_videos/playground swoosh/playground swoosh_yolov8s_output.mp4'
Traceback:
File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)
File "/yolov8-docker/yolov8-detection-tracking-segmentation-pose.py", line 192, in <module>
    video_bytes = open(video_file_out, 'rb').read()

/yolov8-docker/output_videos/playground swoosh/playground swoosh_yolov8s_output.json persists afterwards

@hhenne1
Copy link

hhenne1 commented Feb 17, 2024

ah, sorry for not thinking about it before i made the post..
when i rename the file to be without a space in its file name, it seems almost as intended.. it creates the file.. moves it to the output-folder and keeps it there after i close it in the webapp.
the json file will also be kept there after closing it in the app.
the only problem i still see is that its encoding the final file in 30fps, even though the input file was 60fps.. so its playing at half speed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants