Giter VIP home page Giter VIP logo

ffmpegwrapper's People

Contributors

gcollazo avatar interru avatar lxylxy123456 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ffmpegwrapper's Issues

ffmpegwrapper fails to process files which starts with '-'

from ffmpegwrapper import FFmpeg, Input, Output
When running FFmpeg('ffmpeg', Input('a.mp4'), Output('-b.mp4')), ffmpeg gives "Unrecognized option 'b.mp4'."
It seems that the command becomes ffmpeg -i a.mp4 -b.mp4
But the command should be ffmpeg -i a.mp4 -- -b.mp4 to prevent the issue (by adding --).

OSError: [Errno 24] Too many open files

Hi,

I am trying to convert quite a lot of m4a files into mp3 files with the following piece of code:

for root,dirs,files in os.walk("/Users/jonathan/Desktop/Music1"): 
    for file1 in files:
        if file1[len(file1)-3:len(file1)] == "m4a":
            input1 = Input("/Users/jonathan/Desktop/Music1/"+file1)
            codec = AudioCodec("libmp3lame")
            output = Output("/Users/jonathan/Desktop/MP3/"+file1[0:len(file1)-3]+"mp3", codec) #replace the path
            ffmpeg = FFmpeg("ffmpeg", input1, output)
            ffmpeg.run()

It works fine until a certain point, when it crashes and shows the following message:
Traceback (most recent call last): File "antomp3.py", line 18, in <module> ffmpeg.run() File "/Users/jonathan/anaconda/lib/python2.7/site-packages/ffmpegwrapper-0.1_dev-py2.7.egg/ffmpegwrapper/ffmpeg.py", line 158, in run return FFmpegProcess(self).run() File "/Users/jonathan/anaconda/lib/python2.7/site-packages/ffmpegwrapper-0.1_dev-py2.7.egg/ffmpegwrapper/ffmpeg.py", line 97, in run stdin=PIPE, stdout=PIPE, stderr=STDOUT) File "/Users/jonathan/anaconda/lib/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/Users/jonathan/anaconda/lib/python2.7/subprocess.py", line 1197, in _execute_child errpipe_read, errpipe_write = self.pipe_cloexec() File "/Users/jonathan/anaconda/lib/python2.7/subprocess.py", line 1153, in pipe_cloexec r, w = os.pipe() OSError: [Errno 24] Too many open files

I've been reading about this error message on the web and it seems that it is a problem of not closing the files opened through Popen(). Can you help me fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.