[Mlt-devel] Extracting the audio data
Brought to you by:
ddennedy,
lilo_booter
From: bettinger c. <bc...@gm...> - 2011-10-03 04:16:27
|
Hello, I am using Mlt++ and I need to get the audio data of a media content. I tried that : #include <iostream> #include <mlt++/Mlt.h> int main*(*int argc*,* char**** argv*){* Mlt*::*Factory*::*init*(**NULL**);* Mlt*::*Profile ***m_profile *=* *new* Mlt*::*Profile *(*"square_ntsc_wide"* );* Mlt*::*Producer ***producer *=* *new* Mlt*::*Producer *(**m_profile*,* "vamp.mp4"*);* double fps *=* producer*->*get_fps*();* //Mlt::Consumer *m_consumer = new Mlt::Consumer (*m_profile, "avformat", "test.dvd"); //m_consumer->connect(*producer); Mlt*::*Frame ***frame *=* producer*->*get_frame*(*0*);* mlt_audio_format audioFormat*;* int ***audio_data*;* int frequency*,* channels*,* samples*;* std*::*cout *<<* "ok1" *<<* std*::*endl*;* audio_data *=* *(*int**)*frame*->*get_audio*(*audioFormat*,* frequency*,*channels *,* samples*);* std*::*cout *<<* "ok2" *<<* std*::*endl*;* //m_consumer->run(); std*::*cout *<<* "Finished" *<<* std*::*endl*;* *return* 0*;* *}* I have no idea how get_audio works. Anyone could help me ? Thanks in advance, Cédric * * |