Command line mode

Bug report and feature request
Post Reply
fluor
Amateur
Amateur
Posts: 16
Joined: Sat Aug 19, 2006 6:00 am

Command line mode

Post by fluor » Sat Aug 19, 2006 10:35 pm

I wish for the following:

Being able to type on command-line:

"C:\Program Files\MediaCoder\mediacoder.exe" -preset MyPreset.xml c:\temp\input.mpg c:\temp\output.avi

Then mediacoder starts up and do the job and then closes again. output.avi and input.avi is in same folder. Actually, it would be nice if the GUI also had an option for saving in current folder (same folder as input). And then maybe have an option for renaming input to input_original or just an option for "create unique output filename" so the input.avi is still present and the resulting output is input2.avi (new file).

I would at the same time also ask for the possibility to preserve filedate, because dates are important for me when storing family movies from my camera.. E.g. from the Canon MJPG AVI: Mastered date : UTC 2006-08-04 19:38:53

stanley
Site Admin
Site Admin
Posts: 4135
Joined: Mon May 15, 2006 7:43 pm
Location: Sydney

Post by stanley » Sun Aug 20, 2006 12:27 am

Good suggestions!
When things work together, things work.

Calypso
Amateur
Amateur
Posts: 10
Joined: Mon Sep 04, 2006 7:15 am
Contact:

Post by Calypso » Tue Sep 05, 2006 4:47 pm

I would be interested in having a command line interface as well. :)
~ calypso

everling
Amateur
Amateur
Posts: 48
Joined: Sat Jul 22, 2006 9:39 pm

Post by everling » Mon Sep 11, 2006 4:30 pm

In my case, I use MediaCoder to provide me with the commandline templates, modify them (commandline knowledge required) and paste them in a '.bat' file. I would then execute the '.bat' file.

I did this because an older version of MediaCoder had some problems with a source of mine, and I had to hand-tweak the commands to get it right.

stanley
Site Admin
Site Admin
Posts: 4135
Joined: Mon May 15, 2006 7:43 pm
Location: Sydney

Post by stanley » Mon Sep 11, 2006 4:56 pm

Maybe u should contribute your modification.
When things work together, things work.

everling
Amateur
Amateur
Posts: 48
Joined: Sat Jul 22, 2006 9:39 pm

Post by everling » Thu Sep 14, 2006 1:41 am

I didn't modify your code. I use MediaCoder to generate the commandlines, copy out the commandlines, modify the copied commandlines and execute them via a batch file.



An example of my batch file to create a movie length, x264 + Vorbis, MKV container.

Warning, the x264 settings here can take a good 20+ hours on an AMD X2 3800+. Read the mencoder manual for information on how to modify the settings by hand.

Code: Select all

mplayer "C:\VTS_01_1.VOB" -vc null -vo null -ao pcm:fast:file=C:\audio.wav

oggenc2.exe -q 2 C:\audio.wav -o C:\audio.ogg

mencoder.exe "C:\VTS_01_1.VOB" -ofps 24000/1001 -passlogfile "C:\pass.log" -vf pullup,crop=720:448:0:12,softskip,harddup -ovc x264 -x264encopts qcomp=0.70:dct_decimate:bframes=16:keyint=250:keyint_min=25:frame
ref=12:qp_min=10:qp_max=51:qp_step=8:qp_constant=21:cabac:direct_
pred=3:weight_b:i4x4:i8x8:b8x8mv:8x8mv:4x4mv:8x8dct:mixed_refs:b_
pyramid:brdo:trellis=2:bime:fast_pskip:threads=2:pass=1:turbo=1:psnr:
nr=100 -oac pcm -channels 1 -srate 4000 -o NUL

mencoder.exe "C:\VTS_01_1.VOB" -ofps 24000/1001 -passlogfile "C:\pass.log" -vf pullup,crop=720:448:0:12,softskip,harddup -ovc x264 -x264encopts qcomp=0.70:dct_decimate:bframes=16:keyint=250:keyint_min=25:frame
ref=12:qp_min=10:qp_max=51:qp_step=8:qp_constant=21:cabac:direct_
pred=3:weight_b:i4x4:i8x8:b8x8mv:8x8mv:4x4mv:8x8dct:mixed_refs:b_
pyramid:brdo:trellis=2:bime:fast_pskip:threads=2:me=3:me_range=16:s
ubq=7:pass=3:bitrate=800:psnr:nr=100 -oac pcm -channels 1 -srate 4000 -o "C:\video a.avi"

mencoder.exe "C:\VTS_01_1.VOB" -ofps 24000/1001 -passlogfile "C:\pass.log" -vf pullup,crop=720:448:0:12,softskip,harddup -ovc x264 -x264encopts qcomp=0.70:dct_decimate:bframes=16:keyint=250:keyint_min=25:frame
ref=12:qp_min=10:qp_max=51:qp_step=8:qp_constant=21:cabac:direct_
pred=3:weight_b:i4x4:i8x8:b8x8mv:8x8mv:4x4mv:8x8dct:mixed_refs:b_
pyramid:brdo:trellis=2:bime:fast_pskip:threads=2:me=3:me_range=16:s
ubq=7:pass=3:bitrate=800:psnr:nr=100 -oac pcm -channels 1 -srate 4000 -o "C:\video b.avi"

mkvmerge.exe -d 0 -A --engage allow_avc_in_vfw_mode --aspect-ratio 0:1.90625 "C:\video b.avi" "C:\audio.ogg" -o "C:\video.mkv"

pause
The "pause" is so that you can see what has happened during the encoding. Otherwise the window may automatically close once the job is done.

I also use the PSNR option so that I may know the quality of the encodes.

It create two AVIs in both the second and third pass of the x264. You can remove the second pass video output if you like or don't have the space for it. I used it because I am still learning to use x264 encoding and I would like to see the differences between the second and third pass.

agidius
Beginner
Beginner
Posts: 1
Joined: Fri Oct 06, 2006 6:28 pm
Location: Houston, TX

Post by agidius » Fri Oct 06, 2006 6:36 pm

command line would be great!!!

something like "mediacoder transcode c:\before\video.mpg c:\after\"
it then uses all the settings that are already in there.

-OR-

if we are already using the settings already set in the program, what about simply "mediacoder c:\before\video.mpg"
then it goes along and does its thing.

the second option would probably support transcoding by simple drag-n-drop.
could put a switch in the settings for if drag-n-drop automatically transcodes and closes, or does like it does now and simply puts the dropped file in the list.

binary64
Beginner
Beginner
Posts: 1
Joined: Tue Oct 17, 2006 3:07 am

Post by binary64 » Tue Oct 17, 2006 3:09 am

Command line (or .net api!) direct to MediaCoder would be great (to execute profiles eg AVI to DVD). Don't forget ERRORLEVEL support ;)

stanley
Site Admin
Site Admin
Posts: 4135
Joined: Mon May 15, 2006 7:43 pm
Location: Sydney

Post by stanley » Tue Oct 17, 2006 4:21 pm

When things work together, things work.

Post Reply