Skip to main content

Encoding Settings

VUploader provide video settings feature which allow you to use your own video and audio settings for generating high quality multi level (240p, 360p, 480p, 720p etc), multi format (flv, mp4, mp3, webm, ogv, ogg etc) video and audio encodings in your asp.net application.

This section will provide you detail about using encoding settings to customize your published video and audio output.

You can pass any encoding settings to uploader using itag identifier. Every settings have their own itag identifier. You can add more and more settings and assign unique identifier to each settings.

Sample Code

Sample code for using itag values within uploader control to publish 360p mp4 video and mp3 audio from source video.

ArrayList itags = new ArrayList();
itags.Add("5"); // 360p mp4 encoding
itags.Add("14"); // mp3 audio encoding
MHPEncoder encoder = new MHPEncoder();
encoder.iTags = itags;
// other settings below.

iTag List

Builtin itag list in VUploader user control.

  • FLV Video Encoding
  • 0: FLV 240p
  • 1: FLV 360p
  • 2: FLV 480p
  • 3: FLV 720p
  • MP4 Video Encoding
  • 4: MP4 240p
  • 5: MP4 360p
  • 6: MP4 480p
  • 7: MP4 720p
  • 8: MP4 1080p
  • WebM Video Encoding
  • 9: WebM 240p
  • 10: WebM 360p
  • 11: WebM 480P
  • 12: WebM 720p
  • 13: WebM 1080p
  • MP3 Encoding
  • 14: mp3 audio

Settings

List of encoding settings, you can customize settings with your own requirements. Make sure settings you will update must supported by ffmpeg build you are using.

VUploader user control support the following main properties.

Property Description
240p flv video settings
media.Width = 400;
media.Height = 240;
media.Video_Bitrate = 256;
media.Audio_SamplingRate = 22050;
media.Audio_Bitrate = 64;
media.OutputExtension = ".flv";
media.Force = "flv";
360p flv video settings
media.Width = 640;
media.Height = 360;
media.Video_Bitrate = 500;
media.Audio_SamplingRate = 44100;
media.Audio_Bitrate = 128;
media.OutputExtension = ".flv";
media.VCodec = "libx264";
media.Parameters = " -fpre \"" + presetpath + "\"";
480 flv video settings
media.Width = 854;
media.Height = 480;
media.Video_Bitrate = 1000;
media.Audio_SamplingRate = 44100;
media.Audio_Bitrate = 128;
media.OutputExtension = ".flv";
media.VCodec = "libx264";
media.Parameters = " -fpre \"" + presetpath + "\"";
720p flv video settings
media.Width = 1280;
media.Height = 720;
media.Video_Bitrate = 2000;
media.Audio_SamplingRate = 44100;
media.Audio_Bitrate = 128;
media.OutputExtension = ".flv";
media.VCodec = "libx264";
media.Parameters = " -fpre \"" + presetpath + "\"";
240p mp4 video settings
media.Width = 400;
media.Height = 240;
media.Video_Bitrate = 256;
media.Audio_SamplingRate = 44100;
media.Audio_Bitrate = 128;
media.OutputExtension = ".mp4";
media.VCodec = "libx264";
media.Parameters = " -fpre \"" + presetpath + "\"";
360p mp4 video settings
media.Width = 640;
media.Height = 380;
media.Video_Bitrate = 500;
media.Audio_SamplingRate = 44100;
media.Audio_Bitrate = 128;
media.OutputExtension = ".mp4";
media.VCodec = "libx264";
media.Parameters = " -fpre \"" + presetpath + "\"";
480p mp4 video settings
media.Width = 854;
media.Height = 480;
media.Video_Bitrate = 1000;
media.Audio_SamplingRate = 44100;
media.Audio_Bitrate = 128;
media.OutputExtension = ".mp4";
media.VCodec = "libx264";
media.Parameters = " -fpre \"" + presetpath + "\"";
720p mp4 video settings
media.Width = 1280;
media.Height = 720;
media.Video_Bitrate = 2200;
media.Audio_SamplingRate = 44100;
media.Audio_Bitrate = 96;
media.OutputExtension = ".mp4";
media.VCodec = "libx264";
media.Parameters = " -fpre \"" + presetpath + "\"";
1080p mp4 video settings
media.Width = 1920;
media.Height = 1080;
media.Video_Bitrate = 2900;
media.Audio_SamplingRate = 44100;
media.Audio_Bitrate = 152;
media.OutputExtension = ".mp4";
media.VCodec = "libx264";
media.Parameters = " -fpre \"" + presetpath + "\"";
240p webm video settings
media.Width = 400;
media.Height = 240;
media.Video_Bitrate = 256;
media.Audio_SamplingRate = 44100;
media.Audio_Bitrate = 128;
media.OutputExtension = ".webm";
media.VCodec = "libx264";
presetpath = RootPath + "\\ffmpeg\\presets\\libvpx-360p.ffpreset";
media.VCodec = "libvpx";
media.ACodec = "libvorbis";
media.Parameters = "-f webm -aspect 4:3 -fpre \"" + presetpath + "\"";
360p webm video settings
media.Width = 640;
media.Height = 380;
media.Video_Bitrate = 500;
media.Audio_SamplingRate = 44100;
media.Audio_Bitrate = 128;
media.OutputExtension = ".webm";
media.VCodec = "libx264";
presetpath = RootPath + "\\ffmpeg\\presets\\libvpx-360p.ffpreset";
media.VCodec = "libvpx";
media.ACodec = "libvorbis";
media.Parameters = "-f webm -aspect 4:3 -fpre \"" + presetpath + "\"";
480p webm video settings
media.Width = 854;
media.Height = 480;
media.Video_Bitrate = 1000;
media.Audio_SamplingRate = 44100;
media.Audio_Bitrate = 192;
media.OutputExtension = ".webm";
media.VCodec = "libx264";
presetpath = RootPath + "\\ffmpeg\\presets\\libvpx-360p.ffpreset";
media.VCodec = "libvpx";
media.ACodec = "libvorbis";
media.Parameters = "-f webm -aspect 4:3 -fpre \"" + presetpath + "\"";
720p webm video settings
media.Width = 1280;
media.Height = 720;
media.Video_Bitrate = 2200;
media.Audio_SamplingRate = 44100;
media.Audio_Bitrate = 192;
media.OutputExtension = ".webm";
media.VCodec = "libx264";
presetpath = RootPath + "\\ffmpeg\\presets\\libvpx-360p.ffpreset";
media.VCodec = "libvpx";
media.ACodec = "libvorbis";
media.Parameters = "-f webm -aspect 4:3 -fpre \"" + presetpath + "\"";
1080p webm video settings
media.Width = 1920;
media.Height = 1080;
media.Video_Bitrate = 2900;
media.Audio_SamplingRate = 44100;
media.Audio_Bitrate = 192;
media.OutputExtension = ".webm";
media.VCodec = "libx264";
presetpath = RootPath + "\\ffmpeg\\presets\\libvpx-360p.ffpreset";
media.VCodec = "libvpx";
media.ACodec = "libvorbis";
media.Parameters = "-f webm -aspect 4:3 -fpre \"" + presetpath + "\"";
mp3 audio settings
media.DisableVideo = true;
media.Channel = 2;
media.Audio_SamplingRate = 4800;
media.Audio_Bitrate = 192;
media.OutputExtension = ".mp3";