hi i am using mac osx with mamp and i was wondering how i can link ffmpeg to php.ini so that i can use it with php exec() ?
the directory that ffmpeg got installed in is /users/sarmenhb/ffmpeg although i wish it didnt get installed here and got installed somewhere more appropriate, i sadly have no clue how to change the system to know where the new location is.
i read a few articles telling me to put something like extensions = /users/sarmenhb/ffmpeg/ffmpeg.so but looking in the directory i dont see a so file. i do see ffmpeg as a console app is that an so file itself?
thanks
ps: i did a test of ffmpeg in console from a flv file to a mp4 file and the audio didnt work on the new file. do i have to install something?
You can use the full path when executing ffmpeg:
exec("/users/sarmenhb/ffmpeg");
Related
I am new to youtube-dl and programming in general so this has been a lot for me to get even this far. So homebrew is installed on my Macbook and homebrew was used to install youtube-dl and ffmpeg. I read somewhere about a configuration file located at ~/.config/youtube-dl/config on
https://github.com/ytdl-org/youtube-dl/blob/master/README.md#options
So on the user directory I opened .config (found out it was hidden) and no youtube-dl folder found let alone the config file mentioned in the link.
Why is that?
How do I make a configuration file to use?
Like written on the Guthub page:
Note that by default configuration file may not exist so you may need to create it yourself.
You can simply create the directory ~/.config/youtube-dl yourself and then use your favorite text editor, place your options in a new file and save it at ~/.config/youtube-dl/config
I'm attempting to open some MP3 files to find their lengths (as part of a larger project). I've installed pydub and ffmpeg has been installed via brew. ffmpeg is available in my path, and typing ffmpeg in a terminal launches it successfully - the audio file I'm referencing is present and I can run ffmpeg -i on it to get information about it. The program can open and play the audio file (using pygame), so I'm sure it's not a file issue.
However, attempting to open any files with AudioSegment leads to 'Couldn't find ffmpeg or avconv - defaulting to ffmpeg but may not work' being displayed, and any attempt to open a file using AudioSegment leads to an exception.
I've tried setting the path to ffmpeg explicitly using AudioSegment.converter - both trying to point to '/usr/local/bin/ffmpeg' and also to the true location (the previous one is a symlink).
from pydub import AudioSegment
AudioSegment.converter = '/usr/local/bin/ffmpeg' # tried with and without
print(len(AudioSegment.from_mp3('mp3_audio.mp3')))
I get FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe': 'ffprobe'
This was hard work to figure out. But here it is.
On Mac, run brew install ffmpeg
Then you need to find where it has written the binary to. It will be buried in /usr/local/Cellar directory and will be based on the version number of the install. In my case it was
/usr/local/Cellar/ffmpeg/4.2.1_2/bin/ffmpeg
You then need to add this path into your Python script as follows
from pydub import AudioSegment
AudioSegment.converter = '/usr/local/Cellar/ffmpeg/4.2.1_2/bin/ffmpeg'
ffmpeg is giving me an error and I couldn't get much help googling it, besides a thread on ffmpeg mailing list dated 5 years ago which doesn't address the exact same problem.
No matter which ffmpeg version or build for windows I use, the error is always:
c:\>ffmpeg.exe
Invalid report file level
I've been using ffmpeg on the same computer for years and I've no idea where the problem started and how to debug it. Any help is welcome.
Notes:
No antivirus is running
ffmpeg.exe is on windows path
I've tried installing ffmpeg with choco install
ffmpeg but it reports the same error.
If the environment variable FFREPORT is set, ffmpeg will parse it to set loglevel for the verbosity of the log report and also its location. What you've encountered is a parse failure of that system variable.
So, either unset it using set FFREPORT= or set it to a different string. See -report under https://ffmpeg.org/ffmpeg.html#Generic-options
I have just downloaded the youtube-dl-2014.07.15.tar_2.gz in my windows. At first I want to tell I don't know anything about python. And I already have installed python 2.7. Can anyone give me instruction to execute these scripts?
I have already tried to run...but there is some error like these. "No mudule named youtube-dl"
I want a fresh start. Now I am using windows 8.1 and I have also tried youtube-dl.exe. And there is also problem like screenshot
If I want to get worked both script and program what will I do?Any helps will be appreciated. If you give me instruction from scratch that will be better.
To install youtube_dl in Python on Windows (command from their github):
Tested with Python 3.9 on Windows 10
pip install --upgrade youtube-dl
Now when using it, notice that the name of the Python module is with an underscore.
Because it is a Python module, use it like so:
py -m youtube_dl <video url>
Of course video url is the video you want to download
This seems to be caused by a limitation of py2exe. You may want to file a youtube-dl bug report for moving to a cxfreeze, which should not have that problem. In any case, simply moving the youtube-dl.exe file into another directory such as C:\Users\Shamim should fix the problem.
you need just to put the youtube-dl.exe file in in your home directory or any other location on your PATH.
You can see your PATH in your "Envirenment Variables"
I am using ubuntu 8.10. I wanted to know what I need to do to get SOX to work on MP4 files.
Yes..sox has support for mp4, m4p, & m4a. They're marked as optional in the pdf manual. Perhaps one has to compile sox from the source files e.g. the sox(version number).tar.gz source package...unpack it using an archive manager, then do something like make, make install, etc... while including the additional option for the mp4 types of files. Checkout the README file in the package to make sure.
Are you sure there's any support in SOX for them? You may have to use a separate encoder/decoder to go to/from mp4.