c# - Expression Encoder SDK - How to add audio track on a video -


i use on this. i'd overlay audio.mp3 file (or other format matter) onto video.

i'm using free version of expression encoder 4, , video outputs wmv. thing is, don't know how add audio file video mediaitem. tried this, didn't add audio on result:

mediaitem videotrack = new mediaitem(@"path\to\videofile.wmv"); videotrack.outputformat = new windowsmediaoutputformat(); videotrack.outputformat.videoprofile = new advancedvc1videoprofile(); mediaitem audiotrack = new mediaitem(@"path\to\audio.mp3"); videotrack.outputformat.audioprofile = audiotrack.sourceaudioprofile; job.mediaitems.add(videotrack); job.encode(); 

and when didn't work (perhaps because profile alone metadata, , not audio file itself), tried overlay audio way overlay image onto video, doing this:

mediaitem videotrack = new mediaitem(@"path\to\videofile.wmv"); string overlayfilename = @"path\to\audio.mp3"; videotrack.overlayfilename = overlayfilename; job.mediaitems.add(videotrack); job.encode(); 

this failed too, error time saying overlay item needs have video stream or (i guess exencoder expected overlay video file). appreciated. shouldn't difficult powerful product exencoder 4.

mediaitem has property called audiooverlayfilename - should set 1 if want overlay audio!


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -