How to convert codecs in C#
This description demonstrates in a really simple manner how covert h.263 and h.264 codecs in C# . You can also learn about why is it useful, why you should use it and some background information about the compression process. To implement this example you must have Ozeki Camera SDK installed, and a reference to OzekiSDK.dll should be added to your Visual Studio project.
How does it work?
The program analyzes data for redundancies and repetitions. It then creates a new, smaller file, mathematically encoded in a different format. Decompressing the new file with the same program recreates the original.
H.264 is perhaps best known as being one of the video encoding standards for Blu-ray Discs; all Blu-ray Disc players must be able to decode H.264. It is also widely used by streaming internet sources, such as videos from Vimeo, YouTube, and the iTunes Store, web software such as the Adobe Flash Player and Microsoft Silverlight, and also various HDTV broadcasts over terrestrial, cable, and satellite.
Why should i use this?
In digital signal processing, data compression, source coding, or bit-rate reduction involves encoding information using fewer bits than the original representation. This way you can dramatically reduce the amount of network communication. Sending smaller packages of data means it will also arrive faster.
Advantages
- Less disk space (more data in reality)
- Faster writing and reading
- Faster file transfer
- Variable dynamic range
- Byte order independent
When should i use this?
When you are working with uncompressed images, or you want to recover the original data from a compressed image.
Variables
IsRunning - True if Converter is running, otherwise false
SourceFormat - Input format
ForceTranscode - If true it forces transcoding in all cases, even when the input and output formats are the same
OutputQuality - Output format
DestinationFormat - Output format
Properties
get
private set
Methods
Start() - This method start the mediahandler
Stop() - This method stop the mediahandler
Dispose() - Get rid of unmanaged resources
Related Pages
FAQ
Below you can find the answers for the most frequently asked questions related to this topic:
-
I have not managed to build the solution. How to solve it?
- Please set the Target framework property of the project to .NET 4.0.
- You should add the OzekiSDK.dll to the references of the solution.
- Please import the missing classes.
-
Why is the camera moving, when I am not using it?
It is possible that someone else is also using the camera.
-
Why cannot I turn the camera in bigger angle than the current?
Because all camera have a limit in rotation.
More information
- How to forward PTZ instructions in C#
- How to turn your USB camera into an Onvif IP webcam in C#
- How to turn your old RTSP ip camera into an Onvif IP webcam in C#
- Send video to Iphone Android mobile in C#
- C# stream video to multiple locations simultaneously
- How to make your software discoverable by other applications in C#
- Connect to RTSP camera stream, broadcasted by VLC media player
- How to find not Onvif cameras on the network
- How to compress h.263 and h.264 codec in C#