Using VidCoder in C#

May 27, 2013 at 7:54 AM
Hello,
How do I use VidCoder API in c# for converting flv to mp4? I've tried using the handbrake interop but it seems difficult to use. Is there a simpler way via Vidcoder?

Here's my try on Handbrake interop :
http://stackoverflow.com/questions/16762527/getting-handbrake-encoder-to-work

Thanks
Coordinator
May 27, 2013 at 6:50 PM
It seems difficult to use because it is. :P I've left you an answer on your StackOverflow question. (VidCoder uses HandBrakeInterop as well)
May 27, 2013 at 7:41 PM
Hi,
Thank you so much! Never expected a working sample project download on SO. Thank you for all your work on VidCoder and thanks for giving a big hand. The pipe/queue implementation, serializing the preset xml directly is much better than the raw handbrake preset xml.Vidcoder xml is what I used in my sample. I've recommended VidCoder on the handbrake forum.

Please add some API support to Vidcoder if possible in future. btw, which tool did you use to make the portable VidCoder into a single exe without any dll dependencies?

Thanks.
Coordinator
May 27, 2013 at 8:14 PM
Thanks!

What kinds of APIs would you want to see in VidCoder?

For the portable version I used WinRar with the -sfx option. That makes an archive that extracts itself to a temporary folder, runs the program and cleans itself up on exit. You can see the arguments I passed into it in build.ps1 in the root directory of the source.
May 28, 2013 at 11:42 AM
Edited May 28, 2013 at 11:47 AM
Just general Queing and Encoding API's would be nice. It will be very useful for encoding on servers like zeencoder.com and for youtube. Out of the box support for Asynchronous encoding/Synchronous encoding will be good.

The API user wouldn't have to worry about how it works underneath the hoods. They can simply use this API and they would have access to a beautifully multi threaded queue system which works using the planned architecture that you've made.

Existing UI translated into API would be like VidCoder.AddToQueue,RemoveFromQueue,StartEncoding,StopEncoding,

VidCoder.ShutDownPcAfterEncoding=true;

and a VidCoder.Dispose() for a clean shutdown after usage.

Thanks
Coordinator
May 28, 2013 at 5:24 PM
Okay so extract the queuing and process isolation? Do you have a project in mind that would use it?
Jun 26, 2013 at 3:35 PM
I'd like to second this request for some sort of API if possible. Just something as simple as some command line arguments would work. I use a media manager, and it would be nice to queue files to be encoded from within the media manger to take along with me on my portable devices. The media manager has access to more metadata about the file so it would be nice to be able to name the transcoded files better.
Coordinator
Jun 27, 2013 at 1:59 AM
So you want the API to be a command line? Would it launch VidCoder's GUI to track the encode? Would you be happy with using the standard batch settings to auto-pick audio and subtitle tracks?

And is specifying encode settings something you'd want or is referencing a preset name enough?
Jun 27, 2013 at 2:26 AM
The command line might not be the cleanest way, but I would think it would be easier to implement, and my app is in Python, so again a simpler interface between the two, IMO.

Yes, it would be ideal to launch the VidCoder GUI (if not already running), add the specified file to the queue, and I would be happy with the standard batch settings, and just specifying a preset name (with it defaulting to the last used preset). All the options I would need is (1) the input file name, and (2) the output filename, and (3) optionally a preset.
Aug 14, 2013 at 2:30 PM
I would also second this request. The options sriramsinga mentions would also help me a lot.

Thanks for a great program.
Coordinator
Aug 19, 2013 at 5:14 AM
Have something coded up, will poke around a bit more before releasing. Current syntax:

VidCoderCLI.exe encode -s <source> -d <destination> -p <profile>
Coordinator
Aug 20, 2013 at 3:53 AM
Added in 1.5.5 Beta. Give it a try!
Aug 20, 2013 at 9:55 PM
I have tried it and so far it works perfect. I would test it a lot more.

Thanks a lot.