View Full Version : Multi-threaded Video Filters or Multi-threaded Video Post-processing
Deshi
21st November 2011, 09:32
Hi everyone,
Is there one or several multi-threaded filters in Mplayer ?
Except for decoding of course.
If not, is it possible to force a filter to a particular thread or core ?
Is there another player that can do it ?
Is there some kind of "server" which would make the multi-threaded filtering and then pass it to the player ? Like ffdshow does for Win.
nm
21st November 2011, 11:50
Is there one or several multi-threaded filters in Mplayer ?
Except for decoding of course.
Nope.
If not, is it possible to force a filter to a particular thread or core ?
No, that would require a thread-safe, parallel-processing filter chain, which MPlayer doesn't have AFAIK.
Is there another player that can do it ?
Is there some kind of "server" which would make the multi-threaded filtering and then pass it to the player ?
GStreamer is thread-safe, but I don't know if the queue mechanism it uses allows parallel filtering.
Deshi
21st November 2011, 17:21
Hi, thanks nm,
yes I've noticed gstreamer when I've seen that Totem was a really good player also.
I've read that it was entirely multi-threaded but with all the plugins and pipelines "stuff" I'm quite confused about what it does or not...:stupid:
nm
21st November 2011, 20:08
I've read that it was entirely multi-threaded but with all the plugins and pipelines "stuff" I'm quite confused about what it does or not...:stupid:
Yep, I haven't studied it more closely. Even if a filtering chain is multithreaded, it might run sequentially in practice. And even if parallel processing has been in their mind, there might be bottlenecks that make it run slowly.
Deshi
22nd November 2011, 08:53
So I guess we'll have to test that...
I have to admit that I really liked the config "process" for Mplayer, I'm not sure to acheive the same with Totem. We'll see...
Otherwise, I found these in my many researches :cool:
http://avisynth3.unite-video.com/download.html
In the snapshots section there's an archive "20070211" which contain code to build for win and for Linux.
Do you have any idea if that would work ?
If that works, how do you put in the video chain between source and player ?
nm
22nd November 2011, 14:16
So I guess we'll have to test that...
I have to admit that I really liked the config "process" for Mplayer, I'm not sure to acheive the same with Totem. We'll see...
I don't think Totem allows you to build custom filter chains or graphs, so it's not useful for this purpose.
Gst-editor could make it easier to run filtering experiments:
http://code.google.com/p/gst-editor/
Otherwise, I found these in my many researches :cool:
http://avisynth3.unite-video.com/download.html
In the snapshots section there's an archive "20070211" which contain code to build for win and for Linux.
Do you have any idea if that would work ?
AviSynth 3 is far from finished and it doesn't have enough filters to be useful in the current state.
AviSynth 2.5 and 2.6 run well in Wine, so you could build a player with winelib. Multi-threading in AviSynth might not be reliable in every case though.
Deshi
23rd November 2011, 11:04
Hi nm,
Thanks for the gst-editor link !
Concerning Avisynth, if I understand correctly (I'm such a newbie in GNU/Linux) :
- Install Wine
- Install Avisynth via Wine
- Build Mplayer from sources with winelib in addition
Do you have an idea on what a command would look like for Mplayer and this use of Avisynth ?
Is there a place where I can identify which Avisynth filtering will be multi-threaded ?
nm
23rd November 2011, 13:00
Hi nm,
Thanks for the gst-editor link !
Concerning Avisynth, if I understand correctly (I'm such a newbie in GNU/Linux) :
- Install Wine
- Install Avisynth via Wine
Yes. But in case of AviSynth 2.5.x, you only need avisynth.dll and devil.dll somewhere in Wine's DLL path. They could be put to the same directory with the program too.
You probably also need to install vcrun6sp6 with winetricks:
winetricks vcrun6sp6
- Build Mplayer from sources with winelib in addition
This won't be easy. You need to modify the build process and possibly the source code too. Nobody has done this before.
Do you have an idea on what a command would look like for Mplayer and this use of Avisynth ?
mplayer script.avs
The hard part is writing/generating script.avs. Read up on AviSynth usage here: http://avisynth.org/mediawiki/Main_Page#New_to_AviSynth_-_start_here
Note that you need to use FFMpegSource (http://code.google.com/p/ffmpegsource/) instead of AviSource or DirectShowSource.
Is there a place where I can identify which Avisynth filtering will be multi-threaded ?
AviSynth-MT (http://forum.doom9.org/showthread.php?t=148782) can split all filters to multiple threads, but there might be stability issues with some parameters and filter combinations.
Tips for running AviSynth on Wine:
http://ubuntuforums.org/showthread.php?t=1333264
http://forum.doom9.org/showthread.php?t=161925
Deshi
24th November 2011, 10:03
Yes. But in case of AviSynth 2.5.x, you only need avisynth.dll and devil.dll somewhere in Wine's DLL path. They could be put to the same directory with the program too.
You probably also need to install vcrun6sp6 with winetricks:
winetricks vcrun6sp6
Ok, so with the latest build (2.6) I need an install via Wine + vcrun6sp6. Just for info what does it do, vcrun6sp6 ?
This won't be easy. You need to modify the build process and possibly the source code too. Nobody has done this before.
So, when you said "build the player with winelib", which player did you have in mind ?
Thanks for all the info and links to Avisynth, I have something to read for the week-end ;)
nm
24th November 2011, 13:00
Ok, so with the latest build (2.6) I need an install via Wine + vcrun6sp6. Just for info what does it do, vcrun6sp6 ?
Visual C++ 6 runtime libraries. Needed by some of the essential components since built-in Wine versions don't exist or work well enough. I haven't tried latest Wine versions though.
If you want to install AviSynth 2.6, its DevIL.dll 1.7.8 needs vcrun2005sp1.
So, when you said "build the player with winelib", which player did you have in mind ?
Well, I said build a player, meaning "write your own player or modify one". But MPlayer might be easiest to start with since it already has AviSynth support on Windows.
Deshi
24th November 2011, 16:30
Visual C++ 6 runtime libraries. Needed by some of the essential components since native Wine versions don't work well enough. I haven't tried latest Wine versions though.
If you want to install AviSynth 2.6, its DevIL.dll 1.7.8 needs vcrun2005sp1.
Many thanks for that.
Well, I said build a player, meaning "write your own player or modify one". But MPlayer might be easiest to start with since it already has AviSynth support on Windows.
Oooooooooook... this might be well over my feeble skills my friend :stupid:
sl1pkn07
28th November 2011, 12:39
try this
install avs2yuv or avs2pipe
then: wine avs2yuv script.avs - | mplayer -
i dont know working. but is a excelent experiment
greetings
nm
28th November 2011, 13:10
Yep, experimenting with avs2yuv/avs2pipe is a good idea. These tools don't pipe both audio and video at the same time though, so they are not full playback solutions. But at least you can confirm that you have a working AviSynth installation and test the video playback performance.
Deshi
29th November 2011, 11:20
Thanks a lot sl1pkn07 and nm,
more testing to come...:D
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.