Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.


Go Back   Doom9's Forum > Programming and Hacking > Development

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 27th November 2019, 14:14   #1  |  Link
Registered Lurker
Join Date: Jun 2002
Posts: 6,427
How to do multi-threaded video rendering with C#/VB.NET ?

I'm working on an app (staxrip) that uses a video library (avisynth/vapoursynth) and GDI for video rendering.

In its current state it's inefficient because it's not multi-threaded and not hardware accelerated, in particular 4K/UHD is painful slow.

Before trying to render it with opengl or directx I want to try to multi-thread it and see if it's good enough.

Playback is not required, only showing frames when a trackbar/slider is moved.

Currently, it works like so:

1. track bar is moved by user
2. native video library is queried for a frame, can be slow for large videos
3. native frame is converted to a WinForms bitmap
4. Bitmap is rendered with GDI (System.Drawing)

All this happens in the same thread and I believe it would be much faster with multi-threading.

I think my threading knowledge is not good enough for this task, which .NET threading techniques can I try? Or should I maybe forget about GDI and try opengl or directx, I don't know much about that either but I can learn it.
stax76 is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 10:41.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.