Integrating a video codec into gstreamer or vlc - linux

I have an C-Code for a video codec. It takes in a compressed format as an input and give out a YUV data buffer. As a standalone application i'm able to render the YUV generated using OpenGL.
Note: This codec is currently not supported by VLC/gstreamer.
My task now is to create a player using this code (that is with features such as play, pause, step, etc.). Instead of re-inventing the whole wheel, i think it would be better if i'm able to integrate my codec into gstreamer player code(for Linux).
Is it possible to achieve the above? Is there some tutorial using which i can proceed? I have searched a lot on net but was unable to find anything specific to my requirement. Any information or links specific to the above problem will be of great help to me. Thanks in advance.
-Regards

Since the codec and container are of new MIME types, you will have to implement a new GstElement for demuxer and codec. A simple example (for audio) is available in this location. I presume this should provide a good starting reference for you.
Some additional links:
To create a decoder plugin, you can refer to the vorbisdec implementation.
To create a demuxer, you can refer to the oggdemuxer implementation.
Reference to factory make

Related

TuneFilterDecimate SRI mode and usage

I'm gonna use the TuneFilterDecimate of Redhawk 1.10 to isolate the RDS data stream of WBFM transmissions.
I wonder why it transforms a real stream of data in a complex one when it is not required from the elaboration and if it is possible to exploit it to make a frequency shift of the signal from 57kHz to the baseband.
I followed this youtube video http://www.youtube.com/watch?v=wN9p8EjiQs4 to try to build a Fm waveform receiver to hear the audio stream but I heard only a distorted audio voice. Can you suggest me some settings?
Thanks for your help.
At present, TuneFilterDecimate will only output complex. You may want to use the FastFilter component instead to perform your filtering. For an example of REDHAWK doing a WBFM RDS demod, check out the Sub100 dollar project.
The documentation is here: http://sourceforge.net/projects/redhawksdr/files/redhawk-doc/1.10.0/
The Waveform used is here: https://github.com/RedhawkSDR/RBDS_wf
You'll need to install the components used within the waveform, those are located in the git repositories.

Tag Video by Frame with GPS Info using GStreamer

I have been tasked to tag a video frame-by-frame with gps coordinates as it is recording.
The platform must be on Linux (Ubuntu to be specific).
Very new to programming with video sources..
Some questions :
Do video frames even have per-frame meta data?
Is GStreamer a good framework to use for my purposes? How should I get started?
Thanks.
Check GstMeta: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMeta.html
It allows you to attach arbitrary metadata to buffers, which then can be passed downstream with the buffers and passed through other elements if possible. Take a look at the code of existing GstMeta implementations in gst-plugins-base for examples: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst-libs/gst/video/gstvideometa.h http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst-libs/gst/video/gstvideometa.c
Your meta would probably work very similar to the region of interest meta (plain metadata)
To get started, read the documentation on http://gstreamer.freedesktop.org , especially start with the application writers manual. And take a look at existing GStreamer code to understand how everything works together.

ffmpeg - Can I draw an audio channel as an image?

I'm wondering if it's possible to draw an audio channel of a video or audio file as an image using ffmpeg, or if there's another tool that would do it on Win2k8 x64. I'm doing this as part of an encoding process after a user uploads a video or audio file.
I'm using ColdFusion 10 to handle the upload and calling cfexecute to run ffmpeg.
I need the image to look something like this (without the horizontal lines):
You can do this programmatically very easily.
Study the basics of FFmpeg. I suggest you to compile this sample. It explains how to open a video/audio, identify the streams and loop over the packets.
Once you have the data packet (in this case you are interested only in the audio packets). You will decode it (line 87 of this document) and obtain the raw data of an audio. It's the waveform itself (the analogue "bitmap" for an audio).
You could also study this sample. This second example is how to write a video/audio file. You don't want to write any video, but with this sample you can easily understand how the audio raw data packet works, if you see the functions get_audio_frame() and write_audio_frame().
You need to have some knowledge about creating a bitmap. Any platform has an easy way to do that.
So, the answer for you: YES, IT IS POSSIBLE TO DO THIS WITH FFMPEG! But you have to code a little bit in order to get what you want...
UPDATE:
Sorry, there are ALSO built-in features for this:
You could use those filters... or
showspectrum, showwaves, avectorscope
Here are some examples on how to use it: FFmpeg Filters - 12.22 showwaves.

Direct show samples (AMCap) on Platform SDK with MP4 file

I want to generate .mp4 file using Direct show samples (AMCap). But i don't know how to implement this.
Can anyone please help me about this?
Thanks in advance,
Dhaval Kariya
AMCap Sample captures and displays video. No encoding and choices of multiplexing into files (only basic capture/recording through a basically obsolete helper interface).
Video capture application.
This sample application demonstrates the following tasks related to
audio and video capture:
Capture to a file
Live preview
Allocation of the capture file
Display of device property pages
Device enumeration
Stream control
The items above might be confusing as they mention capture and file allocation. This is a trail of 15 years old history when file capture was a big deal. The helper object to initialize capture targets AVI and ASF/WMV only, you neither can extend it to support other formats, nor you need to.
You need to check how to store video/audio into files (see below) and follow the same steps in building the pipeline with MPEG-4 encoders and multiplexer. You will need to use a third party MPEG-4 multiplexer for MP4 file format because Windows does not provide you with such out-of-the-box usable component.
See:
Capturing Video to a File
Free DirectShow Mpeg-4 Filters

Available options for playing a stream or a remote mp3 file on iOS 4

I am trying to make an application for listening to podcasts. Each podcast is an mp3 file, around 50MB in size. After reviewing the Using Audio chapter of the Multimedia Programming Guide, I decided to use AVPlayer, as the other options did not seem appropriate. However, the more I work with AVFoundation, the more complicated it seems and I have a feeling that simply streaming an mp3 file should be easier. Plus on the top of this document, there is a note stating:
Important: This document contains
information that used to be in iOS
Application Programming Guide. The
information in this document has not
been updated specifically for iOS 4.0
Does that mean that I have some other options, or that AVFoundation is maybe an overkill for what I need to do? I would really appreciate it if someone could clear things out a bit and let me know if I'm making something wrong here.
Thanks in advance!
You should explore Cocos Denshion.
http://www.cocos2d-iphone.org/wiki/doku.php/cocosdenshion:cookbook
The audio engine comes with cocos2d, and it is just 5 classes you can include with your project.
It's very simple to use, as you can see from the above link. It's basically just a wrapper for some AVFoundation classes.
The only trick will be to stream your mp3, but it looks like you can simply update the Cocos Denshion CDAudioManager to hand a URL to the AVAudioPlayer, as a start. Whether or not that satisfies your streaming requirement, I don't know.
At the very least, it will give you some AVFoundation code to study.
I just found a pdf with a nice overview of some possible options from this course blog. Together with Julian's suggestion this is all I could find so far.

Resources