Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: digital0 on April 15, 2013, 01:54:38 PM

Title: avidemux3_cli syntax
Post by: digital0 on April 15, 2013, 01:54:38 PM
I used the following to convert files: avidemux2_cli --video-codec X264 --load file.avi --save tmp.avi
Now I try the same parameters with avidemux3_cli, but it just copies both audio and video streams. How do I convert video?
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 15, 2013, 03:21:16 PM
something in line like this:  without the append, if you only load 1 piece (http://www.avidemux.org/smf/index.php/topic,12009.msg62667.html#msg62667)
Title: Re: avidemux3_cli syntax
Post by: digital0 on April 15, 2013, 03:39:08 PM
Didn't work. avidemux3_cli  --load DSCF1133.AVI --audio-codec copy  --save video.vob  --output-format PS --video-codec mpeg2enc
finished in a few seconds (file is 69 MB) and it did a copy:
$ file DSCF1133.AVI video.vob
DSCF1133.AVI: RIFF (little-endian) data, AVI, 1280 x 720, ~24 fps, video: Motion JPEG, audio: uncompressed PCM (stereo, 48000 Hz)
video.vob:    RIFF (little-endian) data, AVI, 1280 x 720, ~24 fps, video: Motion JPEG, audio: uncompressed PCM (stereo, 48000 Hz)

BTW, Avidemux v2.6.1.
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 15, 2013, 04:25:50 PM
try with 2.6.3 and replace _cli by avidemux GUI would be in linux /usr/bin/avidemux3_qt4 and you would have installed following debs in this order:
avidemux3-core-2.6.3-8580-Linux
avidemux3-plugins-COMMON-2.6.3-8580-Linux
avidemux3-qt4-2.6.3-8580-Linux
avidemux3-plugins-QT4-2.6.3-8580-Linux
avidemux3-cli-2.6.3-8580-Linux
Title: Re: avidemux3_cli syntax
Post by: digital0 on April 15, 2013, 07:05:09 PM
I use Fedora. Updated to 2.6.3-1.fc18 from rpmfusion, tried to use avidemux3_qt4 instead of cli - still the same, video stream is an exact copy of original.
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 16, 2013, 07:13:52 AM
if fedora 17 32-bit try this one: http://avidemux.org/nightly/fedora17_32/ should be up to r8581 and update during the night likely to r8590.
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 16, 2013, 08:41:18 AM
Looks like something broke in passing switches from command line?
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 16, 2013, 09:00:57 AM
Done some more testing, only way I get it to work is with --run and avidemux3_qt4
demo loaded video to avc in avi container
/usr/bin/avidemux3_qt4  --load /media/1Processed/Demo/AspectRatioTest.ts --run ~/Videos/test.py --save ~/Videos/TestVideo
video to load included the path to it: /media/1Processed/Demo/AspectRatioTest.ts
avidemux settings and path to it: ~/Videos/test.py             where the ~/ would take you current users Home.
output video: --save ~/Videos/TestVideo
Title: Re: avidemux3_cli syntax
Post by: mit on April 16, 2013, 10:01:06 AM
Confirm: avidemux3_cli encoding, not working with any codecs via command line.Problem dosn't exist, when run a script or GUI-mod. [r8568]
Title: Re: avidemux3_cli syntax
Post by: mean on April 16, 2013, 06:17:17 PM
I'm having problem reproducing the issue
Anything that could trigger it ?
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 16, 2013, 06:48:34 PM
if you have mpeg-ts SD stream, has mpeg video and encode to x264 on cli you would still end up with a mpeg encoded video.
It functions but the fps give away it is only copying (over 1000 fps) and not encoding (100 fps)
used mpeg-ts: 10 mb download =  AspectRatioTest.ts (http://rapidshare.com/files/502746850/AspectRatioTest.ts)
and previously posted py to run: test.py (http://www.avidemux.org/smf/index.php?action=dlattach;topic=12034.0;attach=1054)
with all 3 files in user's home Video ~/Videos (http://~/Videos)
works:
/usr/bin/avidemux3_qt4  --load ~/Videos/AspectRatioTest.ts --run ~/Videos/test.py --save ~/Videos/TestVideo
not working, only copying
/usr/bin/avidemux3_cli  --load ~/Videos/AspectRatioTest.ts --run ~/Videos/test.py --save ~/Videos/TestVideo
Title: Re: avidemux3_cli syntax
Post by: mean on April 16, 2013, 07:09:01 PM
Works here
avidemux3_cli  --load ~/Downloads/AspectRatioTest.ts  --run ~/Downloads/test.py  --save /tmp/x.y --quit >& /tmp/log
file /tmp/x.y
/tmp/x.y: RIFF (little-endian) data, AVI, 720 x 576, 25.00 fps, video: H.264 X.264 or H.264, audio: MPEG-1 Layer 1 or 2 (stereo, 48000 Hz)
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 16, 2013, 07:17:26 PM
cli produces 9.4 mb avi: /tmp/x.y: RIFF (little-endian) data, AVI, 720 x 576, 25.00 fps, video:, audio: MPEG-1 Layer 1 or 2 (stereo, 48000 Hz)
qt produces 3.7 mb avi: /tmp/x.y: RIFF (little-endian) data, AVI, 720 x 576, 25.00 fps, video: H.264 X.264 or H.264, audio: MPEG-1 Layer 1 or 2 (stereo, 48000 Hz)
12 mb download (http://rapidshare.com/files/3456742273/cliVersusQT4.7z) <- click here cli.log + qt4.log + avi result for each.
12.04 ubuntu lts 64-bit. Could internationalization play part in this? complains in cli about x264
line 172: /usr/lib/ADM_plugins6/videoEncoders/libADM_ve_x264_qt4.so:WrongUI
line 186:  [tryLoadingVideoFilterPlugin]  ==> wrong UI
some more follow
cli:  [ADM_vf_plugin] Scanning done, found 36 video filer(s)
qt4: [ADM_vf_plugin] Scanning done, found 51 video filer(s)

cli:
line 438:  [setVideoCodec]  No such encoder :x264





Title: Re: avidemux3_cli syntax
Post by: mit on April 16, 2013, 08:34:14 PM
Both variants works to me.But when exclude script, and specify any codec in command line, only copying produces.
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 16, 2013, 08:40:19 PM
Weird, hope logs give insight. Have you installed x264 by building your self or just using default form your OS or none?
Title: Re: avidemux3_cli syntax
Post by: mit on April 16, 2013, 08:57:04 PM
x264 is installed from repository,but command line. don't accept any other codecs.
I've ttaching a logs. ââ,¬Å¾log_commandsââ,¬Å¾ is without script.
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 17, 2013, 06:45:17 AM
did uninstall vlc x264 build with stock 12.04.2 x264 64-bit
x264 --ver
x264: option '--ver' is ambiguous; possibilities: '--version' '--verbose'
jan@jan-MS-7680:~$ x264 --version
x264 0.120.2151 a3f4407
(libswscale 2.1.0)
(libavformat 53.20.0)
(ffmpegsource 2.17.0.0)
built on Feb 15 2012, gcc: 4.6.2
configuration: --bit-depth=8 --chroma-format=all
x264 license: GPL version 2 or later
libswscale/libavformat/ffmpegsource license: GPL version 2 or later

only avidemux3_qt4 encodes with x264
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 17, 2013, 07:36:16 AM
Part of the problem maybe specific for ubuntu amd-64bit?
cli works only with above script when avidemux3-plugins-CLI-2.6.3 is installed.
That is now the problem I can only install these combinations:
avidemux3-plugins-COMMON-2.6.3-8590-Linux with avidemux3-plugins-QT4-2.6.3-8590-Linux
or
avidemux3-plugins-COMMON-2.6.3-8590-Linux with avidemux3-plugins-CLI-2.6.3-8590-Linux
and not:
avidemux3-plugins-COMMON-2.6.3-8590-Linux avidemux3-plugins-QT4-2.6.3-8590-Linux avidemux3-plugins-CLI-2.6.3-8590-Linux together.

Package operation failed:
Selecting previously unselected package avidemux3-plugins-cli.
(Reading database ...
(Reading database ... 5%
...
(Reading database ... 100%
(Reading database ... 224435 files and directories currently installed.)
Unpacking avidemux3-plugins-cli (from .../avidemux3-plugins-CLI-2.6.3-8590-Linux.deb) ...
dpkg: error processing /media/Install/source/avidemux_2.6_branch_mean/debs/avidemux3-plugins-CLI-2.6.3-8590-Linux.deb (--install):
trying to overwrite '/usr/lib/ADM_plugins6/pluginSettings/x264/1/iPhone.json', which is also in package avidemux3-plugins-qt4 2.6.3-8590


Perhaps developer(s) see a way out of this dilemma.
I never known it otherwise since building on 11.10 64-bit when i started using avidemux and did report so then.
iPhone.json PSP.json are these the same for all plugins, if so can installation of these two be moved to the installation of avidemux3-plugins-COMMON only and not to the avidemux3-plugins-CLI or avidemux3-plugins-qt4 so avoiding the issue. I know: is only user thinking :(
HELP !!!! ;)
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 17, 2013, 07:47:21 AM
physically moving iPhone.json and PSP.json to another location and then installing avidemux3-plugins-CLI-2.6.3-8590-Linux does not work, database thinks these are still there:
Package operation still complains:
Reading database ...
(Reading database ... 5%
...
(Reading database ... 100%
(Reading database ... 224435 files and directories currently installed.)
Unpacking avidemux3-plugins-cli (from .../avidemux3-plugins-CLI-2.6.3-8590-Linux.deb) ...
dpkg: error processing /media/Install/source/avidemux_2.6_branch_mean/debs/avidemux3-plugins-CLI-2.6.3-8590-Linux.deb (--install):
trying to overwrite '/usr/lib/ADM_plugins6/pluginSettings/x264/1/iPhone.json', which is also in package avidemux3-plugins-qt4 2.6.3-8590
Errors were encountered while processing:
/media/Install/source/avidemux_2.6_branch_mean/debs/avidemux3-plugins-CLI-2.6.3-8590-Linux.deb
Title: Re: avidemux3_cli syntax
Post by: mean on April 17, 2013, 08:23:11 AM
It is due to the conflicting file (PSP.json etc...)
I'm moving them to a specific new package (XXX-SETTINGS.deb), that will solve the problem
Should be done tonight or tomorrow
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 17, 2013, 08:36:15 AM
looking forward :)
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 17, 2013, 06:53:37 PM
building 12.04 64-bit r8592 went fine, as did the install. Report later back on testing
avidemux3-core-2.6.3-8592-Linux
avidemux3-plugins-COMMON-2.6.3-8592-Linux
avidemux3-qt4-2.6.3-8592-Linux
avidemux3-plugins-QT4-2.6.3-8592-Linux
avidemux3-cli-2.6.3-8592-Linux
avidemux3-plugins-CLI-2.6.3-8592-Linux
avidemux3-plugins-SETTINGS-2.6.3-8592-Linux
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 17, 2013, 07:12:04 PM
@mean: Scripting with avidemux3_cli and avidemux3_qt4 are now working and encoding!

@Mit: if you can provide a command line that is not working wit set parameters: could do some testing tomorrow.
Title: Re: avidemux3_cli syntax
Post by: mit on April 17, 2013, 08:40:40 PM
Command line from your post, just replaced script with  any video codec.
/usr/bin/avidemux3_cli  --load ~/Videos/AspectRatioTest.ts --video-codec x264  --save ~/Videos/TestVideo --quit
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 18, 2013, 07:49:40 AM
r8592
none of the --video-codec are picked up from the command line?
/usr/bin/avidemux3_cli --load ~/Videos/AspectRatioTest.ts --video-codec x264  --save ~/Videos/TestVideo --quit
/usr/bin/avidemux3_qt4 --load ~/Videos/AspectRatioTest.ts --video-codec x264  --save ~/Videos/TestVideo --quit
this just performs a straight copy.
Can't see the Wood for the Trees, let see what developer(s) tells?
Title: Re: avidemux3_cli syntax
Post by: digital0 on April 18, 2013, 03:54:56 PM
I cannot find avidemux3_cli in any of the rpms from http://avidemux.org/nightly/fedora17_32/.
So does it work now? If it does, which commit/patch fixes avidemux3_cli, so that I can apply to rpmfusion avidemux src rpm and rebuild?
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 18, 2013, 07:08:01 PM
avidemux3_cli are not included in nightly?
install these:
1 avidemux3-core-2.6.0_r8594.i686.rpm
2 avidemux3-plugins-COMMON-2.6.3-8594.i386.rpm
3 avidemux3-qt4-2.6.3-8594.i386.rpm
4 avidemux3-plugins-QT4-2.6.3-8594.i386.rpm
5 avidemux3-plugins-SETTINGS-2.6.3-8594.i386.rpm

Use avidemux3_qt4 instead with --run something.py as mentioned before and in some other threads.
Title: Re: avidemux3_cli syntax
Post by: digital0 on April 18, 2013, 07:47:14 PM
I want to use cli because I use it from scripts (I don't want gui to launch a hundred times from a script). I'd like to be able not to use py script too.
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 19, 2013, 06:49:15 AM
In this case looks like you have to build yourself for your OS, cli's are currently not included in nightly builds by developers. and --nogui is not working.

the build linux pages in wiki are currently not there?

approx something like this ubuntu 12.04 not make necessary changes for fedora 17:

dependencies and so on:
sudo apt-get install build-essential cmake fakeroot g++ gcc gettext liba52-0.7.4-dev libaften-dev libasound2-dev libasound2-dbg libdca-dev libdts-dev libfaac-dev libfaad-dev libfribidi-dev libglib2.0-dev libglib2.0-0-dbg libmad0-dev libmp3lame-dev libpng12-dev libqt4-dev libqt4-dbg libqt4-opengl-dev libqt4-script libqt4-script-dbg libsamplerate0-dev libsdl-sound1.2-dev libsqlite3-dev libsqlite3-0-dbg libtwolame-dev vdpauinfo libvdpau-dev libvorbis-dev libvorbis-dbg libx264-dev libxml2-dev libxml2-dbg libxv-dev libxv1-dbg libxvmc1-dbg libxvidcore-dev libopencore-amrwb-dev libopencore-amrwb0-dbg libopencore-amrnb-dev libopencore-amrnb0-dbg libvpx-dev libvpx1-dbg pkg-config subversion yasm libxslt1-dbg libzip-dev xsltproc libass-dev libfreetype6-dev

get source with svn:
cd ~/ ## or wherever you want to get the source file
svn co svn://svn.berlios.de/avidemux/branches/avidemux_2.6_branch_mean ## get source
cd ~/avidemux_2.6_branch_mean ## or where you did put the source files
bash bootStrap.bash --rpm --with-qt4 --without-gtk --with-cli ## create binaries
Title: avidemux3_cli syntax fixed
Post by: Jan Gruuthuse on April 19, 2013, 06:53:06 AM
FIXED r8596 passing on of --video-codec to avidemux3_cli
avidemux3_qt4 --nogui not functioning

Quote from: Jan Gruuthuse on April 18, 2013, 07:49:40 AM
r8592
none of the --video-codec are picked up from the command line?
/usr/bin/avidemux3_cli --load ~/Videos/AspectRatioTest.ts --video-codec x264  --save ~/Videos/TestVideo --quit
/usr/bin/avidemux3_qt4 --load ~/Videos/AspectRatioTest.ts --video-codec x264  --save ~/Videos/TestVideo --quit
this just performs a straight copy.
Can't see the Wood for the Trees, let see what developer(s) tells?
Title: Re: avidemux3_cli syntax
Post by: mit on April 19, 2013, 07:01:39 AM
Hi!I've tested r8595 snapshot, and --video-codec argument works here (avidemux3_cli), but --audio-codec not affected.
Also, i do not know if this is wrong, but XviD codec, is determined as DivX (in output file).
Sorry for my bad English!
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 19, 2013, 07:33:57 AM
You did beat me to it :( :
--audio-codec is indeed not picked up by avidemux3_cli.
xvid =  opensource, divx = proprietary software. source: xvid (http://en.wikipedia.org/wiki/Xvid)

attached small test loop.sh for _cli, please post if you make improvements to this
Title: Re: avidemux3_cli syntax
Post by: mit on April 19, 2013, 08:38:48 AM
I do not understand what you mean with:
for h in "${AVIDEMUX[@]}"
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 19, 2013, 08:52:46 AM
Did used that one to load from array AVIDEMUX avidemux_cli or avidemux_qt4, and forgot to delete  :-[ this extra loop.
loop was faster when having 2 command lines 1 cli other qt4. Attached corrected loop.sh
Title: Re: avidemux3_cli syntax
Post by: mit on April 19, 2013, 04:10:25 PM
Probably one more issue: Vorbis codec have not, or wrong determined, i think.
By the way, i have strange colors with VP8 Demuxer.For example:
Avidemux image (http://i023.radikal.ru/1304/37/026482891efd.jpg)    Original image (http://i024.radikal.ru/1304/d6/53b01dd49415.png)
Title: Re: avidemux3_cli syntax
Post by: Jan Gruuthuse on April 19, 2013, 06:15:42 PM
never know other wise with colorshift in vp8?
Remedy: Video Filter: Colors: Swap UV: Preview Play (https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fwww.avidemux.org%2FadmWiki%2Flib%2Fexe%2Ffetch.php%3Fmedia%3Dusing%3Aoutput-qt.png&hash=490ba8a6d3adaf40c6255019b0d5cc148be0fe52): should show when playing if successful.
Disadvantage not working in video copy.
Perhaps dev(s) can solve this!