Moviepy: suppress ffmpeg warnings in ipython notebook

Created on 15 Nov 2014  Â·  7Comments  Â·  Source: Zulko/moviepy

I'm getting output that looks like what's below when I write a movie file to disk. I've tried setting verbose to false. How can I suppress this?

|####------| 584/1197  48% [elapsed: 00:45 left: 00:47, 12.79 iters/sec]Warning: in file /Users/roda/Documents/REFERENCE/000_ACTIVE/gopro_mountain_biking_footage/02_clips/02_start_race.mp4, 2764800 bytes wanted but 0 bytes read,at frame 247/249, at time 4.12/4.14 sec. Using the last valid frame instead.
|#####-----| 710/1197  59% [elapsed: 00:58 left: 00:40, 12.15 iters/sec]Warning: in file /Users/roda/Documents/REFERENCE/000_ACTIVE/gopro_mountain_biking_footage/02_clips/03_start_of_run.mp4, 2764800 bytes wanted but 0 bytes read,at frame 318/320, at time 5.31/5.33 sec. Using the last valid frame instead.
3rd-party question video

Most helpful comment

I'm having a similar issue, with similar warnings - hoping you might be able to help:

WARNING:py.warnings:/Library/Python/2.7/site-packages/moviepy/video/io/ffmpeg_reader.py:116:     UserWarning: Warning: in file /Users/admin/Sites/repos/ramm1.8/videos/videocliplibrary/0whole/pan-super-detail.mp4, 6220800 bytes wanted but 0 bytes read,at frame 3417/3419, at time 114.01/114.05 sec. Using the last valid frame instead.
  UserWarning)

Is there a recommended codec or particular video export settings that can format the file so that moviepy / ffmpeg likes it?

All 7 comments

I wasn't up to date. I see that the current version has an argument to provide ffmpeg options.

Actually, this did not solve my problem. I tried passing -v 0 and -loglevel quiet but I still get the warning messages above.

These messages come from MoviePy, I'll see what I can do you to make them optional (verbose=False is a bit extreme, maybe I'll add warnings=False), but they are quite important, they tell you that (unless it's mistaken) the last few frames of your videos are corrupted.

I see, that does sound quite important. I don't see any clearly corrupted
frames in the final video. What might be causing the frames to be
corrupted?

On Sat, Nov 15, 2014 at 2:40 AM, Zulko [email protected] wrote:

These messages come from MoviePy, I'll see what I can do you to make them
optional (verbose=False is a bit extreme, maybe I'll add warnings=False),
but they are quite important, they tell you that (unless it's mistaken) the
last few frames of your videos are corrupted.

—
Reply to this email directly or view it on GitHub
https://github.com/Zulko/moviepy/issues/86#issuecomment-63164029.

I don't know, but sometimes ffmpeg cannot read some frames. I noticed that in these cases VLC has troubles too reading the frames so it's not a ffmpeg problem. It happens more often when the video was shooted with a webcam or go-pro.

Most of the time it's just the 2-3 last frames of the video, so it's no big deal. In this case MoviePy just repeats the last valid frame 2-3 times to paliate, it's a 1/10th of a second glitch in the final video.

Yes, this is indeed GoPro footage. This is good to know.

On Sat, Nov 15, 2014 at 7:27 AM, Zulko [email protected] wrote:

I don't know, but sometimes ffmpeg cannot read some frames. I noticed that
in these cases VLC has troubles too reading the frames so it's not a ffmpeg
problem. It happens more often when the video was shooted with a webcam or
go-pro.

Most of the time it's just the 2-3 last frames of the video, so it's no
big deal. In this case MoviePy just repeats the last valid frame 2-3 times
to paliate, it's a 1/10th of a second glitch in the final video.

—
Reply to this email directly or view it on GitHub
https://github.com/Zulko/moviepy/issues/86#issuecomment-63170583.

I'm having a similar issue, with similar warnings - hoping you might be able to help:

WARNING:py.warnings:/Library/Python/2.7/site-packages/moviepy/video/io/ffmpeg_reader.py:116:     UserWarning: Warning: in file /Users/admin/Sites/repos/ramm1.8/videos/videocliplibrary/0whole/pan-super-detail.mp4, 6220800 bytes wanted but 0 bytes read,at frame 3417/3419, at time 114.01/114.05 sec. Using the last valid frame instead.
  UserWarning)

Is there a recommended codec or particular video export settings that can format the file so that moviepy / ffmpeg likes it?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Deng-deng-deng-deng picture Deng-deng-deng-deng  Â·  3Comments

LaoYuanPython picture LaoYuanPython  Â·  3Comments

RahulPrasad picture RahulPrasad  Â·  4Comments

cquintini picture cquintini  Â·  4Comments

tburrows13 picture tburrows13  Â·  3Comments