Author Topic: BUG: CLI does not save  (Read 1185 times)

finmux

  • Newbie
  • *
  • Posts: 5
BUG: CLI does not save
« on: April 03, 2017, 11:56:39 AM »
Avidemux2.6_r2017_03_29_3be36cbe029

  • Make working project with GUI
  • Save it as .py
  • Run it from commandline:
Code: [Select]
/Applications/Avidemux2.6.app/Contents/MacOS/Avidemux2.6.app --output-format mp4 --quit --run project.py --save ./output.mp4
  • Program runs - but no output.mp4

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1535
Re: BUG: CLI does not save
« Reply #1 on: April 03, 2017, 12:14:22 PM »
This definitely works fine on Linux (though using avidemux3_cli makes more sense here, eliminates also the need for --quit). Are you sure you are in a location where you have write permissions? Does

Code: [Select]
/Applications/Avidemux2.6.app/Contents/MacOS/Avidemux2.6.app --output-format mp4 --quit --run project.py --save ~/output.mp4
make any difference?

edit: in other words, are you aware of your location in the terminal? "./output.mp4" places output.mp4 into the current directory, "~/output.mp4" places it into your home directory.
« Last Edit: April 03, 2017, 12:17:11 PM by eumagga0x2a »

finmux

  • Newbie
  • *
  • Posts: 5
Re: BUG: CLI does not save
« Reply #2 on: April 03, 2017, 12:39:50 PM »

Code: [Select]
/Applications/Avidemux2.6.app/Contents/MacOS/Avidemux2.6.app --output-format mp4 --quit --run project.py --save ~/output.mp4
make any difference?


Actually I tried also absolute path. Using tilde - no difference. Weird thing is, the project is very simple and works like a charm, if I push save from GUI.

Does this log say anything useful?

http://peg.gd/czy

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10950
Re: BUG: CLI does not save
« Reply #3 on: April 03, 2017, 12:48:22 PM »
Commands are evaluated from left to right
so
--output-format mp4 --quit --run project.py --save ~/output.mp4

=> quit immediately

Better to use
--output-format mp4  --run project.py --save ~/output.mp4 --quit

No cli on osx by default, due to the way it's packaged

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1535
Re: BUG: CLI does not save
« Reply #4 on: April 03, 2017, 12:53:37 PM »
Oh, I see, thanks. Interesting enough, while the GUI in fact closes immediately, the encoding dialog stays open till the encoding is complete on Linux.

finmux

  • Newbie
  • *
  • Posts: 5
Re: BUG: CLI does not save
« Reply #5 on: April 03, 2017, 02:14:13 PM »
Commands are evaluated from left to right
so
--output-format mp4 --quit --run project.py --save ~/output.mp4

=> quit immediately

Better to use
--output-format mp4  --run project.py --save ~/output.mp4 --quit

No cli on osx by default, due to the way it's packaged

Still no luck. By the way "--quit" does not do anything. GUI has to be closed by hand. Can someone confirm that on mac scripts+cli works? I have tried in two different machines. Last test was on up-to-date Sierra...

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10950
Re: BUG: CLI does not save
« Reply #6 on: April 03, 2017, 02:19:22 PM »
Could you repost the output when you put the parameters in the right order ?
The one provided above exits immediately as expected

finmux

  • Newbie
  • *
  • Posts: 5
Re: BUG: CLI does not save
« Reply #7 on: April 03, 2017, 02:48:38 PM »
Here you go. Different machine. Sierra onboard...

http://peg.gd/czD


eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1535
Re: BUG: CLI does not save
« Reply #8 on: April 03, 2017, 04:10:40 PM »
Looks like no parameters are passed to the application at all.

finmux

  • Newbie
  • *
  • Posts: 5
Re: BUG: CLI does not save
« Reply #9 on: April 03, 2017, 04:15:49 PM »
Looks like no parameters are passed to the application at all.

True indeed. This works:

Code: [Select]
export FONTCONFIG_FILE=/Applications/Avidemux2.6.app/Contents/Resources/fonts/fonts.conf
cd /Applications/Avidemux2.6.app/Contents/Resources/bin
./avidemux --run /Volumes/BIGSTORE3/script.py --save ~/test.mp4

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10950
Re: BUG: CLI does not save
« Reply #10 on: April 03, 2017, 05:15:06 PM »
ah yes , the small shell script that does the trampoline inside the .App does not forward the parameters most probably