carykh / jumpcutter

Automatically edits vidx. Explanation here: https://www.youtube.com/watch?v=DQ8orIurGxw
MIT License
3.08k stars 541 forks source link

ffmpeg problem #65

Open NKessell opened 5 years ago

NKessell commented 5 years ago

I keep getting this as an error, "'ffmpeg' is not recognized as an internal or external command, operable program or batch file.", I am on Windows 10 also I get the error, "FileNotFoundError: [Errno 2] No such file or directory: 'TEMP/audio.wav'"

could I get some insight into this please?

RANUX commented 5 years ago

Did you install ffmpeg: http://ffmpeg.org/download.html ?

NKessell commented 5 years ago

Did you install ffmpeg: http://ffmpeg.org/download.html ?

yes I have installed that

PLASMAchicken commented 5 years ago

Did you add it to your PATH, meaning that you can open the terminal anywhere and do ffmpeg?

RANUX commented 5 years ago

I recommend you see tutorial: https://windowsloop.com/install-ffmpeg-windows-10/ . Don't forget to reopen Command Prompt after updating PATH variable.

NKessell commented 5 years ago

I recommend you see tutorial: https://windowsloop.com/install-ffmpeg-windows-10/ . Don't forget to reopen Command Prompt after updating PATH variable.

I recommend you see tutorial: https://windowsloop.com/install-ffmpeg-windows-10/ . Don't forget to reopen Command Prompt after updating PATH variable.

okay and will that solve the other problem I was having as well?

RANUX commented 5 years ago

What file name did you pass? Some characters may raise error, like round brackets ( )

NKessell commented 5 years ago

What file name did you pass? Some characters may raise error, like round brackets ( )

I just passed Lec1 thats all also I tried "Lec1" but nothing worked to solve the problem

SreenikethanI commented 5 years ago

okay and will that solve the other problem I was having as well?

Yeah, if you are able to download and execute FFMPEG, then the second error won't occur as well. The second error depends on whether FFMPEG has outputted some things, and if FFMPEG doesn't work/doesn't exist then the second error will come up again.

NKessell commented 5 years ago

okay and will that solve the other problem I was having as well?

Yeah, if you are able to download and execute FFMPEG, then the second error won't occur as well. The second error depends on whether FFMPEG has outputted some things, and if FFMPEG doesn't work/doesn't exist then the second error will come up again.

so theres a problem with ffmpeg? as the errors seem to span from not being able to see the file I am inputing such as it saying that there is no such file or directory.

SreenikethanI commented 5 years ago

Well, the FFMPEG program isn't the issue here... the issue is that you might have not properly placed the FFMPEG.EXE file...

SreenikethanI commented 5 years ago

I guess I wasn't clear before... The root cause of the two errors you received is that, the path of the folder containing the FFMPEG program isn't included in the Environment's PATH variable.

The PATH variable is a type of a thing called as an "Environment variable". The PATH variable stores a list of paths of folders. The purpose is that, any file/folder inside any of those folders in the list can be accessed from anywhere through the Command Prompt. (the best I can explain :D )

Wikipedia article

You need to add the path of the folder containing the FFMPEG.EXE file, to the list (i.e. the PATH variable). Here's a link which helps you do that.

NKessell commented 5 years ago

I guess I wasn't clear before... The root cause of the two errors you received is that, the path of the folder containing the FFMPEG program isn't included in the Environment's PATH variable.

The PATH variable is a type of a thing called as an "Environment variable". The PATH variable stores a list of paths of folders. The purpose is that, any file/folder inside any of those folders in the list can be accessed from anywhere through the Command Prompt. (the best I can explain :D )

Wikipedia article

You need to add the path of the folder containing the FFMPEG.EXE file, to the list (i.e. the PATH variable). Here's a link which helps you do that.

yeah I have already done all of that. my problem now is that I get an error everytime I try input a mp4 video where is says there is no such file or directory

SreenikethanI commented 5 years ago

