View Full Version : ffdshow tryouts project: Discussion & Development
fastplayer
6th April 2009, 17:11
@clsid, Haruhiko, _xxl
I have prepared a set of 2 C# projects
Project 1 FFDShowAPI .Net library : this library (used by my plugin Media Control) can be integrated into third party players to communicate with and control FFDShow.
Project 2 sample application in C# too that uses some features of the library (find a FFDShow instance, control playback, list and switch subtitle/audio streams...)
This code is free to use and may be promoted to enhance the integration of FFDShow inside other projects.
The only requirement is to have a .Net compiler (visual studio)
Impressive work! The code is very "readable" :)
To get this project better promoted like you said, you might want to write a small summary about both managed and unmanaged remote APIs in ffdshow.
This would fit perfectly into our "new" wiki:
http://ffdshow-tryout.sourceforge.net/wiki/
_xxl
6th April 2009, 19:14
I have prepared a set of 2 C# projects
* Project 1 FFDShowAPI .Net library : this library (used by my plugin Media Control) can be integrated into third party players to communicate with and control FFDShow.
* Project 2 sample application in C# too that uses some features of the library (find a FFDShow instance, control playback, list and switch subtitle/audio streams...)
You should commit the source to ffdshow-tryouts svn.
clsid
6th April 2009, 21:46
@_xxl
64bit builds fails after your recent changes:
TimgFilterPostproc.obj : error LNK2019: unresolved external symbol simple_idct_mmx_P referenced in function "private: void __cdecl TimgFilterPostprocSpp::filter(unsigned char *,unsigned char const *,int,int,unsigned int,unsigned int,signed char const *,int,bool)" (?filter@TimgFilterPostprocSpp@@AEAAXPEAEPEBEHHIIPEBCH_N@Z)
Edit: fixed
Jeremy Duncan
7th April 2009, 09:17
I'm not sure what Leak did to ffdshow avisynth.
I think he said it doesn't use buffers anymore, but I see a buffer tab in the configuration options?
If I choose no buffers I see no picture but hear sound.
The performance increase is not there imho.
I have tested it with the frame interpolator by fizick.
If anything it goes from low to high cpu useage spazmatically. :D
:angry:
leeperry
7th April 2009, 10:33
I'm not sure what Leak did to ffdshow avisynth.
I also didn't see much change, prolly he meant that these changes only mattered for IVTC and stuff..
Leak
7th April 2009, 11:33
I'm not sure what Leak did to ffdshow avisynth.
I replaced the internal buffers that ffdshow was using for each buffered frame with storing the buffered frames directly in AviSynth's frame cache, saving one full-frame copy operation per buffer.
It probably has the biggest impact with HD-sized video...
And where did I write that I removed buffering?
If I choose no buffers I see no picture but hear sound.
Must be something on your end, as I get a picture no matter what.
np: Gui Boratto - Ballroom (Take My Breath Away)
albain
7th April 2009, 15:51
Impressive work! The code is very "readable" :)
To get this project better promoted like you said, you might want to write a small summary about both managed and unmanaged remote APIs in ffdshow.
This would fit perfectly into our "new" wiki:
http://ffdshow-tryout.sourceforge.net/wiki/
Thanks, I have added a whole section to the wiki.
I have also cleaned the code and added the missing XML documentation.
Now there is a CHM help file that describes all the APIs.
fastplayer
7th April 2009, 16:27
Yes, I've noticed. It's very thorough :)
If you don't mind I'd like to fix a few typos, layout issues, and the screenshots. By the way, if you want to take screenshots without cutting and cropping manually, try Screenshot Captor (http://www.donationcoder.com/Software/Mouser/screenshotcaptor/index.html) (it's free, sign-up needed though)
leoliver
7th April 2009, 19:57
Hi Everyone,
I have ffdshow tryouts revision 2527 installed on my Win XP Pro computer. I wanted to configure FFDShow to play a video, in the Matroska format with WMP 11. But I didn't see any .MKV Codecs in FFDShow's Codecs selection window.
Unless it's listed by another name other than Matroska .
So my question is can FFDShow be configured so I could watch a Matroska video in WMP 11?
I'm attaching a Media Info text file on the Matroska video.
Feedback will be appreciated.
fastplayer
7th April 2009, 20:04
MKV is a container, not a video format. Install this and your MKVs should play fine with WMP:
http://haali.cs.msu.ru/mkv/MatroskaSplitter.exe
tsal
7th April 2009, 20:12
For matroska *.mkv support in winxp or vista you have to install haali media splitter.
http://haali.cs.msu.ru/mkv/
Then you look for the wrong thing in ffdshow, matroska is just the name of the container, its the video and audio codecs inside this container that matter to ffdshow.
For example a lot of user made *.mkv contain h.264 codec video,
then all you need to do is enable h.264 video decoding, which by default is already on.
Hope this helps.
Jeremy Duncan
7th April 2009, 21:40
I replaced the internal buffers that ffdshow was using for each buffered frame with storing the buffered frames directly in AviSynth's frame cache, saving one full-frame copy operation per buffer.
It probably has the biggest impact with HD-sized video...
And where did I write that I removed buffering?
I will supply the blu ray sample and somebody else who knows how can test Leak's new avisynth tweak.
Here's the sample of the mpeg2 mt2s. link to sample from m2ts (http://www.mediafire.com/?etcix9wyz5y)
I read wrong that you removed buffering.
e-t172
7th April 2009, 22:42
I will supply the blu ray sample and somebody else who knows how can test Leak's new avisynth tweak.
Here's the sample of the mpeg2 mt2s. link to sample from m2ts (http://www.mediafire.com/?etcix9wyz5y).
I just tested your sample.
With avisynth disabled: no problem
With avisynth enabled: no problem
With avisynth enabled, buffering 8/8: no problem
Using ffdshow r2867 (public release).
Leak
8th April 2009, 08:29
With avisynth disabled: no problem
With avisynth enabled: no problem
With avisynth enabled, buffering 8/8: no problem
Using ffdshow r2867 (public release).
Didn't have time yesterday to get that sample, but I get the same with a DVD image I always use for testing.
EDIT: Just tested that sample here at work - it works just fine with and without buffering.
(With plain vanilla non-MT AviSynth 2.5.8 from AviSynth.org, FWIW...)
albain
8th April 2009, 09:02
Yes, I've noticed. It's very thorough :)
If you don't mind I'd like to fix a few typos, layout issues, and the screenshots
No problem
fastplayer
8th April 2009, 10:20
No problem
Thanks!
Are you planning to write about the unmanaged remote API that you've developed long ago?
e-t172
8th April 2009, 11:07
I've been playing with ffdshow's structures and I have a question.
If I understand YV12 correctly, in YV12 pictures Y values are 6-bit and UV values are 3-bit. This means that Y values are in the range [0 .. 63] (2^6) and UV values are in the range [0 .. 7] (2^3).
However, in ffdshow's FF_CSP_420P picture data, Y plane (TffPict::data[0]), I have values spread all over the [0 .. 255] range. Is this normal? Are the values normalized to [0 .. 255] by the decoder? Or am I doing something wrong? Is this the same for UV planes?
squid_80
8th April 2009, 11:12
If I understand YV12 correctly, in YV12 pictures Y values are 6-bit and UV values are 3-bit. This means that Y values are in the range [0 .. 63] (2^6) and UV values are in the range [0 .. 7] (2^3).
I don't think you do understand it correctly. All values are 8-bit.
albain
8th April 2009, 11:14
Thanks!
Are you planning to write about the unmanaged remote API that you've developed long ago?
Yes, when I will have some time, it is not on my top priority list for now, but I will do it.
fastplayer
8th April 2009, 11:29
Yes, when I will have some time, it is not on my top priority list for now, but I will do it.
There's no need to hurry :)
By the way, I noticed from your screenshots that the UI controls in Vista are not "themed". Can somebody look into that?
e-t172
8th April 2009, 11:32
I don't think you do understand it correctly. All values are 8-bit.
Indeed. I got it now: the 12 in YV12 means "12 bits per pixel", which means 8 bit for each Y value and 8 bit for each UV value because of the 4:2:0 subsampling (thus the 8-bit U/V values are spread over 2x2 pixel blocks, which means 2-bit U/V information per pixel, 8 + 2 + 2 = 12). Thanks for your time anyway.
Jeremy Duncan
8th April 2009, 12:28
I was thinking the sample would be used to test fps to see how the new avisynth tweak Leak and e-t172 made compares to using how Leak had it before.
leoliver
8th April 2009, 17:40
MKV is a container, not a video format. Install this and your MKVs should play fine with WMP:
http://haali.cs.msu.ru/mkv/MatroskaSplitter.exe
Thanks for the download link.
Thunderbolt8
8th April 2009, 17:41
guys, is there any news on multithreading support for the other 2 codecs, VC-1 and MPEG-2? as I once said before playback of high bitrate AVC stuff is no problem any more, but even on a c2q I get CPU problems with VC-1, especially when trying to add deinterlacing and/or sharpening (although playback alone of HighDef stuff without any other effect is already a little too much load to get it fluid for those codecs). would be great if that could be done as well.
leoliver
8th April 2009, 17:42
For matroska *.mkv support in winxp or vista you have to install haali media splitter.
http://haali.cs.msu.ru/mkv/
Then you look for the wrong thing in ffdshow, matroska is just the name of the container, its the video and audio codecs inside this container that matter to ffdshow.
For example a lot of user made *.mkv contain h.264 codec video,
then all you need to do is enable h.264 video decoding, which by default is already on.
Hope this helps.
The video codec is different than h.264 . So I'll try the haali media splitter .
iron2000
9th April 2009, 19:31
Is MPC internal DXVA H.264 decoder better then ffmpeg-mt?
Played a Full HD video with animated subtitles.
MPC internal codec handled it better than ffmpeg-mt.
avih
10th April 2009, 07:22
Hi,
I see an incompatible behavior between ffdshow tryouts 20080927 (Rev. 2156) and beta6 (or latest clsid build 20090409):
I use ffdshow to capture H.264 using vdub (1.9). My source is interlaced (TV SD - PAL) and I use the input image processing option of ffdshow to deinterlace and resize (in that order on the filters list on the left). On the 2156 build it works well, but on beta6 and latest build it doesn't (tried few deinterlacers such as ffmpeg's, yadif and others). Other filters on the input image processing seem to work (at least resize and image properties which I've tried). Other than the different build, all other options are identical as far as I can tell, and were properly automatically transferred to the new builds.
Has anyone tried it and can reproduce the issue? Is it a known bug?
Leak
10th April 2009, 10:37
My source is interlaced (TV SD - PAL) and I use the input image processing option of ffdshow to deinterlace and resize (in that order on the filters list on the left). On the 2156 build it works well, but on beta6 and latest build it doesn't (tried few deinterlacers such as ffmpeg's, yadif and others).
Have you checked "Process frames flagged as progressive"? I wouldn't be surprised if your video wasn't flagged as interlaced and thus not deinterlaced...
np: Amorphous Androgynous - Yantra (The Peppermint Tree & The Seeds Of Superconciousness)
ACrowley
10th April 2009, 11:05
TrueHD/libavcodec is broken with 2871 ?!
The Output is distored/wrong when i play a M2TS with TrueHD .
Works perfect with 2867 (maybe higher).
Its not caused by MPC MpegSplitter.
avih
10th April 2009, 11:26
Have you checked "Process frames flagged as progressive"? I wouldn't be surprised if your video wasn't flagged as interlaced and thus not deinterlaced...
...
Retried with this option checked, worked. Thanks.
In that case, and due to the fact that the user already checked the "deinterlace" filter and now expects the video to get deinterlaced, probably regardless of frame flags, I suggest a change: either somehow alert the user to the fact that a video might not be flagged as interlaced (capture using vdub wouldn't be too uncommon IMHO, and that produces the unwanted behavior), at which case deinterlace wouldn't work, or check it by default (not so nice) or, my preferred solution, rename the option (and reverse the functionality) to "Disable for frames flagged as progressive" and leave it unchecked by default.
Regardless, thanks for the help.
clsid
10th April 2009, 19:56
There still seems to be a problem with ffdshow and wmp/media center in the current builds. A few people have reported crashes when the player is generating thumbnails. Playback itself is ok.
Jeremy Duncan
10th April 2009, 22:38
ffdshow (http://sourceforge.net/project/downloading.php?group_id=173941&filename=ffdshow_rev2871_20090409_clsid_sse_icl10.exe&a=97416276)
media player classic. updated december 31, 2008 (http://downloads.sourceforge.net/guliverkli2/mplayerc_20081210.zip?modtime=1229004652&big_mirror=0)
Avisynth. march 10, 09 (http://downloads.sourceforge.net/avisynth2/Avisynth_258.exe?use_mirror=voxel)
Reclock. Updated february 16, 2009 (http://files.filefront.com/SetupReClock1834zip/;13306098;/fileinfo.html)
mvtools (http://www.megaupload.com/?d=5RQK6DR2)
2.5.7 MT. march 15, 09 (http://www.megaupload.com/?d=6YJAUXG7)
avisynth 258 mt dll (http://www.mediafire.com/?mbbymniejem)
________ advanced ffdshow: framerate doubler. (ntsc 60hz monitor compatible) ________
Codecs tab
Set Mpeg2 to Libmpeg2, and check "DVD decoding".
Set Avisynth to Avisynth, Raw video to All supported
Subtitles tab, Unchecked
Uncheck "Decode closed captions"
Uncheck "Accept embedded subs"
Uncheck "Accept SSA, ASS, ASS2 Subtitle (experimental)
Vobsub subpage, uncheck Vobsub Enable.
Avisynth tab checked
YV12 checked,
Add FFdshow Video source checked,
3:2 Pulldown box: Ignore Pulldown checked,
check Buffer back/Ahead: 0, 2
MT("""
super = MSuper(pel=2,hpad=8,vpad=8)
backward_vec = MAnalyse(super,chroma=false, blksize=16, overlap=4, isb = true, search=5, searchparam=1)
forward_vec = MAnalyse(super, chroma=false, blksize=16, overlap=4, isb = false, search=5, searchparam=1)
MFlowFps(super, backward_vec, forward_vec, num=2997, den=50, mask=0, ml=49)
""",2)
Resize & aspect tab checked
Multiply by:
1.844 (for 1280x720 16:9 aspect ratio)
2.729 (for 1920x1080 16:9 aspect ratio)
Process Pixel aspect ratio internally checked
No aspect ratio correction checked
spline
Luma Sharpen: 0.00
Accurate rounding checked
Queue & Output tab
Queue output samples unchecked
Very unstable. May cause player to crash.
No box is checked.
Output tab
rgb32 checked
high quality yv12 to rgb conversion checked
rgb conversion tab
ycbcr: itu-bt 601
contrast: standard
Output levels: Tv/Projector
mpc settings
output: vmr9 renderless, reclock audio renderer.
external filters: ffdshow audio and video decoders.
reclock settings: everything default but the video settings tab.
In the video settings tab I unchecked Determine framerate of dvd's, and set both frame rate boxes to 30.
The video has a funny artifacts where there is a trail of frames instead of a steady frame.
In this ffdshow version there is no trail of video artifact: FFDshow. Updated march 10, 2009 (http://downloads.sourceforge.net/ffdshow-tryout/ffdshow_rev2754_20090310_clsid.exe?use_mirror=osdn)
video sample (http://www.mediafire.com/?gnyhfry0xhd)
Blade, ntsc, sd dvd widescreen
The sample was ripped with dvdfab and the 50 MB sample was taken with dgsplit.
I only play from the disk and this artifact is present when played from the disk as well.
mark0077
11th April 2009, 02:05
TrueHD/libavcodec is broken with 2871 ?!
The Output is distored/wrong when i play a M2TS with TrueHD .
Works perfect with 2867 (maybe higher).
Its not caused by MPC MpegSplitter.
I confirm True HD is broken in 2871. Using mpc-hc for decoding True HD now. I may have found another little bug, but maybe someone can clear it up.
I have a m2ts file with True HD and some other Dolby 5.1 tracks on it. The following are the results I get with the True HD track selected.
AC3 - libavcodec
MLP - libavcodec
Result: Stuttering sound (as of new 2871 version)
Expect Result: True HD coming from my speakers, decoded properly by ffdshow.
AC3 - libavcodec
MLP - disabled
Result: Sounds OK, but filter list shows ffdshow is still doing the decoding.
Expected Result: I expected ffdshow to show its getting uncompressed audio, with mpc-hc doing the decoding of the mlp / True HD track, but ffdshow is still decoding something. I just hope its (mpc-hc?) not selecting a lesser quality 5.1 track instead of the True HD one (but True HD track still shows as being the one in use in mpc-hc menu).
AC3 - disabled
MLP - disabled
Result: Sounds OK, mpc-hc doing the decoding, but mpc-hc pin says "Audio: Dolby AC3 48000Hz 6ch 640Kbps"
Expected Result: Shouldn't it say "Dolby True HD" in pin info?
Getting lots of unexpected results.
albain
11th April 2009, 09:27
There still seems to be a problem with ffdshow and wmp/media center in the current builds. A few people have reported crashes when the player is generating thumbnails. Playback itself is ok.
I don't have any crash with latest builds (2871). Do you have more details (revision where is occurs, eventually FFDShow video configuration : FFDShow WMP11 checkbox ticked and alternate decoder used for some formats) so that I look more into this ?
TrueHD/libavcodec is broken with 2871 ?!
The Output is distored/wrong when i play a M2TS with TrueHD .
Works perfect with 2867 (maybe higher).
Its not caused by MPC MpegSplitter.
Weird, I haven't made any test yet but the mlp decoder has been updated in revision 2867 but not after. Can you confirm me this to make me spare some analysis time ? Thanks
*EDIT* : I confirm that the problems comes from revision 2867, probably from the update of mlpdec.c
clsid
11th April 2009, 15:16
One user has rev 2867 on Vista x64. Settings at defaults, raw video is disabled.
Edit: perhaps the problem is related to this bug report:
http://ffdshow-tryout.sourceforge.net/phpBB2/viewtopic.php?t=1125
You can (partially) revert the MLP changes if it fixes the regression. Either the new code from FFmpeg is broken, or it is somehow incompatible with ffdshow parsing code, since it deals with access units and major sync units?
The corresponding FFmpeg revisions are: 18335 to 18338.
princenigma
12th April 2009, 13:51
Today I tried to load ffdshow raw video filter (ffdshow-rev2871_20090409_sse.zip download from free-codecs) in windows media encoder 9.0.2980, WME report 0x80040207 error.
I googled and found this http://forums.logitech.com/logitech/board/message?board.id=quickcam_software&thread.id=59231
seems the gus have the same error.
After some unsuccessful test, I download ffdshow-20041012-sse2.exe from sourceforge,and IT'S OK !
And I just don't know why.
Is there any chance to make the newest ffdshow builds as compatible with WME as ffdshow-20041012-sse2.exe does ?
Best Regards
Leak
12th April 2009, 17:35
Is there any chance to make the newest ffdshow builds as compatible with WME as ffdshow-20041012-sse2.exe does ?
0x80040207 means "VFW_E_NO_ACCEPTABLE_TYPES (There is no common media type between these pins.)" - did you enable "Raw video" on ffdshow's codecs page, i.e. set it to "all supported"?
np: Ricardo Villalobos - Dexter (Alcachofa)
Thunderbolt8
13th April 2009, 01:17
got a bit of image corruption with the slumdog millionaire BD (US) at 33:20, which is not present when using coreavc to play.
http://thumbnails4.imagebam.com/3253/f98fd232529454.gif (http://www.imagebam.com/image/f98fd232529454)
fastplayer
13th April 2009, 10:10
got a bit of image corruption with the slumdog millionaire BD (US) at 33:20, which is not present when using coreavc to play.
Which ffdshow build? libavcodec or ffmpeg-mt? What renderer? etc.
Next time you post a screenshot, use an image hoster that doesn't advertise porn... :rolleyes:
Thunderbolt8
13th April 2009, 10:39
ffdshow 2852, ffmpeg-mt. the problem doesnt occur with libavcodec. renderer, tried haali and avr, but didnt make a difference
clsid
13th April 2009, 12:44
Well, ffmpeg-mt is still experimental and is known for having such bugs. You'll have to wait until MrVacBob fixes it.
princenigma
13th April 2009, 14:02
0x80040207 means "VFW_E_NO_ACCEPTABLE_TYPES (There is no common media type between these pins.)" - did you enable "Raw video" on ffdshow's codecs page, i.e. set it to "all supported"?
np: Ricardo Villalobos - Dexter (Alcachofa)
yes of course :)
ImAhNoBoDy
13th April 2009, 16:16
I have 2 mkv files that have 2 idx/sub each (embedded), but the behavior of each file is not the same when ffdshow is being used to display the subs.
1st mkv file will only play the very first sub throughout the whole movie. Both idx/sub files will do the same thing. The 2nd mkv file will display correctly, but the one of the subs are missing when ffdshow lists them. If I extracts the idx/sub, ffdshow displays them just fine. It's only when the subs are embedded into the mkv container. I did remux them, but still the same issue. Vobsub is able to display the subs correctly. Is this a known issue? If you need a sample, I can provide it later tonight.
albain
13th April 2009, 17:00
One user has rev 2867 on Vista x64. Settings at defaults, raw video is disabled.
Edit: perhaps the problem is related to this bug report:
http://ffdshow-tryout.sourceforge.net/phpBB2/viewtopic.php?t=1125
You can (partially) revert the MLP changes if it fixes the regression. Either the new code from FFmpeg is broken, or it is somehow incompatible with ffdshow parsing code, since it deals with access units and major sync units?
The corresponding FFmpeg revisions are: 18335 to 18338.
I remove the partial portion of code that caused a problem. It was a test on the codecId. I didn't digg it further.
Thunderbolt8
13th April 2009, 21:16
Well, ffmpeg-mt is still experimental and is known for having such bugs. You'll have to wait until MrVacBob fixes it.
np, heres a sample: http://www.sendspace.com/file/qb7fjc
Jeremy Duncan
14th April 2009, 05:32
I hope Leak is fixing the bug I reported in post 7135. What's happening leak?
bwlonsdale
14th April 2009, 14:09
These things are probably already known, but whatever:
High quality YV12 to RGB conversion is broken in x64 builds. It doesn't crash the player, but the video is really discolored.
DeBand is broken in x64 builds. It doesn't crash the player, but the video turns into static.
I'm sure there are other things, but those I use often.
Thank you for your reports, but I can't reproduce.
Sorry to go over (very) old ground, but I've started using x64 builds recently and have run into same issue as this very old post.
Using latest x64 build from clsid and noticed that deband turns the video into a slideshow while the audio continues as normal. When turning off deband, the video resumes where it left off, so the audio is ahead.
Is there a fix for this? I keep reading about turning on the OSD to fix it, but that doesn't seem to work.
haruhiko_yamagata
14th April 2009, 15:01
Sorry to go over (very) old ground, but I've started using x64 builds recently and have run into same issue as this very old post.
Using latest x64 build from clsid and noticed that deband turns the video into a slideshow while the audio continues as normal. When turning off deband, the video resumes where it left off, so the audio is ahead.
Is there a fix for this? I keep reading about turning on the OSD to fix it, but that doesn't seem to work.
MSVC2008 doesn't optimize MMX intrinsics, it's just very very slow. Please use x86 build or give up deband for now.
haruhiko_yamagata
14th April 2009, 15:15
I have 2 mkv files that have 2 idx/sub each (embedded), but the behavior of each file is not the same when ffdshow is being used to display the subs.
1st mkv file will only play the very first sub throughout the whole movie. Both idx/sub files will do the same thing. The 2nd mkv file will display correctly, but the one of the subs are missing when ffdshow lists them. If I extracts the idx/sub, ffdshow displays them just fine. It's only when the subs are embedded into the mkv container. I did remux them, but still the same issue. Vobsub is able to display the subs correctly. Is this a known issue? If you need a sample, I can provide it later tonight.
I think it's a known issue. Vobsub support in ffdshow is very incomplete. But could you send us the samples? I would like to add them to my collection for the occasion I get time to fix.
(It's long term todo, and my "long term" is years.)
fastplayer
14th April 2009, 15:24
(It's long term todo, and my "long term" is years.)
:D Dunno why but this line cracked me up! :D
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.