I am developing an application using the gstreamer framework on a Tegra TX1 SoC.
The provided gstreamer plugin nv_omx_h264enc provides hardware accelerated H.264 encoding. However, it consumes it's input in some YUV format.
Now I have to encode from RGB sources. In the examples, nv_omx_h264enc is usually feed by a nvvidconv plugin that does the needed colorspace conversions. However, it only sources from YUV formats I figured out. It can output RGB then, but that is the wrong conversion direction obviuosly.
So I dropped in a ffmpegcolorspace plugin for the conversion and got a working pipeline. However, it's performance on ARM CPUs is not very good and so I have a mayor bottleneck.
What else options do I have for the color conversion? Can the nvvidconv's source be modified to provide RGB input pads? Are there other plugins around that would use the GPU or video hardware of the Tegra X1?
Related
I need to convert some hi res audio files to u-law compression. I find no documentation on this- I'm almost certain the codec is there on Windows machines, but how the heck do I access it?
Yes the codec is there, however it is outside of WASAPI. APIs that deal with codecs are:
Audio Compression Manager
DirectShow
Media Foundation
Not sure about the latter, however the first two have the μ-law encoder readily available (the codec itself has ACM interface, and DirectShow offers a wrapper over it).
I'm looking for advice on how to generate videos in C. The main issues I'll be dealing with are
Must be open source, would prefer BSD type license but GPL is acceptable
Must be reasonably well documented (I'm looking at you FFMPEG)
Must be able to generate a non-compressed video
Must be able to draw each frame
Should be able to set the frame rate (though of course I can just make n identical frames)
My toolkit is the GNU development system on UNIX like systems (Linux, OS X, Cygwin, ...)
Having said that, I'm picky about these requirements because if I don't have them I know I can pretty easily generate the individual frames with libgd and use ffmpeg commands to output a video. The point is that I'd rather be able to draw them and generate the video entirely in my C code. Even better would be to be able to provide the library in my own source (BSD license) so that my users don't need to worry about getting things installed on their particular platform.
I'm not set on a video codec other than the availability of non-compressed video (I'm visualizing changes in simulated rotational spectroscopy as rotational parameters or other variables like temperature change). Advice on a particular codec welcome.
Any suggestions on how to implement Compression of captured Audio in a Silverlight 4 Application? I'd prefer something lossy like MP3 or AAC but after my intial research only turned out one lonely pure C# FLAC encoder/decoder, anything better than this would be nice.
Please note that sending uncompressed audio to the server and compress it there is not an option because of a) traffic cost and b) the audio is additionally encrypted by the client so the server never sees the source material.
I don't know of any implementations of proprietary compression algorithms in C#. You pretty much would have to implement your own. ADPCM is silmple and offers 4:1 compression ratio. More on the subject: http://forums.silverlight.net/forums/p/145729/374278.aspx
Does it have to be C#? LAME is a pretty good, very configurable MP3 encoding library.
http://lame.sourceforge.net/
I have a video decrypter library that can decode an obsolete video format, and returns video frames in BMP and audio in WAV through callback functions. Now I need to encode a new video in any standard format under windows.
What might be the standard way to do this? I am using Win32/C. I guess Windows has its own encoding library and drivers and I don’t need to use FFMPEG. Any pointer to an example code or at least to a library to look at will be greatly helpful.
Edit: I accept. FFMPEG is the easiest way to do it.
On Windows, you have two native choices.
The old Windows Multimedia library which is too ancient to seriously consider, but does have the Video Compression Manager.
And then there's DirectShow.
It's certainly doable through DirectShow, but you better enjoy COM programming and the concepts of Filters, Graphs, and Monikers (oh my). See this tutorial for a crash course:
Recompressing an AVI File
And the MSDN documentation.
A simpler approach is indeed to use an library like FFMPEG or VLC.
To save yourself heartache, I echo Frank's suggestion of just using FFMPEG. Executing a separate FFMPEG process with the correct arguments will 100% be the easiest way to achieve your goals of encoding.
Your other options include:
libavcodec - The central library used in FFMPEG. I warn there don't appear to be many Windows binaries of libavcodec available, so you'd probably have to compile your own, which, at minimum, would require a Cygwin or MingW set up.
ffdshow-tryouts - A video codec library implemented as a DirectShow filter based on libavcodec. They do seem to have an API for manipulating it, but it's a .NET library.
I would suggest looking at the VirtualDub source code. It's a well known encoder that uses VFW. You may be able to get some ideas from that software.
I work with satellite radar, and have been provided with a (very) large TIFF file containing 32 bpp greyscale data. Unfortunately, libtiff, the standard Linux library for working with TIFF files, doesn't support SampleFormat TIFF files, which means no support for high bit depth greyscale images or floating-point images.
Does anyone know of a FOSS C library which provides support for these types of images? Failing that, can anyone suggest of an appropriate file format to convert to, and a FOSS library that can load that? (Ideally, it should be generally accepted by the scientific community for data interchange, and supported by IDL/ENVI).
Well libtiff should be able to handle the format, although you may be limited to the low-level apis and doing the conversion to an image yourself. If the size of the images are >4Gb, there is bigtiff, a port of libtiff which handles extremely large images.