question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Still crash. ffmpeg_reader.py "bytes wanted but 0 bytes read" "Using the last valid frame instead."

See original GitHub issue

Still crash. But this crash occured when do time_mirror:
crash test code: clip.fx(vfx.time_mirror)

crash result:

WARNING:py.warnings:site-packages\moviepy\video\io\ffmpeg_reader.py:123: UserWarning: Warning: in file C:\65D3.mp4, 608400 bytes wanted but 0 bytes read,at frame 766/766, at time 25.53/25.53 sec. Using the last valid frame instead.


ERROR:root:Traceback (most recent call last):
  File "<frozen myprogram>", line 1910, in <module>
  File "<frozen myprogram>", line 948, in MyProcessClip

  File "site-packages\moviepy\Clip.py", line 212, in fx
  File "<decorator-gen-81>", line 2, in time_mirror
  File "site-packages\moviepy\decorators.py", line 54, in requires_duration
  File "<decorator-gen-80>", line 2, in time_mirror
  File "site-packages\moviepy\decorators.py", line 29, in apply_to_mask
  File "<decorator-gen-79>", line 2, in time_mirror
  File "site-packages\moviepy\decorators.py", line 41, in apply_to_audio
  File "site-packages\moviepy\video\fx\time_mirror.py", line 13, in time_mirror
  File "site-packages\moviepy\Clip.py", line 187, in fl_time
  File "site-packages\moviepy\Clip.py", line 136, in fl
  File "<decorator-gen-61>", line 2, in set_make_frame
  File "site-packages\moviepy\decorators.py", line 14, in outplace
  File "site-packages\moviepy\video\VideoClip.py", line 646, in set_make_frame
  File "<decorator-gen-11>", line 2, in get_frame
  File "site-packages\moviepy\decorators.py", line 89, in wrapper
  File "site-packages\moviepy\Clip.py", line 93, in get_frame
  File "site-packages\moviepy\Clip.py", line 136, in <lambda>
  File "site-packages\moviepy\Clip.py", line 187, in <lambda>
  File "<decorator-gen-11>", line 2, in get_frame
  File "site-packages\moviepy\decorators.py", line 89, in wrapper
  File "site-packages\moviepy\Clip.py", line 93, in get_frame
  File "site-packages\moviepy\video\io\VideoFileClip.py", line 113, in <lambda>
  File "site-packages\moviepy\video\io\ffmpeg_reader.py", line 184, in get_frame
  File "site-packages\moviepy\video\io\ffmpeg_reader.py", line 133, in read_frame
OSError: MoviePy error: failed to read the first frame of video file C:\65D3.mp4. That might mean that the file is corrupted. That may also mean that you are using a deprecated version of FFMPEG. On Ubuntu/Debian for instance the version in the repos is deprecated. Please update to a recent version from the website.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
tburrows13commented, Feb 17, 2021

Yes you can ignore that warning. It just means that moviepy was expecting one extra frame at the end of the video that wasn’t there, so it duplicated the last frame instead. There’s been quite a few changes in this bit of moviepy’s code since 1.0.3 so it might be fixed in 2.0 anyway.

0reactions
cgnerdscommented, Jul 20, 2022

Your video file may be corrupted, you can check it with ffmpeg.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix "some_number bytes wanted, 0 bytes read error on ...
Using the last valid frame instead. I am successfully cropping/lightening/darkening/overlaying my videos, but after a few seconds the video ...
Read more >
moviepy: FTBFS with ffmpeg 5.0 - Debian Bug report logs
... 2764800 bytes wanted but 0 bytes read,at frame 24/25, at time 1.00/1.00 sec. Using the last valid frame instead.
Read more >
OpenShot 2.4.3 video editor online by OffiDocs
OffiDocs launches the most recent OpenShot video editor online included in Ubuntu LTS ... Removing old frames from WorkingCache (when no longer needed)....
Read more >
ffmpeg Documentation
ffmpeg is a very fast video and audio converter that can also grab from a live audio/video source. It can also convert between...
Read more >
API Endpoints — OpenShot Cloud API 2.3.0 documentation
That token can be sent in a header instead of username and password. For clients to authenticate, the token key should be included...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found