Re: ffmpeg access for chrome extension

1,475 views
Skip to first unread message

Dale Curtis

unread,
May 14, 2012, 4:17:04 PM5/14/12
to D.C. T., chromium-...@chromium.org
You're looking for WebAudio, specifically MediaElementAudioSourceNode:


The examples use <audio> tags, but it does work with <video> tags as well.

- dale

On Mon, May 14, 2012 at 1:00 PM, D.C. T. <d3n...@googlemail.com> wrote:
Hi Dale,

I promise not to keep bothering you, but I do have one more burning question.
I am looking for something like the following on chromium / webkit (but haven't found anything that will let me hook into the audio while it is playing so I can do realtime analysis): 


video.addEventListener('MozAudioAvailable', audioAvailable, false); 

Thanks again for your time!
--
Daniel


On Mon, May 14, 2012 at 8:29 PM, D.C. T. <d3n...@googlemail.com> wrote:
Wow Dale, 

Thanks so much for the info! I was afraid I might have to fork chromium to get there - might just be the case.

Best,
Daniel


On Mon, May 14, 2012 at 7:40 PM, Dale Curtis <dalec...@chromium.org> wrote:
+chromium-extensions

Hi Daniel,

None of FFmpeg's encoding functionality is accessible through extensions, or Chrome for that matter. Even in Chrome, we only allow a white-listed set of function calls. The white-list only includes select decoding and helper functions required for the HTML5 <video> and <audio> tags; the full lists can be seen in the *.sigs files here:


Even those would be inaccessible through an extension though. For working with media your options are the <video>, <audio>, and WebAudio APIs. 

I've added the chromium-extensions group to the email, perhaps someone here has some ideas for you.

Hope this helps,

- dale


On Sun, May 13, 2012 at 10:52 AM, D.C. T. <d3n...@googlemail.com> wrote:
Dear Mr. Curtis,

I am sorry for bothering you, but I would like to know if you can point me in the right direction. I am interested in authoring an extension for chrome, and would like to know if I can somehow get access to the functions at /trunk/deps/third_party/ffmpeg from within the extension. specifically, i am interested in doing something like exec() in php: 


var file=document.getElementById('video').files[0];
file.ffmpeg(" -i "+file+" -b 1000k -vcodec libvpx -acodec libvorbis -ab 160000 -f webm -g 25 -s 320x180 "+file+".webm");

I know it is more complex than the above pseudocode, but any suggestions (or linked discussion) you can give/forward me would be most generous.

Thanks in advance,
Daniel Caleb Thompson






Dale Curtis

unread,
May 14, 2012, 1:40:56 PM5/14/12
to D.C. T., chromium-...@chromium.org
Reply all
Reply to author
Forward
0 new messages