Can we have different resolutions for Preview and Capture of the same DirectShow graph? - directshow

I have 2 streams, one for Preview and one for capture in my DirectShow application. Right now, we observe that the Preview is slow for 1080P video and 1280*720 video. I would like to know if we have any method to have different resolutions for the capture and preview streams. If we have any, I can use the high resolution at capture side alone and at Preview, I am OK to display low resolutions.
Thanks

You can connect the capture output to a Infinite Tee filter. Use one output of the tee filter to capture, connect the second output to a resize filter, and use that to preview.
On some hardware you can use preview output directly in a different resolution. But not all hardware supports that. for example some hardware does not scale the preview, so if you use a lower resolution, you only see the top left part of the video. And other hardware does not have a preview pin at all...

Related

How to get image from preview panel, DirectShow.Net

i am writing an app that preview then capture video from a Video Device (ex:Cam), i didn't found a solution to take a snapshot during capturing with a ASF format.
so i thought i could take a picture from the preview panel but the background-image didn't contain it, and the image property of is null if i use a Picturebox .
do anyone knew how Directshow use the panel or Picturebox to preview video?
Typical solution for capture with preview is to add a tee (smart tee) and then do writing and presentation on the outputs of that tee respectively. PlayCap DirectShow.NET sample shows how to visualize video feed. Video renderer provides methods to read back last presented video frame, so that you could make a snapshot out of it.
Separate parts of this task have been discussed many times, including here:
Preview a camera in DirectShow and capture a still image - in VB.net
VB.Net Directshow Webcam Snapshot
Capturing pictures from webcam at high resolution while previewing at a lower one using DirectShow.Net
DirectShow - Capture Webcam While Viewing It?

Framebuffer access order

I've got two applications on my Raspberry Pi drawing things on the display. The first one is a video stream, the second an overlay with transparency. The video stream is rendered by the official raspivid program, and my overlay with eglfs (Qt QML).
How can I choose the order images are rendered so that my overlay is on top of the video, and not the opposite like now. Who manages the buffer access? How to configure it?

Quicktime X - How to hide mouse during screen capture?

I am attempting to record an app demo on the simulator, and want to use the Quicktime screen capture feature. However, I would like to hide the mouse during the capture.
Is this possible?
Doesn't seem to be a built in feature, so I am assuming I need to use some sort of plugin or hack.
Any suggestions?
QuickTime itself does not seem to offer this functionality therefore you have to resort to some other means to hide the cursor. On OSX there are some tools that allow this.
Cursourcerer is the first that springs to mind. However, as this really hides the cursor, it might not be ideal as you yourself will not be able to see what you are doing.
However, if you do not need to use QuickTime per se, it seems there are commercial screen recording solutions allowing this sort of thing such as Screenflow. I am not affiliated but the price seems reasonable and there is a demonstration of desired behavior here.
You don't record your app in your computer, but directly on your iPad or iPhone, connected to your Mac with a lightning cable. Then in Quicktime you select the "New movie recording" option (instead of "New screen recording"), then you will be able to select your iPad/iPhone as the "camera" and start recording your app running in your iOS device without any mouse pointer.
https://obsproject.com/
OBS can record your app window, and it ignores the cursor on the window.
Useful even if you are not a youtuber.
Cursorcerer for 10.14+ ⇨
http://doomlaser.com/cursorcerer-hide-your-cursor-at-will/
MouseHider.app for 10.13 and earlier ⇨ https://apps.apple.com/us/app/mouse-hider/id894419721?mt=12
I use option+command+k (⌥+⌘+k) to show / hide. It works globally.
It's also useful to hide the mouse cursor when you do the control-scroll zoom trick to focus in on a video.

How to resize Video capture in DirectShow?

I've look around in the documentation but can't find a good way to do this.
I capture video from my webcam and connect it to a ISampleGrabber filter to take screenshots. Which works fine but I would like to be able to scale the resolution on the video.
Thanks for any guidance!
Resizing in software is a relatively expensive operation, for which you also don't have an out of the box working component in DirectShow. You are typically more interested in setting proper capture resolution in first place, so that you don't need to resize.
Can't change video capture resolution using c#
Video Capture output always in 320x240 despite changing resolution
To resize video on runtime, you need either third party filter, or a custom filter, or instead copy a video from DriectShow pipeline and resize it there e.g. using StretchBlt API.
You can do the re-sizing job by manipulating the bitmaps you captured from directshow and then push them to new video file. However I generally do not recommend that .
FFmpeg already have this function integrated.
ffmpeg -i input.avi -s [width]x[height] output.avi

Apply a Filter to a Camera video stream publishing to Media Server

I am Trying to Apply some information Like text and An Image as an overlay to create a overlay effect as lice a security camera with time and date on the video along with a png based Logo.
I can record VIDEO Using Flex and FMS or any other Media Server. But I want to save a modified version of the stream being uploaded.
Use camTwist (mac) or webcammax (pc) as your video input...you can use that program to use the webcam and then add whatever over it (text, date). Use Flash Media Live Encoder and select camTwist as your video source. Stream and save your recordings using that FMLE.
Sorenson Squeeze is pretty awesome for this and is cross platform. Camtwist is cool but it's not really a 'pro' app, that makes me sound way snobbish. It's actually pretty fun and a good suggestion for a simple result but I haven't found anything better than Sorenson Squeeze for the features and control it gives you.

Resources