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

FFmpeg info and commands outputs appear #2387

Open
sanchexas opened this issue Mar 6, 2025 · 1 comment
Open

FFmpeg info and commands outputs appear #2387

sanchexas opened this issue Mar 6, 2025 · 1 comment
Labels
bug Issues that report (apparent) bugs.

Comments

@sanchexas
Copy link

Expected Behavior

The video has been processed successfully, no output to the console, because the logger is set to None.

Actual Behavior

The video has been processed successfully, but FFmpeg outputs appear (info and commands):

{'video_found': True, 'audio_found': False, 'metadata': {'major_brand': 'isom', 'minor_version': '512', 'compatible_brands': 'isomiso2mp41', 'encoder': 'Lavf59.27.100'}, 'inputs': [{'streams': [{'input_number': 0, 'stream_number': 0, 'stream_type': 'video', 'language': None, 'default': True, 'size': [768, 432], 'bitrate': 1835, 'fps': 10.0, 'codec_name': 'mpeg4', 'profile': '(Simple Profile)', 'metadata': {'Metadata': '', 'handler_name': 'VideoHandler', 'vendor_id': '[0][0][0][0]'}}], 'input_number': 0}], 'duration': 17.5, 'bitrate': 1836, 'start': 0.0, 'default_video_input_number': 0, 'default_video_stream_number': 0, 'video_codec_name': 'mpeg4', 'video_profile': '(Simple Profile)', 'video_size': [768, 432], 'video_bitrate': 1835, 'video_fps': 10.0, 'video_duration': 17.5, 'video_n_frames': 175}
/home/user/Desktop/projects/fun/venv/lib/python3.12/site-packages/imageio_ffmpeg/binaries/ffmpeg-linux-x86_64-v7.0.2 -i video.mp4 -loglevel error -f image2pipe -vf scale=768:432 -sws_flags bicubic -pix_fmt rgb24 -vcodec rawvideo

I've been digging through the library code and found two lines that print FFmpeg info and commands in moviepy/video/io/ffmpeg_reader.py file (117 and 139 lines), but at the same time, I didn't find these lines of code in the master branch on GitHub. So, when I commented out these lines of code, everything worked as I needed it to!

Steps and code to Reproduce the Problem

Just trim the video and save the result via this code:

from moviepy.video.io.VideoFileClip import VideoFileClip

input_video_path = "video.mp4"
output_video_path = "output-video.mp4"

start_time = 10
end_time = 12

with VideoFileClip(input_video_path) as video:
    trimmed_video = video.subclipped(start_time, end_time)
    trimmed_video.write_videofile(output_video_path, logger=None)

Used medias

Simple short .mp4 video.

Specifications

  • Python Version: 3.12.3
  • MoviePy Version: 2.1.2
  • Platform Name: Ubuntu
  • Platform Version: 24.04.1 LTS
@sanchexas sanchexas added the bug Issues that report (apparent) bugs. label Mar 6, 2025
@sanchexas sanchexas changed the title FFmpeg info and commands printing FFmpeg info and commands outputs appear Mar 6, 2025
@Pandede
Copy link

Pandede commented Mar 18, 2025

Duplicated issue #2376. This bug is resolved in master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that report (apparent) bugs.
Projects
None yet
Development

No branches or pull requests

2 participants