View Full Version : ffdshow tryouts project: Discussion & Development
betaking
26th May 2011, 05:55
last ffdshow3855-3859 borker all libavcodec for ffdshow audio codec like this post
http://forum.doom9.org/showthread.php?p=1489956#post1489956
I test 3853 no problem!
god_md5
26th May 2011, 10:51
3859 still crashing ..
sample
http://dl.dropbox.com/u/3668343/not_saw_sub-2011-05-16.ts
http://dl.dropbox.com/u/3668343/%E5%86%92%E9%9A%AA%E7%8E%8B%20-%20J2%20-%202011-05-16.ts
adam777
26th May 2011, 16:59
Rev. 3856 or 3857 (MSVC2010) breaks H.264 using ffmpeg-mt.
Works fine in 3855, crash in 3857 and 3859. I was unable to find a 3856 binary.
Sample - http://www.mediafire.com/?w0jfpn4ztyq7xzm
clsid
26th May 2011, 19:50
Crash seems to happen when converting to NV12. Can you confirm if the crash is gone when you uncheck NV12 on the Ouput page?
alexins
26th May 2011, 20:23
Crash seems to happen when converting to NV12. Can you confirm if the crash is gone when you uncheck NV12 on the Ouput page?
Yes, I confirm! If you disable conversion in NV12, it all works without errors!
adam777
26th May 2011, 20:36
Confirmed here as well, YV12 works fine.
clsid
26th May 2011, 22:41
3856 breaks it but I don't know why yet. Help is appreciated to get this fixed quicker.
nevcairiel
27th May 2011, 09:20
The changes to swscale in libav are just broken. This was confirmed by Michael Niedermayer (the ffmpeg maintainer) on the mailing list this morning, when he tried to merge them over to ffmpeg.
So much for "libav is the more stable version". :p
clsid
27th May 2011, 12:05
The NV12 bug is from a bit older code. Yesterdays code indeed had another crash, this time with resizing, that is probably due to the bugs Michael has fixed now.
CruNcher
29th May 2011, 11:29
Didn't i reported that problem ;) http://forum.doom9.org/showthread.php?p=1501095#post1501095
so 80% ffdshow was correct then ? :)
Yes, I confirm! If you disable conversion in NV12, it all works without errors!
thx for reproducing, though still not sure if it's the exact same issue i experienced :)
The NV12 bug is from a bit older code. Yesterdays code indeed had another crash, this time with resizing, that is probably due to the bugs Michael has fixed now.
So my reported issue still belongs to this older NV12 code ?, the issue is still active madvr still shows this grayscale half green output with ffdshows nv12 in the chain ffdshow_rev3861_20110527_xhmikosr_icl12.exe and ffdshow_rev3861_20110527_xhmikosr_MSVC2010.exe :(
The issue isn't visible using Leads Colorspace converter NV12 http://www.leadtools.com/help/leadtools/v16/Multimedia/api/Filters/LEADVideoYUVConverter.htm
Lead Colorspace Converter (OK, no crashes on vmr output is ok on every renderer):
Input: Video: NV12 1920x1080 23.98fps
Output: Video: NV12 2048x1080 (16:9) 23.98fps 596594kbps
FFdshow Colorspace Converter (MadVR strange chroma issues,VMR renderer causes crashes):
Input: Video: NV12 1920x1080 23.98fps
Output: Video: NV12 2048x1080 (16:9) 23.98fps
3856 breaks it but I don't know why yet. Help is appreciated to get this fixed quicker.
back to 3703 i tried it now every build no matter if clsid or xhmikosr both show the same issue (so old NV12 code would make perfect sense) so i guess those are 2 different issues we are talking now about 1 based on this old NV12 code and 1 that was fixed based on the scaling issue ?
clsid
30th May 2011, 16:55
That is a different issue. Add it to the bug tracker.
hoborg
30th May 2011, 20:00
Here is a .ts sample. (https://rapidshare.com/files/1479703935/crash.zip)
FFDShow DXVA = crash
Just tested with "ffdshow_rev3863_20110530_xvidvideo-ru_x86-msvc2010.zip" - still crashing :/
clsid
30th May 2011, 20:59
That file does not crash here (with libavcodec/mt/dxva). Using MPC-HC and Haali splitter.
hoborg
30th May 2011, 21:41
That file does not crash here (with libavcodec/mt/dxva). Using MPC-HC and Haali splitter.
I am using LAVF .28
Libavcodec+FFMpeg-MT = no problem, only FFDshow DXVA crashing.
LAVF .28+PDVD11 DXVA = no problem.
Hmm, MPC-HC mpeg splitter + FFDShow DXVA working too. Strange.
clsid
30th May 2011, 23:11
I am not going to invest any more time in this. The stream is corrupt. Don't use DXVA or use a different splitter. Or find someone else to fix it.
kieranrk
30th May 2011, 23:51
I am not going to invest any more time in this. The stream is corrupt. Don't use DXVA or use a different splitter. Or find someone else to fix it.
The stream is fine. The only problem with it is that the AUDs in the first two access units have a missing zero in their startcodes.
hoborg
31st May 2011, 06:46
I am not going to invest any more time in this. The stream is corrupt. Don't use DXVA or use a different splitter. Or find someone else to fix it.
I have more of them. All af them are "normal" h.264 recordings.
But i understand you.
hoborg
1st June 2011, 20:25
BTW, here (http://www.demo-world.eu/trailers/redirect-high-definition.php?file=hd_thx_cavalcade.rar) is another FFDshow DXVA + LAVF crashing sample.
This one is from High Definition Trailers (HD) (http://www.demo-world.eu/trailers/high-definition-trailers.php)
nevcairiel
2nd June 2011, 16:08
Here is a fix for the DXVA crash with LAV Splitter. It was clearly ffdshows problem, as it mis-detected a H264 AnnexB Startcode in a MKV/MP4 type H264 stream.
I'm a bit unsure why it only happend with LAV, maybe because my MKV/MP4 style length field is 4 bytes - do the other splitters only ever use 2? Oh well.
Anyway, crash fixed for me:
http://files.1f0.de/ffdshow-dxva-lav.patch
hoborg
2nd June 2011, 17:17
Anyway, crash fixed for me:
http://files.1f0.de/ffdshow-dxva-lav.patch
You rule! :D
mandarinka
3rd June 2011, 23:11
What needs to be done on the side of ffdshow to enable decoding high 10 profile h264 video? As I understand it, 8bit yv12 or rgb32 has to be output to video renderers in majority of cases (or vsfilter if it is being used). WIll it be possible to refurbish the present hq yv12 to rgb32 converter, or will it require using swscale instead?
Sebastiii
4th June 2011, 08:57
Here is a fix for the DXVA crash with LAV Splitter. It was clearly ffdshows problem, as it mis-detected a H264 AnnexB Startcode in a MKV/MP4 type H264 stream.
I'm a bit unsure why it only happend with LAV, maybe because my MKV/MP4 style length field is 4 bytes - do the other splitters only ever use 2? Oh well.
Anyway, crash fixed for me:
http://files.1f0.de/ffdshow-dxva-lav.patch
Thanks :)
e-t172
4th June 2011, 19:19
I'm posting here in case anyone's interested: I just released a patch which adds an IVTC (pulldown removal) filter to the ffdshow video filter chain. It handles hard 30i, soft 30i, and hard 60p. I don't have time to debug or improve it however, so you should see it as a proof-of-concept filter, provided "as-is" and not suited for everyday use. Its main goal is to be VERY fast: with the right parameters it is able to handle hard 1080i30 in realtime with near-perfect results and very low CPU usage. Details here (http://forum.doom9.org/showpost.php?p=1505473&postcount=778).
BloodySword
4th June 2011, 21:26
Why is the setting "Set pixel aspect ratio in output media type" gone? I don't want that ffDshow reports the aspect ratio in output media type! How can I disable it?
kostik
6th June 2011, 19:51
Hey,
Recently Madshi has updated MADVR Renderer and added new colorspace formats which include 16bit and 10 bit.
Is it going to be difficualt to implement those formats to output to MADVR?
* added support for 10 bit 4:2:2 media types P210, Y210, v210
* added support for 10 bit 4:4:4 media types Y410, v410
* added support for 16 bit 4:2:2 media types P216, Y216, v216
* added support for 16 bit 4:4:4 media types Y416, v416
* added support for 16 bit RGB media types RGB48, RGB64, b48r, b64a, ...
Pleassseee!
Thanks!!!
hoborg
6th June 2011, 20:09
Here is a fix for the DXVA crash with LAV Splitter. It was clearly ffdshows problem, as it mis-detected a H264 AnnexB Startcode in a MKV/MP4 type H264 stream.
I'm a bit unsure why it only happend with LAV, maybe because my MKV/MP4 style length field is 4 bytes - do the other splitters only ever use 2? Oh well.
Anyway, crash fixed for me:
http://files.1f0.de/ffdshow-dxva-lav.patch
Just tested ffdshow tryouts project, svn 3871 (x86) - MSVC2010
The crash is fixed, but this sample (https://rapidshare.com/files/1479703935/crash.zip) freeze instead :/
nevcairiel
6th June 2011, 21:53
I'll try to fix that in LAV Splitter soon, already have some ideas for improvements.
RealSnoopyDog
6th June 2011, 23:23
Hi, thanks for all the updates. nevcairiel's patch definitely fixes the DXVA decoder crash on several H.264 sources.
But there is another issue with H.264 playback on latest build 3871: when jumping around (seeking) in the media file or when subtitles should pop up, the decoder crashes - regardless if i use the DXVA or the non-DXVA version. If i replace the 2 DLLs "ffmpeg.dll" and "ffmpegmt.dll" with those from the previous build 3866 (11-05-30) everything works fine, including nevcairiel's patch.
robpdotcom
7th June 2011, 03:41
I'm posting here in case anyone's interested: I just released a patch which adds an IVTC (pulldown removal) filter to the ffdshow video filter chain. It handles hard 30i, soft 30i, and hard 60p. I don't have time to debug or improve it however, so you should see it as a proof-of-concept filter, provided "as-is" and not suited for everyday use. Its main goal is to be VERY fast: with the right parameters it is able to handle hard 1080i30 in realtime with near-perfect results and very low CPU usage. Details here (http://forum.doom9.org/showpost.php?p=1505473&postcount=778).
I've tried this out, and it works pretty well, some material better than others, but overall it seemed ok - it would be very nice if someone would take it over to "finish" it.
I think it's suited particularly well to be used in ffdshow - it would allow you to easily switch between IVTC and deinterlacing (such as yadif), depending on whether the source is film or video based. It's a lot better than having to switch decoders.
BTW: While I was playing with it, I was trying to set up a keyboard shortcut to toggle deinterlacing on/off (so I could set a button on my remote), but I never could get it, or any other keyboard shortcuts, to work. Is there some trick to get the shorcuts to work? Something simple I could be overlooking?
These are my settings. Could someone tell me what keys I would press to, say, toggle the OSD?:
http://666kb.com/i/bu55mh3bd29q9ce4i.jpg
BloodySword
7th June 2011, 06:46
Why is the setting "Set pixel aspect ratio in output media type" gone? I don't want that ffDshow reports the aspect ratio in output media type! How can I disable it?
burfadel
7th June 2011, 13:54
Both the xhmikosr and xvidvideo builds of ffdshow rev 3671 doesn't work for me. Only tried playing back h264, as that is what I wanted to watch! all previous versions worked, including 3668.
The issue is there are big strips running vertical on the screen (not moving).
hoborg
7th June 2011, 13:56
BTW: While I was playing with it, I was trying to set up a keyboard shortcut to toggle deinterlacing on/off (so I could set a button on my remote), but I never could get it, or any other keyboard shortcuts, to work. Is there some trick to get the shorcuts to work? Something simple I could be overlooking?
These are my settings. Could someone tell me what keys I would press to, say, toggle the OSD?:
By default CTRL+ALT+O - no problem here.
clsid
7th June 2011, 13:57
Why is the setting "Set pixel aspect ratio in output media type" gone? I don't want that ffDshow reports the aspect ratio in output media type! How can I disable it?Unless you explain what kind of problem you are having, we can't help you.
clsid
7th June 2011, 14:06
I am not having any problem with H.264 with r3871. More details please.
burfadel
7th June 2011, 15:23
Just tried r3871 again, its the resize filter which is broken! I simply disabled that whilst playing a video and it worked fine, re-enabling it caused the issue again. I tried a few different resize methods and that didn't help.
I use the resize filter (sinc, with some luma sharpen) to upsample playback to a HDTV. Its for this reason I'm going back to r3868 again! I'm guessing it got broken with r3869 when swscale was updated :) Both MSVC2010 and ICL12 builds are affected.
clsid
7th June 2011, 15:29
Yes, just found out the vertical stripes issue is indeed caused by resize.
BloodySword
7th June 2011, 15:59
Unless you explain what kind of problem you are having, we can't help you.
The problem is that while displaying the picture has a fixed aspect ratio, no mather how I resize my Player's window. My Player has it's own Aspect ratio resizing method by placing the window in the correct position and with correct size.
I now reverted back to rev3853, this version does not report the aspect ratio in media type but the newest version does. But in both versions there is no checkbox to tell ffDShow not reporting the aspect ratio in the media type. I would be VERY pleased if you would place the checkbox in the new revision whee the User could control this behaviour. Thank you!
nevcairiel
7th June 2011, 16:07
That sounds like your player is not doing what you want.
ffdshow just tells the player the aspect ratio of the movie, what the player does with that is only the players responsibility. In fact, without this info, it would never know which AR the movie was supposed to be in the first place!
I suggest you fix your player. That option does not change anything about the image, it just tells the player about the AR. If the player forces that on you and doesn't let you change the AR, its the players fault.
BloodySword
7th June 2011, 16:14
No, I set the IMediaWindow.Left, Top, With and Height. The Video-Renderer uses its own AspectRatio, wich is reported from ffDShow and that is what I want to disable! So I want, that the renderer fills the Rect I give with the propertys above.
NOT the Player is told about aspect ratio, it is the Vireo Renderer that gets this information on DirectShow.
Edit3: To clarify, when ffDSHow sets 4:3 aspect ratio, and I set 16:9 in my player because 16:9 is the correct AR, the Video Renderer makes it 4:3 INSIDE the 16:9 frame... That is what my problem is.
Edit 2: The main reason is, this would not be a problem when the aspect ratio in my videos would be correct... I could set the aspect ratio "free" in my player but 90% of my videos have a wrong setting in the video stream or container... Is there a method to change this without reencoding?
nevcairiel
7th June 2011, 16:27
But you can still tell the video renderer how you want it to handle AR, they usually at least implement a mode to keep AR and letter box, or just ignore AR.
For VMR, its for example IVMRWindowlessControl9::SetAspectRatioMode, for EVR IMFVideoDisplayControl::SetAspectRatioMode
BloodySword
7th June 2011, 16:34
The problem is that this player is written in VB6, a C#.NET WPF-Version is in development but I just want to use my old player till I completed the new one.
In VB6, I don't know how to determine wich Video Renderer is used and I don't know if there are typelibs for COM wich is compatible to VB6 for the classes you mentioned. :(
clsid
7th June 2011, 16:47
If 3853 works, then it is probably 3859 that 'broke' it.
Send me your player and a small sample video for testing and I can fix it.
BloodySword
7th June 2011, 16:57
In very old versions there was a check box to disable it: "Set aspect ratio in media type" on the "Output" page. I would be pleased if you just would add it again. I think 3853 is "broken" and not 3859, 3859 does it "right" but not for all users as you can see. So getting back this option checkbox is the best thing you can do for all users. By default the checkbox should be checked.
Should I send the source code or just the binary?
Just for info: The player uses its "own" codec "on/off switcher", and I install ffDShow in it's codecs path with must relay there where the player is. But as long you don't use the codec on/off switcher: don't worry about that. Just ignore it.
@All: How can I change the aspect ratio in an H264 stream without reencoding? Can the container (MP4) override this setting?
On MPEG-2 (VOB / PS) I have a header modifier program. "ReStream"
Edit: Player will follow...
Edit2: http://www3.zippyshare.com/v/756077/file.html
Edit3: Regarding the sample file, can it be a shot piece of video and audio? Because of copyright problems?
I have found more information: In the info page of ffDShow rev3853 it shows DAR: 16/9 but the video renderer dosn't take care about it so I can change the AR in my player like I want. In the latest version, DAR: 4/3 is reported and the video renderer respects it.
Chikuzen
7th June 2011, 18:50
@All: How can I change the aspect ratio in an H264 stream without reencoding? Can the container (MP4) override this setting?
MP4Box -add clip.mp4:par=num:den -new remuxed.mp4
BloodySword
7th June 2011, 19:47
MP4Box -add clip.mp4:par=num:den -new remuxed.mp4
Thank you, I will try this. But what is with the information in the H264 video stream itself?
Created a batch script: "C:\Program Files (x86)\megui\tools\mp4box\MP4Box.exe" -add %1:par=%2 -new %1_arcorrection.mp4
How can I remove .mp4 out of %1 within this one liner?
@nevcairiel:
Could you please help me develop my new WPF-Based player?
In my first tests I use QuartzTypeLib via Interop. Is this correct?
I need a full list of Classes and DLL Imports I must use for full functionality (eg AspectRatio control of renderers etc.)
We could communicate via E-Mail. Many Thanks!
Chikuzen
7th June 2011, 19:54
But what is with the information in the H264 video stream itself?
IIRC, MP4Box overwrites information not only in the container but also in the stream at the same time.
madshi
7th June 2011, 20:32
In very old versions there was a check box to disable it: "Set aspect ratio in media type" on the "Output" page. I would be pleased if you just would add it again.
This option was removed because hiding the aspect ratio information from the renderer doesn't really make too much sense. I've had a couple of bug reports for my madVR video renderer which were caused by this old option being accidently disabled. So removing the option helped fixing accidental bugs. Now adding the option back in just to work around a player issue doesn't sound like a good idea to me. It'd be better to improve your player so that it can tell the renderer to use the aspect ratio you want.
BloodySword
8th June 2011, 06:49
That is simply not possible because the librarys I have to use are not usable in VB6. I'm working on a new, more modern player (latest change on my old player was effectively 2005, from there on I only fixed some small bugs) but I need help to use the correct librarys. The player will be written in C#.NET4 with WPF. I use Quartz.dll via Interop. Is this correct or is there another libary wich is better for DirectShow on XP SP3+?
But since the new player is even not in alpha stage, I want to use my old one.
The new player will get his own GraphBilder code (but "RenderFile" can be used as well when you switch it) you can specify source filter, splitter, decoder, add other filters and finally the renderer in the "Graph building options" by file extension or recognized media type. In this case the graph would be built much faster. And if it fails, it will use "RenderFile()" as a fallback.
When the player is compleded, am I allowed to include the download of newest ffDShow in my installer?
madshi
8th June 2011, 08:37
But since the new player is even not in alpha stage, I want to use my old one.
If this is just a temporary fix until your new player is ready, then why not simply using an older ffdshow build for now? Then when your new player is ready to use, you can switch to the latest ffdshow build.
BloodySword
8th June 2011, 09:13
So removing the option helped fixing accidental bugs.
But a registry setting could be possible...
If this is just a temporary fix until your new player is ready, then why not simply using an older ffdshow build for now? Then when your new player is ready to use, you can switch to the latest ffdshow build.
This is what I actually do, but the performance of the new version is much better on my system: Core2Duo T3200M (2x2GHz) 3GByte RAM, Intel GMA 4500M Series Graphic.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.