Oh, I see. I guess then you might've supplied your MP4 file incorrectly. Do you mind sending here the command you tried to execute?

NKessell commented 5 years ago

Oh, I see. I guess then you might've supplied your MP4 file incorrectly. Do you mind sending here the command you tried to execute?

I have another issues posted with what I executed called No file directory in the issues.

SreenikethanI commented 5 years ago

I believe you are referring to this image.

You have made a mistake in the command, which is that you forgot the .MP4 extension on both the input and output file names!!!

This must be your new command: jumpcutter.py --input_file Lec1.MP4 --output_file lec1JC.MP4 --sounded_speed 1 --speed 999999 --frame_margin 2

NKessell commented 5 years ago

I believe you are referring to this image.

You have made a mistake in the command, which is that you forgot the .MP4 extension on both the input and output file names!!!

This must be your new command: jumpcutter.py --input_file Lec1.MP4 --output_file lec1JC.MP4 --sounded_speed 1 -- speed 999999 --frame_margin 2

Nope, I tried that both in caps and not caps but still same problem.

NKessell commented 5 years ago

I believe you are referring to this image. You have made a mistake in the command, which is that you forgot the .MP4 extension on both the input and output file names!!! This must be your new command: jumpcutter.py --input_file Lec1.MP4 --output_file lec1JC.MP4 --sounded_speed 1 -- speed 999999 --frame_margin 2

Nope, I tried that both in caps and not caps but still same problem.

Where do you have your jumpcutter.py and files etc? because it could be where the file is held but I have tried many places as it doesnt work when I place the mp4 by the jumpcutter.py

SreenikethanI commented 5 years ago

I guess I have no clue...

NKessell commented 5 years ago

Thank you anyways for the help. Could it be an administrator problem?

NatoBoram commented 5 years ago

Personally, I would recommend installing ffmpeg through scoop on Windows.

NKessell commented 5 years ago

What is scoop?

NatoBoram commented 5 years ago

Taken from its README.md :

Scoop is a command-line installer for Windows.

Scoop installs programs from the command line with a minimal amount of friction. It tries to eliminate things like :

  • Permission popup windows
  • GUI wizard-style installers
  • Path pollution from installing lots of programs
  • Unexpected side-effects from installing and uninstalling programs
  • The need to find and install dependencies
  • The need to perform extra setup steps to get a working program

Once it's properly installed and configured, installing ffmpeg is as simple as

sudo scoop install -g ffmpeg
PLASMAchicken commented 5 years ago

So you sudo on windows? ( As you said before do **_sudo_** scoop install -g ffmpeg

NatoBoram commented 5 years ago

Of course, let me show you.

  1. In PowerShell, as admin
    iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

This will install Scoop. Windows can't refresh its %PATH% on demand like on Linux, so you have to restart PowerShell or CMD to use the new Scoop installation.

  1. In CMD, as admin
    
    Rem Setup
    scoop install --global git openssh aria2 sudo

Rem Config scoop config aria2-split 16 scoop config aria2-max-connection-per-server 16

Rem Update scoop status scoop update

Rem Buckets scoop bucket add extras scoop bucket add java scoop bucket add games


We would need `sudo` to install programs globally, but since `sudo` isn't installed yet let's install it by running `scoop` in an administrative command prompt. Since Windows can't refresh its `%PATH%`... well, you get the idea. You need to restart CMD or PowerShell to use the new programs.

3. In CMD, as user
```cmd
sudo scoop install --global curl go go-ipfs libreoffice-fresh mediacreationtool nano nodejs python rufus wget neofetch make ffmpeg touch

Scoop will install programs one by one, but you can make it parallel [like that]https://github.com/NatoBoram/FirstRun/blob/master/Windows%2010/Scoop.bat#L26) in an administrative command prompt. I have my own repo with stuff I install often so reinstalling Windows is one scoop away.

NKessell commented 5 years ago

First I would need to remove the path of the one I already have right?