The Prism command-line tool allows you to convert files from the command line. This can be used to let other software convert files using Prism or to automate batch conversion.Important Note: Due to a limitation in the way Windows handles running graphical programs from the command line, Prism cannot give any feedback when an issued command has been completed, nor can it block the command line while a conversion is taking place. We are currently investigating possible ways to circumvent the Windows problem, but please note it down for now and take it into account when issuing command-line orders to Prism.
The Prism executable is usually located as "C:\Program Files\NCH Software\Prism\prism.exe"
Usage: prism.exe [options] [files to add]
"Options" is where you can issue a series of commands to Prism. The options are:
-convert - convert all files loaded into Prism.
-clear - remove all files loaded into Prism.
-addfolder [FOLDER_NAME] - add a folder of files into Prism.
-format [FORMAT_NAME] - specify the output file format for which to convert the loaded files. Possible format names include:
- 3gp
- asf
- avi
- dv
- flv
- gif
- mkv
- mov
- mp4
- m4v
- mpg
- ogv
- rm
- swf
- webm
- wmv
- divx
- xvid
- amv
- jpg
- png
- "Android 480P"
- "Android 720P"
- "iPhone 3G"
- "iPhone 3GS"
- "iPhone 4"
- "iPhone 4S"
- "iPhone 5/5c"
- "iPhone 5s/6/6P"
- "iPhone 6s/6sP
- "iPhone SE"
- "iPhone 7"
- "iPhone 7 Plus"
- "iPhone 8"
- "iPhone 8 Plus"
- "iPhone X"
- "iPod Classic"
- "iPod Touch 1"
- "iPod Touch 2"
- "iPod Touch 3"
- "iPod Touch 4"
- "iPod Touch 5"
- "iPad 1"
- "iPad 2"
- "iPad 3"
- "iPad 4"
- "iPad Air"
- "iPad Air2"
- "iPad Mini"
- "iPad Mini2/3"
- "iPad Mini4"
- "Nintendo 3DS"
- "PSP"
- "PS Vita"
- "PS3"
- "PS4"
- "PS4 Pro"
- "Xbox 360"
- "Xbox One"
- "Xbox OneX"
- mp3
- wav
-outfolder [FOLDER_NAME] - specify the output folder to store the converted files. Do NOT end the folder path with a backslash '\' character.
-overwrite [OVERWRITE_FLAG] - specifies what to do when the converted file already exists. The flags are "PROMPT" (Prompt for What to Do), "ALWAYS" (Overwrite the File), "NEVER" (Don't Convert the Original File), "CANCEL" (Abort All Conversions), "APPENDNUMBER [format]" (Append number to filename - [format] is optional, if blank it will use the format already specified in Prism).
-settings [FORMAT_NAME] [SETTINGS_OPTIONS] - specifies the settings configuration to use for the specified format. For more detail on what parameters to use, see further down the page.
-edit [RESIZE_TYPE] [WIDTH] [HEIGHT] [FRAMERATE] - specifies the video output options. RESIZE_TYPE - either "NONE", "CROP" or "LETTERBOX". WIDTH and HEIGHT - desired dimensions of the video. FRAMERATE - desired video frame rate (or zero if no frame rate conversion is required).
-effects [EFFECT_NAME] [EFFECT_SETTINGS] – specifies the video effects to be added to the output. Possible effects and options include:
- brightness [VALUE]. [VALUE] is the integer value from the range [-255 to 255].
- contrast [VALUE]. [VALUE] is the integer value from the range [-100 to 100].
- gamma [VALUE]. [VALUE] is the float value from the range [0.10 to 5.00].
- filter [VALUE]. [VALUE] is one of the following: blackandwhite, negative, sepia.
- textcaption [TEXT] [HALIGN] [VALIGN] [SIZE]. [TEXT] is the quoted title or caption for your video. [HALIGN] defines the horizontal alignment of the caption with: left, center or right. [VALIGN] defines the vertical alignment of the caption with: top, center or bottom. [SIZE] sets the text height using an integer value from the range [1 to 72].
- rotate [ANGLE]. [ANGLE] is the integer value defining the rotation of the video using one of the following: 90, 180, or 270.
- flip [FLIP_OPTION]. [FLIP_OPTION] is defined using: horizontal, vertical or both.
- watermark [IMAGE_PATH] [SIZE] [OPACITY] [HALIGN] [VALIGN] [HOFFSET] [VOFFSET]. [IMAGE_PATH] is the quoted absolute path to the watermark image file location. [SIZE] is the integer percent value compared to the output frame [1 to 100]. [OPACITY] is the percent opacity of the image [1 to 100]. [HALIGN] defines the horizontal alignment of the caption with: left, center or right. [VALIGN] defines the vertical alignment of the caption with: top, center or bottom. [HOFFSET] determines the horizontal offset as an integer percent value [0 to 50]. [VOFFSET] determines the vertical offset as an integer percent value [0-50].
- trim [START] [END]. [START] and [END] are the timestamp of the output video start and end markers respectively in milliseconds.
- crop [X1] [Y1] [X2] [Y2]. [X1] sets the left edge of the cropped video in percent [0 to 100]. [Y1] sets the top edge of the cropped video in percent [0 to 100]. [X2] sets the right edge of the cropped video in percent [0 to 100]. [Y2] sets the bottom edge of the cropped video in percent [0 to 100].
-hide - hide the Prism window.
-show - show the Prism window.
-exit - exit Prism.
"Files to Add" is where you type in the files you want to load into Prism. All typed filenames must use the full filepath of the name, and circumfixed with inverted commas.
Examples:
prism.exe -format .mp4
prism.exe -format "iPhone 4"
prism.exe -outfolder "C:\My Videos";
prism.exe -hide
prism.exe "C:\My Documents\video.avi"
prism.exe -effects brightness 50 gamma 1.53 contrast 20
prism.exe -effects filter sepia textcaption "hello from commandline" left top 12 rotate 90 flip both
prism.exe -effects watermark "D:\watermark.png" 50 50 left top 5 6 trim 0 5000 crop 10 10 85 90 noisereduction 0.35 0.33
prism.exe -convert "C:\My Videos\video.avi" -format .mp4 -overwrite ALWAYS
prism.exe -convert "C:\My Videos\video.flv" -format .mpg -overwrite APPENDNUMBER "%filename%-%number%"
prism.exe -convert "DVD:C:\My Videos\Flying Daggers" -settings .mp4 iPod 512 768 23 -overwrite APPENDNUMBER "%filename%-%number%"
prism.exe -convert "DVD:C:\My Videos\Flying Daggers" -format "iPhone 4S" -settings .mp4 H264 512 768 23 -overwrite APPENDNUMBER "%filename%-%number%"
Unless you are in the Prism folder you will need to replace "prism.exe" from above with the full path "C:\Program Files\NCH Software\Prism\prism.exe" like this:
"C:\Program Files\NCH Software\Prism\prism.exe" -convert "C:\My Videos\video.avi" -format .mp4
Settings Options:
The following details what parameters to enter when using the "-settings" options. Note the order in which the parameters are written is the order in which they must be typed. Additionally, all parameters must be entered, otherwise the command will not take effect.
Note the possible combination of values that can be entered depend largely on the codec, so you need to open Prism and determine beforehand what values you can use for the codec in question.
Also note that when converting for preset devices, mp4 is the only supported output format, so please always use .mp4 to set preset device settings.
.avi [VIDEO_ENCODER] [AVERAGE_BITRATE] [MAXIMUM_BITRATE] [QUALITY_RATEFACTOR] [SAMPLE_RATE] [CHANNELS] [SOUND_BITRATE]
- VIDEO_ENCODER - either "MPEG4", "H264", "DVPAL" or "DVNTSC"
- AVERAGE_BITRATE - average bitrate in kbits per sec (ignored when using H264 or DV)
- MAXIMUM_BITRATE - maximum bitrate in kbits per sec (ignored when using H264 or DV)
- QUALITY_RATEFACTOR - quality (ratefactor) in the range 51.0 to 1.0 (only used by H264)
- SAMPLE_RATE - entered in Hz e.g. 8000
- CHANNELS - either 1 or 2
- SOUND_BITRATE - sound bitrate in kbits per sec (ignored when using DV)
Examples:
- -settings .avi MPEG4 768 1000 0.0 44100 2 128
- -settings .avi DVPAL 0 0 0.0 48000 2 0
- -settings .avi H264 0 0 24.0 48000 2 256
.wmv and .asf [VIDEO_ENCODER] [VIDEO_BITRATE] [SOUND_ENCODER_INDEX] [SAMPLE_RATE] [CHANNELS] [SOUND_BITRATE]
- VIDEO_ENCODER - either "WMV8" or "WMV9"
- VIDEO_BITRATE - video bitrate in kbits per sec
- SOUND_ENCODER_INDEX - zero based index of the sound encoder
- SAMPLE_RATE - entered in Hz e.g. 48000
- CHANNELS - either 1 or 2
- SOUND_BITRATE - sound bitrate in kbits per sec
Examples:
- -settings .wmv WMV8 512 1 32000 2 32
- -settings .asf WMV9 1024 2 44100 2 48
.mpg [VIDEO_ENCODER] [AVERAGE_BITRATE] [MAXIMUM_BITRATE] [SAMPLE_RATE] [SOUND_BITRATE]
- VIDEO_ENCODER - either "MPEG2" or "MPEG1"
- AVERAGE_BITRATE - average bitrate in kbits per sec
- MAXIMUM_BITRATE - maximum bitrate in kbits per sec
- SAMPLE_RATE - entered in Hz e.g. 44100
- SOUND_BITRATE - sound bitrate in kbits per sec
Examples:
- -settings .mpg MPEG2 4000 9000 44100 128
.3gp [VIDEO_ENCODER] [AVERAGE_BITRATE] [MAXIMUM_BITRATE] [WIDTH] [HEIGHT] [SOUND_ENCODER] [SOUND_BITRATE]
- VIDEO_ENCODER - either "H263" or "MPEG4"
- AVERAGE_BITRATE - average bitrate in kbits per sec
- MAXIMUM_BITRATE - maximum bitrate in kbits per sec
- WIDTH - desired width of the video (ignored when using MPEG4)
- HEIGHT - desired height of the video (ignored when using MPEG4)
- SOUND_ENCODER - either "AMR" or "AAC"
- SOUND_BITRATE - sound bitrate in kbits per sec
Examples:
- -settings .3gp H263 128 256 176 144 AMR 7.40
- -settings .3gp MPEG4 768 1000 0 0 AAC 64
.mp4 [VIDEO_ENCODER] [AVERAGE_BITRATE] [MAXIMUM_BITRATE] [QUALITY_RATEFACTOR] [SOUND_BITRATE]
- VIDEO_ENCODER - either "H264", "MPEG4" or "PSP" (if converting for preset devices, do not use "MPEG4")
- AVERAGE_BITRATE - average bitrate in kbits per sec (ignored if H264 or PSP)
- MAXIMUM_BITRATE - maximum bitrate in kbits per sec (ignored if H264 or PSP)
- QUALITY_RATEFACTOR - quality (ratefactor) in the range 51.0 to 1.0 (ignored if MPEG4)
- SOUND_BITRATE - sound bitrate in kbits per sec
Examples:
- -settings .mp4 H264 0 0 23.0 32
- -settings .mp4 MPEG4 768 1000 0.0 64
- -settings .mp4 PSP 0 0 18.5 112
.mov [QUALITY_RATEFACTOR] [SOUND_BITRATE]
- QUALITY_RATEFACTOR - Quality (ratefactor) in the range 51.0 to 1.0
- SOUND_BITRATE - sound bitrate in kbits per sec
Examples:
- -settings .mov 23.0 128
- -settings .mov 30.6 64
.flv [VIDEO_ENCODER] [AVERAGE_BITRATE] [MAXIMUM_BITRATE] [QUALITY_RATEFACTOR] [SOUND_BITRATE]
- VIDEO_ENCODER - either "H264" or "FLV1"
- AVERAGE_BITRATE - average bitrate in kbits per sec (ignored if H264)
- MAXIMUM_BITRATE - maximum bitrate in kbits per sec (ignored if H264)
- QUALITY_RATEFACTOR - quality (ratefactor) in the range 51.0 to 1.0 (ignored if FLV1)
- SOUND_BITRATE - sound bitrate in kbits per sec
Examples:
- -settings .flv FLV1 128 256 0.0 32
- -settings .flv H264 0 0 21.0 64