[Libav-user] need advice on new player

Deron deron at pagestream.org
Sun Feb 19 04:38:59 CET 2012


Hello,

I've been using a decklink driver for mplayer to output video to the 
Blackmagic Decklink card but I've run into several problems which just 
don't seem to have an easy fix. In talking with the original developer 
of the decklink driver for mplayer, he agreed that the only reasonable 
recourse was to write a customer player based on libav directly.

I've gone over his roughed out decklink player, I've looked at ffplay.c, 
and the tutorial at http://dranger.com/ffmpeg/ and I have a decent idea 
on what needs to be done on the decklink side but some items that 
mplayer took care of I am still unsure off.

We are trying to work with all kinds of odd ball videos, and I have to 
accommodate either odd ball audio streams like != 48kHz, or two audio 
streams with mono samples instead of a single stereo stream, wrong 
sample size, or something that is too loud. Something like "-af 
resample=48000:0:2,channels=2,volume=-12,format=s16le" in mplayer would 
be used. What I'm not finding in ffplay is how to implement something 
similar.

The other minor case is when dealing with SD or 1080i video that needs 
to be scaled and/or clipped. It appears that ffplay includes video 
filters support. Correct? Am I just missing the support for the audio 
filtergraphs?

At this point I am comfortable with implementing the decklink output 
using either ffplay or dranger's source, but I'm not comfortable with 
changes needs on the libav interface end of things to support the audio 
filtering. I am sure I can just modify the buffered audio stream myself 
to implement the functionality I need, but if optimized functioning code 
already exists...

I suppose the real question is, and no one but myself might be able to 
answer it but here goes, what would be the best place to base this on? 
It seems that modifying ffplay would be best?

Just looking for some inspiration, thanks!

Deron



More information about the Libav-user mailing list