-
Notifications
You must be signed in to change notification settings - Fork 33
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
Program attempts to load frame that does not exist. #9
Comments
Interesting. This is likely the culprit: Lines 190 to 200 in 6de38a7
I think we need to add -vn -map 0:a:0 so that ffmpeg ignores the video and only picks one audio track.
|
It is odd that, here, |
I am not experiencing this "Error while decoding stream" but am experiencing this bug, so that's not the culprit. How do I make this thing work? Clearly others are using it and not running into this issue. |
It's nothing to do with the audio, it's everything to do with how it's naming and calling the frame files |
it's line 171. At least in the current build at the time of this comment--your post has it as line 105 but it's the same line of code edit: looks like stammer has been updated, this fix is not applicable to the current ver
the match_num+1 part makes it look for a frame file one number above the last one created in the directory. Like, if it extracts 100 frames from the input video, it'll try to copy frame 101 into the output, which doesn't exist, so it's aborted removing the +1 makes it look for frame 0 instead, which also doesn't exist. I fixed this by making it copy frame 1 as frame 0 change lines 169-171 (or wherever it is in your build) to
it's kind of a patchwork thing, it's like duct tape |
Trying to implement this as a quick fix, (as someone who only knows a little python)... If I paste and replace the line quoted above, "Best_matches" isn't defined yet. Also, is the if statement inside the previous if statement? or a separate if statement? |
This comment was marked as outdated.
This comment was marked as outdated.
I have a branch @ #65 (https://github.com/Firepal/stammer/tree/assert_fix_test) which at best attempts to fix the problem, and at worst reports more information when the problem arises. Please try it, and if you get an error, report back here or in the sister issue #62 with the full STAMMER output. Thanks! |
This branch is now merged into main. |
This is my console output:
Separating video frames
copying audio
Error while decoding stream #0:0: Invalid data found when processing input
reading audio
analyzing audio
finding best matches
creating output audio
building output video
Traceback (most recent call last):
File "/Users/myname/Desktop/folder/stammer/stammer.py", line 254, in
main()
File "/Users/myname/Desktop/folder/stammer/stammer.py", line 247, in main
process(carrier_path, modulator_path, output_path)
File "/Users/myname/Desktop/folder/stammer/stammer.py", line 225, in process
build_output_video(frames_dir, outframes_dir, best_matches, 1/frame_length, output_path)
File "/Users/myname/Desktop/folder/stammer/stammer.py", line 105, in build_output_video
shutil.copy(frames_dir / f'frame{match_num+1:06d}.png', outframes_dir / f'frame{i:06d}.png')
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 419, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 256, in copyfile
with open(src, 'rb') as fsrc:
^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'temp/frames/frame017558.png'
It never creates the file frame017558.png when creating frames.
The text was updated successfully, but these errors were encountered: