What is a good way to capture a video on linux? - ubuntu-14.04

I need to capture a part of my screen which shows the video. The video looks something like the top-left corner of this screenshot:
What is a good tool for doing this on Ubuntu 14.04? I have tried RecordMyDesktop but it corrupts the video if the video is too fast and if the video is full screen. Is there any other good tool I can use which precisely captures the screen-area I want to, in high definition?

Try Kazam Screencaster, it's the best for myself. Here is a tutorial for ubuntu 14.04.

Related

Detect if video file contains movement

I have a bunch of video clips from a webcam (duration is 5, 10, 60 seconds), and I'm looking for a way to detect "does this video clip have movement", to decide whether the file should be saved or discarded in a future processing phase.
I've looked into motion and OpenCV, but motion seems to only want to work on the raw video stream, and OpenCV seems to be way too advanced for my use.
My ideal solution would be a linux command-line tool that I can feed video files into, and get a simple "does/doesn't contain movement" answer back, so I can discard the irrelevant files. False positives (in a reasonable quantity) are perfectly acceptable for my use.
Does such a tool exist? Or any simple examples of doing this with other tools?
You can check dvr-scan which is simple cross-platform command line tool based on OpenCV.
To just list motion events in csv format (scan only):
dvr-scan -i some_video.mp4 -so
To extract motion in single video:
dvr-scan -i some_video.mp4 -o some_video_motion_only.avi
For more examples and various other parameters see:
https://dvr-scan.readthedocs.io/en/latest/guide/examples/
I had the same problem and wrote the solution: https://github.com/jooray/motion-detection
Should be fairly easy to use from command-line.
If you would like to post-process already-captured video then motion can be useful.
VLC allow you to stream or convert your media for use locally, on your private network, or on the Internet. So an already-captured video can be streamed over HTTP, RTSP, etc. and motion can handle it as a network camera.
Furthermore:
How to Stream using VLC Media Player
If OpenCv is to advanced for you, maybe you should consider something easier which is... SimpleCV (wrapper for OpenCV) "This is computer vision made easy". There is even an example of motion detection using SimpleCV - https://github.com/sightmachine/simplecv-examples/blob/master/code/motion-detection.py Unfortunetely i can't test it(because my OpenCv version isn't compatible with SimpleCV), but generally it looks fine (and isn't complicated) - it just substract previous frame from current and calculate mean of the result. If this value is bigger than some threshold (which most likely you will have to adjust) than we can assume that there were some motion between those 2 frames. Note that setting threshold to 0 is really a bad idea, because always there is some difference between 2 consecuitve frames (changes of lighting, noises, etc).

How to apply a graphical effect on graphical output on the fly under linux?

I need to apply a bitmap effect on the screen image before it's displayed on screen. This must be done in real time. Ideally, this should work with all graphical output, including games. User must be able to use the computer as normal.
Can you advise me what is the best way to do this under linux? Can it be done in x11? Or display driver needs to be modified?
Note: this is a repost of the question where I asked the same thing under windows (I gave up): How to apply an effect on screen image in Windows on the fly?
Thanks!

Get video stream from webcam in Linux

I'm looking for some general way to get video stream from webcam in Linux and then process and show it in a window. The second part seems simple, but I don't know how to deal with the first one.
Is there some API, lib, docs, etc?.. Where to start?
I've done a little of this before, and you're right, the second part is the easy part. You should take a look at this post for some of the commonly used libraries.
Video capture on Linux?
I would also throw OpenCV on that list, since it helps with both the obtaining and the processing of video streams:
http://sourceforge.net/projects/opencvlibrary/
http://www.willowgarage.com/pages/software/opencv
Good luck!

VirtualDub can't record audio, no inputs/sources showing up

I'm using VirtualDub version 1.9.11 to screen capture video game play on my computer. It works amazing for video; however, I can't get my audio to record.
My motherboard is a Gigabyte ga-z77x-ud5h. And I have downloaded the latest audio drivers and even tried older drivers.
Here is an image of what my Sound options in VirtualDub SHOULD resemble. This comes from this VirtualDub tutorial http://www.genadmission.com/vdubguide.html
Here is what my inputs look like, none...
And here are what my sources look like, none...
Any clues on why I have no sources and no inputs? If I plug in a microphone I can get mic input, but that's it.
I learned about uisng VirtualDub from this video tutorial http://www.youtube.com/watch?v=fvfPXn5VQ0w
Solved. Had to enable Stereo mix which was disabled by defualt... why on earth would Windows 7 disable that by default is beyond me.
Seen on this video http://www.youtube.com/watch?v=mjQ_qS-LaoU
I've run DIMH and SFC to see if there are any errors on the system. SFC said a couple of directories had dual owners and corrected that, but it didn't help.
I tried re-connecting the Pinnacle device, thinking that giving the system a choice of more than one device might fix something. VirtualDub sees both video capture devices and will use either one: but it still does not give me a choice of audio input devices.
However, it will let me take the video from the FHD HDMI input and sound from the Pinnacle device, so I have a work-around. It's stupid, and I'd really like to get this working properly, but at least I can use this solution.

How to capture still image from a live video programatically

When i try to take a screenshot of my desktop I found the area of the Windows Media Player window was empty, nothing in it, I google for it for a while and found that most of video players user Overlay surfaces for performance, and overlay surfaces can not be caputured, so some ideas come out said to disable the DDraw accelaration so that you can grap an still image from a live video, but when the player was launched, it's already use the hardware accelaration, even i disable hardware accelaration, it will not take effect until i relaunch the player, my question is: how to capture a image from a live video without diasble the ddraw accelaration? or how to make the settings(disable hardware accelaration) work work without relaunch the video player?
I won't play the vedio with my program, i just want to take a still
image while it is played by a 3rd party player such as Windows Media
Player or Real player etc...
I want to do this programatically, say
by C/C++ and DirectX, so I don't want to use any exsisting software
or tools
No matter which player in use, my program should capture it, I know some tool can do this like CapTrue and tencent qq, so i think it is possible to do so.
A workaround can be to use vlc to play your file. It gives a screenshot option in it directly.
AFAIK, this is an intentional "feature" in WMP, for protection. If you need to have WMP, then you need a decent screengrabber. Unfortunately, the ones I know like hypersnap are not free.
If you only want a screengrab of a frame, VLC is your friend, like #zdd said.

Resources