INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: C# Encoder Plug-In Sample  (Read 2873 times)

winterminute

  • Junior Woodchuck
  • **
  • Posts: 61
C# Encoder Plug-In Sample
« on: February 08, 2009, 03:26:26 pm »

Does anyone have any sample code for a C# encoder plug-in?  There is C++ sample, but I couldn't find anything for C#.  Also, if I just want to call another EXE by command line, is an encoder plug-in the way to go? I'd like to add WMA pro support.  Obviously, I'm not actually writing the WMA Pro encoder, but calling into the encoder provided by Microsoft.  I could probably use a different type of MC plug-in, but I like the encoder plug-in model because there is a lot you can do with it in regards to Syncing to devices/folders.

Thanks!
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: C# Encoder Plug-In Sample
« Reply #1 on: February 08, 2009, 04:05:25 pm »

If you just want to call an EXE then you can already do this in MC.
Go to choose the encoder and choose external encoder.

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: C# Encoder Plug-In Sample
« Reply #2 on: February 08, 2009, 04:23:17 pm »

Perhaps the JRiver guys would add a few WMA Pro settings if you ask nicely. WMA Pro is an excellent codec for low bitrates (40-128 kbps or so), but it is rarely supported outside Windows software players. There are very few devices that can play WMA Pro. In most cases WMA support means only standard WMA, not WMA Pro or WMA Lossless (which is also a unique format).

In theory you could already tweak one or more of the current WMA encoding options to use WMA Pro. The encoding settings are defined by the XML files in the Plugins > WMAProfiles folder. You would just need to know the correct codes. However, the user interface would not reflect the changes.

EDIT

The external encoder would be "WMCmd.vbs". It becomes available if the free Windows Media Encoder package is installed.

Though, I am not sure how exacly the program path and command line should be formatted. For instance,
cscript "C:\Program Files\Windows Media Components\Encoder\WMCmd.vbs" -input file.wav -output file.wma -a_codec WMA9PRO -a_mode 2 -a_setting Q25_44_2_24
works directly from a CMD window, but I couldn't make it work with MC's External Encoder plugin when tried quickly a couple of different ways to insert the strings.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755
Pages: [1]   Go Up