Home > Forum > VideoCapture and VideoPlayer concurrent use of same (say) "output.jpg" file ?

VideoCapture and VideoPlayer concurrent use of same (say) "output.jpg" file ?

Apr 03, 2021
Helmi wrote
Is it possible to use VideoPlayer while VideoCapture is in progress from IP Camera onto the same (say) "output.jpg" file.
I do not want to stop the capture only to "rewind" / view an archive in the same file.
Great SDK !...busy evaluating before buy :-)
Reply
11 Answers
Apr 04, 2021
Roman Miniailov agent wrote
Hi

Thank you!

Please check Timeshift Demo demo of Video Capture SDK .Net.
Apr 04, 2021
Roman Miniailov agent wrote
This reply was about output video files. I'm not sure that it's possible for the same JPG file because it will be saved many times per second if you want to save each frame to the same JPG and read it somewhere.

Also, you don't need Media Player SDK to show JPG files.
Apr 04, 2021
Helmi wrote
Apologies for phrasing my use=case badly.

1) I have an app capturing from IP Camera using VideoCapture SDK for output onto "output.mp4". To manage the archive I plan to DateTime=stampted the filename and create a new file on a 24 hourly basis.

2) I have a second MediaPlayer app to view the "output.mp4" files. It works fine for all archives... except for viewing the file which is currently in use (today) by the VideoCapture App fails...

Concurrent access to the same file is not allowed by Windows/SDK.

I have seen this in operation by other vendors but not sure what trick was used.

Many thanks!



Apr 04, 2021
Roman Miniailov agent wrote
No tricks for MP4 files. These formats are just not designed for this. But, using MPEG-TS format, you can do this job using the same H264/AAC codecs as in MP4.
Apr 05, 2021
Helmi wrote
I think I will be able to find a solution.

The Timeshift Demo of Video Capture SDK .Net looks promising. I can get all samples to work in VS2019 except for the Timeshift Demo. As the demo is not clear on what type of input device and input format is to be preloaded, I cannot get it to work...assistance will be appreciated.

cbVideoInportDevice is empty as the collections property is empty at load time ...and I am not sure if I should write additional code to load to populate cbVideoInportDevice using an Onvif cameras scan ?

..assistance will be appreciated.
Apr 06, 2021
Roman Miniailov agent wrote
Please download the v14.0.30 update.

This demo uses a webcam or other video capture device as a source. You can use it for tests or can add an RTSP source like shown in the IP Capture demo.
Apr 06, 2021
Helmi wrote
Thx... will test..

BTW, I am close to getting a solution for "rewind". I stop the capture to the current "now-file.mp4" and merge this "now-file.mp4" into the current "day-file.mp4". I then start a new now-file.mp4. This gives me the opportunity to browse the new "day-file.mp4"... without concurrency problems. The only challenge I now have is to merge the two mp4 files. I am not sure if this can be done with VisioForge... or if I will need to run an external app to do the merge. This is good for browsing hours in the past. To rewind a few minutes, it will be great if I can get the timeshift function to work. If I have success, I will give feedback to forum.
Apr 06, 2021
Roman Miniailov agent wrote
You can use Video Edit FFMPEG SDK to join videos without reencoding, or save money and use FFMPEG directly, because it's a very simple task.
Apr 06, 2021
Helmi wrote
Thx, will explore ! Load on computer very high for large number of IP cameras...can SDK capture without IPPreview/rendering ?
Apr 06, 2021
Roman Miniailov agent wrote
Yes, you can set Video_Renderer.Video_Renderer property to None to disable video rendering. And use VideoCaptureCore class from VisioForge.Control if you do not want to use WinForms/WPF wrapper and place it on the form.
Apr 06, 2021
Helmi wrote
Wow !