Scala: working with video - scala

I've been hard pressed to find anything in search engines. It seems that adding "video" to the search query makes the search engines think that I want to watch a video [tutorial].
How do I read, play, and potentially (though this is not presently necessary) edit video files with Scala?
What libraries are available? What general useful information can you give?

I'm not much aware of any video processing libraries specifically for Scala, but you can use pretty much anything that works for Java. Out of my head, I would suggest taking a look at Processing and its video library. You might then go directly to the source libraries they use, e.g. gstreamer-java.

Related

Why Fuzz images?

I am reading about fuzzing. I have some basic questions regarding fuzzing. I searched but couldn't find any good explanation.
Why image files are popular and common for fuzzing? What is the benefit of using image files?
Why png files are popular and common for fuzzing?
Why Libpng is popular and common for fuzzing?
Is it best to fuzz png images with libpng for beginners? Why?
If someone can answer, it will be very helpful for me.
Thank you in advance.
You fuzz not image files, but software that parses these. Typically
developers don't write code to parse images, but use third party
libraries like libpng. As a developer you don't need to fuzz third
party libraries, only the code of your project. As a security
engineer you can fuzz them.
It is easy to setup fuzzing of such an opensource library - you can build it
statically instrumented, create a small application that calls into
it and fuzz it with an easy to setup fuzzer like afl. This and the
fact that such libraries are widely used, thus errors in these can
have big impact on a lot of applications, make them a good target
for fuzzing.
But image files are not the only files that are widely used and have
popular libraries to handle them. Most fuzzers are unaware of input
structure of the tested binary. They mostly use input mutation
techniques at bit/byte level - changing values of some bit/byte of
the input, feeding it to the tested application and watching it's
behaviour. When the input is highly structured, a fuzzer fails to
test deep into the code. For example to test a browser feeding
html-files to it, requires a fuzzer to create inputs that have
correct lexical and syntactical structure. Typically the code for
lexical/syntax handling is autogenerated based on a language
grammar. By changing bits/bytes in html you most likely get bad
keywords, which would be rejected by such an autogenerated code,
thus testing mostly this code and not getting deeper. Image files
are typically not highly structured and easier to fuzz deeply, thus
can be fuzzed with better coverage.
It is also faster to fuzz a small input than a bigger one - less
bits to change. It's easy to create a small image file just by
taking a small image as a seed, than for example an html-file.
I don't know if png files are more popular for fuzzing than other binary media files, but they structure can include multiple headers/chunks of different types which results in more different handling paths in the code and thus makes it more likely to have errors.
As I said it's opensource, widely used, easy to set up and can be fuzzed fast - it's much faster to run a small application, than for example a browser.
I'm not sure there can be a 'best' criteria, but it's easy and therefore good for beginners.

Does Web Audio have any plans of making limiters, imager, saturator, or multiband compressors?

I have checked the interfaces that web audio offers. Pizzicato.js offers a great library for these effects, but it is a pitty that some of the best and essential effects are missing, like a limiter, multi-band compressor, parametric equalizer, saturator, stereo imager. I was just wondering if there any plans for them where i can check if they are willing to make these in the future. Just don't know where i could ask.
Thanks
WebAudio is a collection of fairly elemental base processors. There's really no higher order effects, because instead, it provides the foundational elements with which to build the effects.
For example, there's a dynamics compressor, but there's no variMU emulation, or FET circuit, or even your run of the mill digital compressor. But, using the pieces that the API does have, you can build out or model a compressor that behaves however you want. Just think it through and figure out how the signal needs to be processed and you'll find pretty much every component you need to achieve it. If not, the AudioWorklet(the successor to the deprecated ScriptProcessorNode) can fill in the blanks.
That being said, you would build a limiter using the DynamicsCompressor, and use BiquadFilters and DynamicsCompressors to build a multiband comp. You'd use the WaveShaper to build things like tape saturators, overdrive, and bit crushers. And you can create an imager or stereo widener effect using things like the PannerNode and one of the AudioParams (setValueAtTime() is probably the simplest).
WebAudio isn't really plug & play, but it's what you'd use to build something that is. If you'd rather skip the tedium of building your own DSPs, I can't really blame you, it's not easy. But there's plenty of sadists out there who already did, and many are made by very imaginative and talented engineers. A couple libraries worth checking out would be Tuna.js which is a very user friendly/straight forward effects library, or Tone.js for something much more fleshed out and complete.
According to the docs several already seem to be implemented:
Compressor: https://developer.mozilla.org/en-US/docs/Web/API/DynamicsCompressorNode
EQ: https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode
Saturator can probaby be impemented using: https://developer.mozilla.org/en-US/docs/Web/API/ConvolverNode

How can i get started VR Video Development?(editing vr videos)

