Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am new in multimedia analysis area.
Recently, I am working on a project which is built on AngularJS and Flask framework and I want to realize the following functions in our website:
user can cut the video into segments and the website can merge all
the selected segments into one new video;
the website can extract key frames of the new video which is
generated by the first step;
the player can get a 'start time' parameter and a 'end time' parameter
(or a 'duration' parameter) given by user and play the clips based on
the user input parameters.
For now, I have searched several tools like JWPlayer, FFMpeg. But I really have no idea on how to use them and whether they are the best tools for these requirements. I was wondering if you might be able to give me some advice.
[Update on 2015 Dec 10]
I have made a progress bar by JavaScript and it can satisfied the 3rd requirement, so the video analysis part becomes the toughest one. I also find some other tools or libraries like Video.js, OpenCV, VLC etc. Can anyone give some advice on open source video analysis tools? It would be better if it works well with Python server.
Thank you.
For the keyframe snapshot you can use a plugin like https://jwplayer.electroteque.org/snapshot
There are other ways to take a snapshot but they're not terribly easy.
If you are kicking back a file that users can download, FFMpeg is one of the very few options, if you're interested in creating server-side code to manipulate video files. You could also use Flip Factory, Carbon Coder, or even better -- encoding.com
Alternatively, you can just use JW Player's API to load which videos you want at the specific times. ie:
jwplayer('yourDiv').pause();
jwplayer('yourDiv').setup({ file: secondfile.mp4 });
jwplayer('yourDiv').seek(seekVariable);
etc...
Another option is to use http://popcornjs.org/ which gives you some more flexibility in manipulating the native HTML5 video element, allowing you to fire events off at specific time markers, like in this really cool demo which shows just one powerful way it can be implemented. Though not quite what you might need, it's something to keep in mind. http://hello.processing.org/editor/
(Edit) For more information...
To get ffmpeg installed and running:
http://www.hongkiat.com/blog/ffmpeg-guide/
To create your own video player:
https://github.com/chelyaev/ffmpeg-tutorial
Official docs: https://ffmpeg.org/documentation.html
Encoding tutorial:
https://www.virag.si/2012/01/web-video-encoding-tutorial-with-ffmpeg-0-9/
Awesome tutorial for creating a hover scrub preview of your video:
https://www.binpress.com/tutorial/how-to-generate-video-previews-with-ffmpeg/138
and demo: http://jsfiddle.net/r6wz0nz6/2/
Also be aware of the big fork in the community, Libav, which is another option I believe: http://blog.pkh.me/p/13-the-ffmpeg-libav-situation.html
Related
Background
I understand there is a very similar post here. But I could not do a follow-up comment because I don't have enough reputation yet... since I just recently joined.
Goal
I would like to create an extension that adds two things onto the current built-in chrome bookmark manager that would appear right below the URL box in the pop-up when you do star(bookmark) and click more. (could not post an image again because of reputation limit) First is a box for note-taking, where the notes will be searchable and editable within the bookmark manager. Second is another box for setting up a reminder to remind user to view the bookmark (very simple - only allows date and time)
Question
I don't want to drastically change anything about the current pop-up nor the manager. So I'm trying to avoid creating an extension from scratch. Instead, I wonder if extracting the relevant code from Chromium source code is feasible/legal as I don't have much experience in open-sourced projects? And then build on top of that to create an extension that basically is the same as the built-in bookmark manager but with additional features. Thank you!
Current state
I'm still looking at the Chromium source code. And I will update this post if I have any progress.
My task is to add some effect to the recorded file.
Here is a script in action I'm using
Recorder.JS
and here is a code https://github.com/cwilso/AudioRecorder/blob/master/js/recorderjs/recorder.js
I want to add pitch.
I tried looking in other codes which add some effects to the audio.
But it seems like recorder.js handles buffers differently.
edit
function playbackRecorderAudio() {
audioRecorder.getBuffer(function(buffers) {
var source = audioContext.createBufferSource();
source.buffer = audioContext.createBuffer(1, buffers[0].length, 44100);
source.buffer.getChannelData(0).set(buffers[0]);
source.buffer.getChannelData(0).set(buffers[1]);
source.connect(audioContext.destination);
source.noteOn(0);
});
}
here is how my code looks now, with this function, I request already recorded audio and play it back.
Can I simulate some effect to get close to this: http://www.youtube.com/watch?v=Lr80slqJ3zo
This is in Georgian but I hope you get the idea. Its more like Helium Pitch. (note, I don't whant to change audio speed).
When I tried to research helium effect I found this: http://chemistry.about.com/b/2013/08/26/helium-voice-is-not-higher-in-pitch.htm
it saies that sound should be 2.5 faster then air.
Can I get something close to this?
edit
from what #cwilso suggested, http://chromium.googlecode.com/svn/trunk/samples/audio/granular.html is the closest I have seen so far. But I could not manage to modify it, to work with my playbackRecorderAudio().
Thats why I'm starting a bounty with everything I have
edit
here is a jsFiddle of my code:
http://jsfiddle.net/Lsvnp/1/
First let me describe what I'm trying to achieve:
I want to record sound from users microphone, add this effect to it.
When user press "stop recording" button (stopRecording function) , it will prepend HTML audio which will allow user to listen what he has recorded. If he likes it, he then will upload it to my server (uploadAudio function)
WHen page is loaded, recording is not initalized. to initialize recording, user has to press some button which will trigger recordAudio function.
Now the problem is that I don't know where to connect my playbackRecorderAudio function. to use it as coverter from buffer.
The code of the granular effect you want is usable. The only thing you need to do is connect the output from your source node to the first node of the granular effects page code. Still that code is a bit messy but I will try to explain it as good as possible beneath.
After some searching in the code, it looks like the audio structure goes like this:
source -┬-> grainWindowNode -┬-> panner -┬-> dryGain -> compressor -┬-> destination
└-> bypass -┘ └-> wetGain -> convolver -┘
I made the code so it works for you, see this jsfiddle
This is a bit hard to make as you need to set all the values yourself to fit what you want.
All the code is in the jsfiddle, and there are two things you have to do to make it work:
read the comment on top (download that file and put it on the same server as where you are hosting it, else CORS makes sure you can't fetch the resource. (or you must specify a header on the server)
Put this code somewhere in your code, so that the function playbackRecorderAudio() does something useful. I can help you if you provide me all your code, to make sure it works.
If you want any explainment about the code feel free to ask (I do not know your current knowledge about the audio api, and to explain everything?)
You should probably look at using OfflineAudioContext rather than Recorder.JS - OAC can work in faster-than-realtime.
That said - "helium pitch" looks pretty hard to do, as it alters the harmonics of your voice. That sounds more like vocoding, with the voice sound being the modulator and the carrier, but shifting the harmonic bands (or something like that). The YouTube video you pointed to sounded like it was actually pitch-shifted, but with rate correction - like granular synthesis. Check out Chris Rogers' example http://chromium.googlecode.com/svn/trunk/samples/audio/granular.html - set the speed to 1.0, and the pitch to something greater than zero (several hundred cents, at least). Is this the effect you're looking for? If you, you can dig in to Chris' example to see how to do that, or use a live-effect version like the "pitch doubler" in my input effects (http://webaudiodemos.appspot.com/input/) (which can actually be set to be faster or slower, and controlled to be something other than octaves).
Pitch shifting is achieved using FFT (Fast Fourier Transform) which is implemented in the Web Audio API. O'Reilly has a book "Web Audio API" which covers the API nicely. You can see the chapter on Pitch and the Frequency Domain here.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm learning javascript and want to create a library of example code snippets as I learn new ideas. I'm currently using evernote, but am wondering if there is a more elegant solution where I can create a reference library complete with syntax highlighting/executing the code in the browser.
Thoughts/suggestions?
Tried the Evenote Plugin for Sublime3?
http://www.sublimetext.com/3
https://sublime.wbond.net/packages/Evernote
You can save new notes, update existing notes, using github style markdown.
Here is an example:
I use
app.gistboxapp.com
You need a GitHub account to login: this app connects to your Gists repository saved into Github and keeps all your code snippets. It's web based so you don't need to download anything. Everytime you save a new snippet GistboxApp will add a Gist to your Github repository.
You can label all your snippets to divide them in categories.
Hope this helps...it works fine for me
I use Evernote as the snippets etc. is primarily from various websites. The web clipper browser plugin lets me create notes right to Evernote with highlighting (as shown on the original website) preserved. Tagging and additional comments along with sharing and the availability (between job/home/mobile in my case) is a very nice addition.
For my own snippets from IDE/editor i usually do a screenshot or if i want to preserve the copy-paste-ability i just add a text/source file to Evernote.
For OS X there is Quiver. It is very similar to Evernote in look and feel and adds many useful code snippets related features.
Quiver is a notebook built for programmers. It lets you easily mix text, code, Markdown and LaTeX within one note, edit code with an awesome code editor, live preview Markdown and LaTeX, and find any note instantly via the full-text search.
I am really liking Marxico, so far.
With this tool, your text is still stored in Evernote, but it supports code block formatting and markdown for notes. Note: This won't actually run your code.
You can also use http://tohtml.com/ and copy and paste over.
Works for me.
I like and use codebox but afaik it's osx only.
http://www.shpakovski.com/codebox/
Would really like to see this become cross platform.
I know this has been answered perfectly, but if you use sublime text as your code editor, evernote can be a fantastic was to collect and use snippets.
Sublime text as an evernote plugin. With it you can add notes (so type your snippet in sublime text and push it to evernote from sublime text) and open your evernote notes in sublime text.
So you just add your snippets to evernote. Then search them within sublime text and use them! There is a similar plugin for gist, where you store your snippets as gists and then access them through sublime text. But I think, evernote is a better option as it's easier to edit and re-sort snippets.
The evernote plugin
The gist plugin
I have started using Javascript and HTML5 from last week and quite new to it.
Maybe whatever I am asking is quite easy to do but googling around is not helping me.
I want to loop thru ALL of the UI-controls on a HTML5 page (maybe using a javascript function or alike) and seek the specific details of each UI-control (like name, width, length and other properties) and write these details into a pre-determined xml-format. My backend code is in C# but I dont think that would matter or help as all of the related elements like UI-page-controls are in HTML5 and Javascript.
I think what you're looking for is the Controls property of your Page. Html5 does not (necessarily) conform to XML standards.
http://msdn.microsoft.com/en-us/library/yt340bh4(v=vs.100).aspx should show you a few good examples of working with Controls on the backend.
I don't know if I'll be able to get this answer here, but I'm trying to get the JW Player to toggle between high and low quality settings. Here is my code:
<script type="text/javascript">
var so = new SWFObject('/lessons/videos/player.swf','mpl','610','480','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addVariable('plugins', 'http://www.mbira.me/lessons/videos/plugins/hd/hd.swf');
so.addVariable('hd.state',false);
so.addVariable('hd.autoswitch',false);
so.addVariable('hd.bandwidth',3200);
so.addVariable('hd.file', '/lessons/videos/Buka_Tiende_from_calculator.flv');
so.addVariable('file','/lessons/L2/Nhemamusasa_Acoustic.flv');
so.write('mediaspace');
</script>
I read here that there is a setting that there is a default built into the HD plugin to switch determined on the users bandwidth. I downloaded a patch here:
http://interfacelab.com/patch-for-hd-plugin-for-jw-player/
So I could disable that behavior to test, but still no luck. You can see in my code, that for now, I just have two different videos to toggle in order to test if things are working. I should say that both those videos are actually "high quality" for now, but that shouldn't make a difference I guess. Any ideas, and if not, any other places I could look to implement this functionality?
Thanks!
Joel
so.addVariable('plugins', 'plugins=hd-1');
needs to be changed to:
so.addVariable('plugins', 'hd-1');
The example page was incorrect...