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 interpets video title as a command line argument when it begins with "-" #2160

Closed
TheSpaceSheep opened this issue Apr 22, 2024 · 1 comment
Labels
bug Issues that report (apparent) bugs.

Comments

@TheSpaceSheep
Copy link

TheSpaceSheep commented Apr 22, 2024

Minimal reproducible example :

from moviepy.editor import *
clip = ColorClip((640, 480), color=(0, 0, 0), duration=5)
clip.write_videofile("-filenamethatbeginswith-.webm", fps=24)

Expected Behavior

write to a video file with name "-filenamethatbeginswith-.webm"

Actual Behavior

The following exception occurs (my interpretation is that a video file starting with "-" is interpreted as a command line argument for ffmpeg)

MoviePy error: FFMPEG encountered the following error while writing fil
e -myHolidays_edited.webm:

 b"Unrecognized option 'myHolidays_edited.webm'.\nError splitting the a
rgument list: Option not found\n"

Specifications

  • Python Version: 3.11
  • MoviePy Version: 1.0.3
  • Platform Name: Linux
  • Platform Version: 6.8.7-arch1-1

I will try to fix it myself !

@TheSpaceSheep TheSpaceSheep added the bug Issues that report (apparent) bugs. label Apr 22, 2024
OsaAjani pushed a commit to OsaAjani/moviepy that referenced this issue Dec 5, 2024
…rting with a dash and improved for filenames with specialchars
OsaAjani added a commit that referenced this issue Jan 3, 2025
Fix issue #2160 based on PR #2163 relative to filenames starting with…
@OsaAjani
Copy link
Collaborator

OsaAjani commented Jan 3, 2025

Fixed by #2282

@OsaAjani OsaAjani closed this as completed Jan 3, 2025
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

Successfully merging a pull request may close this issue.

2 participants