I want to make simple app that edit my virtual reality videos.How can i get started? I have some programming knowledge (C#, C++,Unity) I am looking for basic editing operations.For example changing background of the video,cropping video.
i did some research on Google but I have lots of questions in my mind.
What languages should I use?What SDK should I use?How can i do that?
The easiest way to get into this is to make a FFmpeg wrapper. It might not be the fastest API and will require lots of hacks to get around, but there is a reason why it's embedded in so many video editing utilities: it works.
You can go via two routes, the API or using the executable and piping in/out of it (C#'s System.Diagnostics.Process with pipes will work well). If you know shell concepts well, I'd suggest starting with the second one.
Word of advice, standalone operations will be easy with FFmpeg, but combining many of them is hard and often requires multiple passes with temporary files.
Edit: oh and about VR, it doesn't matter at this level. It would if you were to be stitching the video or making (but not applying) overlays.

MIT-Scratch adding/removing language features

I am seeking a way to allow my non-tech users to specify a workflow and execute it (if anyone is interested, I want them to specify and execute test cases). Visual programming seems a good way to go.
Can I modify the Scratch IDE to remove some categories (such as sound, motion, etc), and add some of my own? Ditto for individual keywords (obviously, I then need to handle new keywords).
I have Googled, but the answer is not immediately apparent.
[Update] I have just found Google's Blockly
Blockly was influenced by App Inventor, which in turn was influenced
by Scratch, which in turn was influenced by StarLogo.
It looks very promising. Especially when it says
Exportable code. Users can extract their programs as JavaScript, Python, PHP, Dart or other language so that when they outgrow Blockly
they can keep learning.
Open source. Everything about Blockly is open: you can fork it, hack it, and use it in your own websites.
Extensible. Make Blockly fit with your application by adding custom blocks for your API and remove unneeded blocks and
functionality.
One possible snag is that it is browser based, but if my management don't like that, then I can create a dummy Windows based app consisting of little but a TWebBrowser component.
I will investigate and report back - unless someone else posts an acceptable answer first.
The short answer to your initial question is: no. You can't customize Scratch, or not to the extent that you seem to ask/want.
That said, look at:
custom blocks.
scratch extensions.
variants like snap
using scratch's source code in squeak to make your own variant.
other systems inspired from scratch, like appinventor and blockly.
Only the first two are compatible with the scratch web site.
A word on the site: depending on your purpose with Scratch, the exchange between users is a powerful part of scratch. Check how cooperation is supported, like the backpack. There's also a good wiki that documents much of the above.

How hard would it to create a media player (gui fronteend for mplayer), need guiddance for getting started

I am pretty dissatisfied with all the available media players, and I was also looking for a major project to really get into programming. so I am thinking of writing my own media player . Or to be more accurate a gui-frontend for mplayer (something similar to smplayer). How hard would this be.? I have plenty of time (months), and am willing to learn anything.
I practically don't have any knowledge of any windows/gui libraries . My programming experience : tried lots of different languages, wrote a couple of websites in php, lots of practice in java (although did nothing major) . Thats all
Can someone provide some guidance, about where to get started. what all to read. Which language should be used. is C#/.net a good language for this? since I am no expert in any language and have dabbled in plenty of different languages , I think I can pick up any language. Though My main concern is my lack of any practical knowledge . So guide me please.
Lastly my preference is windows (haha whatever), so thats what my target is and thats where I'll doing my coding.
To sum it up I want to create a guifrontend for mplayer that would work in windows.
Thanks
Edit: by mplayer I mean mplayer (the linux one) , and not WIndows media player.
One good place to start could be looking at how the code for gmplayer works - gmplayer is the graphic frontend for mplayer on Linux. It could be that all you really need to do is port the gmplayer code to Windows, then you get a fully integrated GUI instead of just a frontend.
Also, feature request: a nice friendly UI for putting video / audio effects on the output stream (it is so hard to use in the CLI version that most mplayer users probably don't even know it is in there).
I know what I'm going to recommend you is not what you're looking for, BUT:
I'd create a front-end for VLC, which uses Qt, a GUI framework which is extremely usable and easy to start with, in C++.
From my experience as an user, VLC is also more stable and has more features.
Start by copying a working implementation. As you mentioned, SMPlayer exists as a working example of what you want. I'd recommend starting by either hacking it to work better (the playlist really needs more intuitive controls, and multiple monitor support in Windows was nonexistent last time I tried it) or trying to duplicate it in your language of choice.
The benefits of hacking on an existing probject include: the existing codebase works, the margin of work required to make a noticeable change is much smaller, and the existing developers are able to help you come to speed with internals. Also, learning the project's language (C++) would be useful, though it may not be worth the effort if it's more interesting to copy its features in your favorite language.
C# is great for creating any desktop gui quickly. Best way to start with the gui design is to play a bit with the drag/drop components available in visual studio. For the functionality you can use this: http://msdn.microsoft.com/en-us/library/dd564585%28VS.85%29.aspx .