View Full Version : ffdshow tryouts project: Discussion & Development
clsid
12th February 2012, 01:58
There is a function called sws_setColorspaceDetails in swscale. That might be useful.
haruhiko_yamagata
12th February 2012, 03:20
There is a function called sws_setColorspaceDetails in swscale. That might be useful.
I have already tried that. It doesn't help.
As far as I can see, it works only for 8-bit YCbCr to RGB conversion.
CruNcher
12th February 2012, 05:17
haruhiko_yamagata did you saw that ? :)
https://forum.doom9.org/showpost.php?p=1557391&postcount=16
haruhiko_yamagata
12th February 2012, 07:03
haruhiko_yamagata did you saw that ? :)
https://forum.doom9.org/showpost.php?p=1557391&postcount=16
Thanks for the link. I'll consider importing next time I can spare time for subtitles.
haruhiko_yamagata
12th February 2012, 15:13
Thats quite normal, ffdshow will try to not output frames that show corruption, and a B frame needs more then the first I frame to be decodable without corruption.
No, that two B frames are dropped unintentionally.
Any pictures decoded after an IDR picture should be displayed even if the POC is earlier than the IDR picture.
I don't know where the bug is, ffdshow or libavcodec. Not likely in ffdshow, but not sure...
nevcairiel
12th February 2012, 15:16
The point remains that a B-frame is bi-predictive, which means it needs two reference frames. avcodec itself will not decode a B-frame if it doesn't have two references yet, unless you set a special flag to blindly decode everything.
Vincent Vega
12th February 2012, 17:54
guys, scary story: i use 2002 via kle133 mobo with trident blade3d 8mb graphics on xp, can only handle 16bit color at 1280x1024. i output rgb from ffdshow to have control over conversion coefficients. after rev3765 even though theres no explicit rgb16 output option, ffdshow still connects normally in rgb16 to vmr7 (with rgb32/24-only checked in settings). but with directvobsub in between ffdshow and vmr7, it outputs rgb32/24, and following conversion rgb32/24->rgb16 in directvobsub produces unwatchable messed up picture. i didnt have much luck using ffdshow's own subtitler either on this computer.
so i need rgb16 option back or i'll be stuck with r3764 foreva -)
egur
13th February 2012, 00:12
guys, scary story: i use 2002 via kle133 mobo with trident blade3d 8mb graphics on xp, can only handle 16bit color at 1280x1024. i output rgb from ffdshow to have control over conversion coefficients. after rev3765 even though theres no explicit rgb16 output option, ffdshow still connects normally in rgb16 to vmr7 (with rgb32/24-only checked in settings). but with directvobsub in between ffdshow and vmr7, it outputs rgb32/24, and following conversion rgb32/24->rgb16 in directvobsub produces unwatchable messed up picture. i didnt have much luck using ffdshow's own subtitler either on this computer.
so i need rgb16 option back or i'll be stuck with r3764 foreva -)
Funny :D
mandarinka
13th February 2012, 03:36
guys, scary story: i use 2002 via kle133 mobo with trident blade3d 8mb graphics on xp, can only handle 16bit color at 1280x1024. i output rgb from ffdshow to have control over conversion coefficients. after rev3765 even though theres no explicit rgb16 output option, ffdshow still connects normally in rgb16 to vmr7 (with rgb32/24-only checked in settings). but with directvobsub in between ffdshow and vmr7, it outputs rgb32/24, and following conversion rgb32/24->rgb16 in directvobsub produces unwatchable messed up picture. i didnt have much luck using ffdshow's own subtitler either on this computer.
so i need rgb16 option back or i'll be stuck with r3764 foreva -)
This might not work but it's worth to try it:
Open directvobsub setitngs, and on the tab with list of preferred colorspaces, move rgb565 all the way up. Maybe that makes directvobsub to negotiate a 16bit connection. Too bad you can't remove colorspaces from the list, to make vsfilter not accept them...
Vincent Vega
13th February 2012, 07:04
thanks i tried that before too, same result. those i think are preferences for output colorspace (vobsub->renderer)
haruhiko_yamagata
13th February 2012, 11:57
The point remains that a B-frame is bi-predictive, which means it needs two reference frames.
I think it is not illegal for B-frames to have only one reference frame.
See ITU-T Recommendation, Advanced video coding for generic audiovisual services, 3.8 B slice.
avcodec itself will not decode a B-frame if it doesn't have two references yet, unless you set a special flag to blindly decode everything.
In my opinion, it's a bug. I would admit if there are different opinions, but ffdshow already has way to drop unnecessary frames. Double check is unwanted.
What is the special flag called?
kc7bfi
13th February 2012, 13:33
Not sure why its not working there. It works fine here, although I'm using 64bit. You should not need anything other filters. The key message is "RTPSource could not resolve streams, no data received" which seems to indicate that it could not read/process the video information from the PCAP file (a wireshark capture). Maybe you need wireshark installed. I'll ask the guy who wrote our wireshark replay service. Thanks. David
Sorry, I don't know why it is not working there. The only other thing I can think of is if your machine has two active NICs. The replay reads the video packets from the PCAP file and re-broadcasts them on the multicast address. If for some reason the multicast traffic gets bound to a different NIC than your primary there there can be an issue. But that's a long shot. Thanks anyway for looking at it. I still have the problem but will need to look at another way to reproduce it. David
clsid
13th February 2012, 14:02
In my opinion, it's a bug. I would admit if there are different opinions, but ffdshow already has way to drop unnecessary frames. Double check is unwanted.
What is the special flag called?CODEC_FLAG2_SHOW_ALL, but it is only used in FFmpeg, not in Libav.
haruhiko_yamagata
13th February 2012, 14:59
@kc7bfi,
How does your filter feed SPS/PPS to ffdshow?
Is it given as codec private data on connection? or is it given to IMemInputPin::Receive?
How NAL unit size is handled for SPS/PPS?
This is an important question. Can anyone in your company answer?
haruhiko_yamagata
13th February 2012, 15:47
CODEC_FLAG2_SHOW_ALL, but it is only used in FFmpeg, not in Libav.
Thanks. I'm reading Libav. It's not easy...
hoborg
14th February 2012, 18:55
Hi.
Is there a way how to force FFDshow installer to deploy quicksync decoder even if my Intel HD Graphics 2000 GPU is disabled right now?
gendouhydeist
14th February 2012, 20:30
There's seems to be a problem with the latest revision of ffdshow whenever I play a h264 file. The player just keep crashing on Y416 output, It doesn't happen on 4319 though.
CruNcher
15th February 2012, 12:44
It seems SPP doesn't work with ffdshow-quicksync http://www.mediafire.com/?0n9f62ih6f5chn4 it works externally though
clsid
15th February 2012, 13:31
That has nothing to do with QS. PP is skipped when decoding H.264.
CruNcher
15th February 2012, 13:35
But why restricting it to any format and this isn't H.264 but Mpeg-2 and it doesn't work ?
Here it's working when forcing it externaly http://www.mediafire.com/?op1aegifswodc8p
kc7bfi
16th February 2012, 05:19
We are playing video from a Bosch H.264 encoders and getting the following error in DebugView:
"illeagle short term buffer state detected"
Any idea what this means? Thanks, David
haruhiko_yamagata
16th February 2012, 09:59
But why restricting it to any format and this isn't H.264 but Mpeg-2 and it doesn't work ?
Here it's working when forcing it externaly http://www.mediafire.com/?op1aegifswodc8p
It has been asked again and again (http://forum.doom9.org/showthread.php?p=1230269#post1230269).
haruhiko_yamagata
16th February 2012, 10:01
We are playing video from a Bosch H.264 encoders and getting the following error in DebugView:
"illeagle short term buffer state detected"
Any idea what this means? Thanks, David
Most likely, SPS and PPS are not properly sent. Please replay to my question (http://forum.doom9.org/showthread.php?p=1557000#post1557000).
haruhiko_yamagata
16th February 2012, 11:23
A side issue, but I noticed that the decoder still does not output the leading B frames which other decoders manage to do. It's a bug report from 2009
http://sourceforge.net/tracker/index.php?func=detail&aid=2835795&group_id=173941&atid=867360
Fixed at rev 4325. Thanks.
kc7bfi
16th February 2012, 17:39
@kc7bfi,
How does your filter feed SPS/PPS to ffdshow?
Is it given as codec private data on connection? or is it given to IMemInputPin::Receive?
How NAL unit size is handled for SPS/PPS?
This is from the company doing our Java to DirectShow bridge. I hope this answers your question.
SPS/PPS is both in the OutputPin's media type pbFormat field and
inserted into the stream before keyframes. You should see the first on the mediatype when ffdshow connects and the second in Receive. The stream itself will be startcode not size prefixed.
hoborg
16th February 2012, 19:07
Hi.
If i enable resize (default settings) durning FLV media playback, ffdshow will crash.
version: ffdshow_rev4323_20120214_xvidvideo-ru_x86-msvc2010.zip
It was introduced in ffdshow_rev4320_20120213_xvidvideo-ru_x86-msvc2010.zip, ffdshow_rev4314_20120210_xvidvideo-ru_x86-msvc2010.zip is OK.
jabloomf1230
16th February 2012, 21:01
libavcodec includes the Avid's open source codec DNxHD (VC3). For example:
http://ffmpeg.org/doxygen/trunk/libavcodec_2dnxhddec_8c-source.html
It is possible to decode and encode these files with ffmpeg and ffmbc. Since this codec is becoming more popular, has there been any thought given to adding it to ffdshow? At present, other than buying a commercial 3rd party DirectShow filter, the only way that I know of accessing DNxHD files is via Quicktime.
nevcairiel
16th February 2012, 21:25
libavcodec includes the Avid's open source codec DNxHD (VC3). For example:
http://ffmpeg.org/doxygen/trunk/libavcodec_2dnxhddec_8c-source.html
It is possible to decode and encode these files with ffmpeg and ffmbc. Since this codec is becoming more popular, has there been any thought given to adding it to ffdshow? At present, other than buying a commercial 3rd party DirectShow filter, the only way that I know of accessing DNxHD files is via Quicktime.
My LAV Video Decoder supports decoding DNxHD already.
jabloomf1230
17th February 2012, 02:49
My LAV Video Decoder supports decoding DNxHD already.
Thanks. It worked, but I experienced some strange peripheral behavior. If installed the x64 version of LAV under Win 7 x64, it worked fine with GraphEdit x64. But if I installed just the x86 version of LAV, when I went to open the DirectShow branch in GraphEdit x86 to insert ANY filter into the graph, GraphEdit would crash. If I uninstalled just the LAV video codecs, the crash stopped. I must have a conflict with another codec, somewhere I guess. I wouldn't worry about it, since I searched around about LAV and I didn't see an issue like that. The same for your issues list.
nevcairiel
17th February 2012, 06:50
That's a bug in graph edit, it crashes when any filter registers more then 100 types. I suggest using an alternative like graphstudio
jabloomf1230
17th February 2012, 07:14
Hah! You're right. Adding your codecs put me over the limit. Thanks.
haruhiko_yamagata
17th February 2012, 10:03
It's a stack overflow. Use editbin.exe to change the stack size of graphedt.exe to 4MB.
haruhiko_yamagata
17th February 2012, 11:46
This is from the company doing our Java to DirectShow bridge. I hope this answers your question.
SPS/PPS is both in the OutputPin's media type pbFormat field and
inserted into the stream before keyframes. You should see the first on the mediatype when ffdshow connects and the second in Receive. The stream itself will be startcode not size prefixed.
VICADS PCAP Replayer suddenly began to work. Sorry, I probably missed something when I tried before.
SPS is size prefixed in MPEG2VIDEOINFO::dwSequenceHeader. ffdshow is OK with it.
The stream use startcode "00 00 01". Because your AM_MEDIA_TYPE::subtype is MEDIASUBTYPE_AVC1, it is wrong. Please read this (http://msdn.microsoft.com/en-us/library/windows/desktop/dd757808%28v=vs.85%29.aspx) and fix it.
But just fixing it doesn't seem to fix the problem. I'll dig deeper.
haruhiko_yamagata
17th February 2012, 12:50
@kc7bfi,
Please use MEDIASUBTYPE_H264.
Is it possible to insert Access unit delimiter? Current ffdshow requires it before every access unit if you use start code. Please remember to add it before the first SPS/PPS.
Alternative is to pretend to be mp4 source/splitter filter. You can use MEDIASUBTYPE_AVC1 and send whole access unit at a time with size prefixed.
Otherwise ffdshow has to implement full access unit parsing. It is in the long term TODO. I know what to do, but it's just too hard. You can't expect too much.
EDIT
Also please add access unit delimiter at the end of the stream.
roytam1
17th February 2012, 15:01
It's a stack overflow. Use editbin.exe to change the stack size of graphedt.exe to 4MB.
Confirmed. For my system, I use 1MB stack size is enough.
cihub
17th February 2012, 15:37
Can anyoune explain what exactly "alignment" at Placement tab does?
Also, at the moment scaling of VobSubs (BluRay & DVD tab) is aligned to the top left corner, i.e. scaling makes them grow to the bottom right corner. Is that ok? Shouldn't they scale around image center?
haruhiko_yamagata
18th February 2012, 13:38
Can anyoune explain what exactly "alignment" at Placement tab does?
To write reply correctly, I have to read the source code. I'm afraid I can't afford time for that.
Also, at the moment scaling of VobSubs (BluRay & DVD tab) is aligned to the top left corner, i.e. scaling makes them grow to the bottom right corner. Is that ok? Shouldn't they scale around image center?
VobSub support in ffdshow is quite incomplete. Please do not expect too much.
DMD
19th February 2012, 12:56
Good day.
I want to report a compatibility problem using the latest release (rev4323_20120213_clsid) with HD files.
The problem is that MPCHC crashes, with the H.264/AVC codec disabled (without ffdsshow everything is ok)
By performing regression testing version that works without this problem is the rev4206_20111227_clsid.
Always with the relase rev4323_20120213_clsid enabling the libavcodec audio codec = H.264/AVC vine often broken.
this is the medianfo of the file
Generale
Unique ID : 223122554487135209948533311599677810400 (0xA7DBD744ED58CBEEB8F3F7B5635426E0)
Complete name : E:\17- Filmati_Demo_HD\Formato mkv\Demo Video AVC - Audio dts HRA 2047Kbps 8ch.mkv
Format : Matroska
Format version : Version 2
File size : 197 Mb
Duration : 1min 0s
Overall bit rate mode : Variabile
Overall bit rate : 27,4 Mbps
Encoded date : UTC 2011-02-08 21:01:36
Writing application : mkvmerge v4.5.0 ('Speed of Light') built on Feb 1 2011 02:10:32
Writing library : libebml v1.2.0 + libmatroska v1.1.0
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Si
Format settings, ReFrames : 4 fotogrammi
Muxing mode : Header stripping
Codec ID : V_MPEG4/ISO/AVC
Duration : 1min 0s
Bit rate mode : Variabile
Bit rate : 24,8 Mbps
Maximum bit rate : 31,5 Mbps
Width : 1 920 pixel
Height : 1 088 pixel
Original height : 1 080 pixel
Display aspect ratio : 16:9
Original display aspect ratio : 16:9
Frame rate : 23,976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressivo
Bits/(Pixel*Frame) : 0.495
Stream size : 178 Mb (91%)
Default : Si
Forced : No
colour_primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
transfer_characteristics : BT.709-5, BT.1361
matrix_coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177
Audio
ID : 2
Format : DTS
Format/Info : Digital Theater Systems
Format profile : HRA / Core
Muxing mode : Header stripping
Codec ID : A_DTS
Duration : 1min 0s
Bit rate mode : Costante
Bit rate : 2 047 Kbps / 1 510 Kbps
Channel(s) : 8 canali / 6 canali
Channel positions : Front: L C R, Side: L R, Back: L R, LFE / Front: L C R, Side: L R, LFE
Sampling rate : 48,0 KHz
Bit depth : 24 bits
Stream size : 14,7 Mb (7%)
Title : dts 7.1
Language : Italiano
Default : Si
Forced : Si
THANKS
Atak_Snajpera
19th February 2012, 13:24
upload sample
DMD
19th February 2012, 14:35
This is the file test MKV HD (AVC - 8ch 2047Kbps Audio dts HRA)
http://www.mediafire.com/?3dyji3xei3xyy19
In FFDshow Raw video=all supported
Thank you for your interest.
haruhiko_yamagata
19th February 2012, 15:34
Works for me with or without ffdshow's H.264 decoder. Works with or without ffdshow raw video decoder.
What are the upper stream and down stream filters?
Is ffdshow's DXVA decoder enabled?
DMD
19th February 2012, 20:58
These are the filters MPCHC
http://img545.imageshack.us/img545/1286/settingb.png (http://imageshack.us/photo/my-images/545/settingb.png/)
These are the codecs in ffdshow
http://img80.imageshack.us/img80/2968/screenshot007ni.png (http://imageshack.us/photo/my-images/80/screenshot007ni.png/)
haruhiko_yamagata
19th February 2012, 23:44
Still cannot reproduce. Is it the video filters? Does it still crash if you disable deinterlacing, resize and sharpen?
DMD
20th February 2012, 08:00
The problem exists even disabling all filtering and selecting only Raw video=all supported, otherwise ffdshow is not entered.
However, what you see in the screenshot is not profile related to HD file.
the profile is this.
http://img684.imageshack.us/img684/6585/screenshot001yb.png (http://imageshack.us/photo/my-images/684/screenshot001yb.png/)
haruhiko_yamagata
20th February 2012, 10:29
The problem exists even disabling all filtering and selecting only Raw video=all supported, otherwise ffdshow is not entered.
However, what you see in the screenshot is not profile related to HD file.
the profile is this.
Would you "Export all settings" and send us the reg file?
Does it change anything if you uncheck "Automatic preset loading"?
DMD
20th February 2012, 11:57
She has Reason!
I tried rev4323_20120213_clsid without invoking the custom settings and everything works fine again!
There must be something wrong with the custom settin that I keep in my reg file.
And each faces that I install a new version install the reg file that will always keep my settings.
Maybe the problem is localized in the reg file, but what?
Thank you for your interest
haruhiko_yamagata
20th February 2012, 12:52
Thanks for the file, but last time the approval took a week or more. Please upload the file somewhere else.
DMD
20th February 2012, 13:26
Here's the reg file
http://www.mediafire.com/?z968id1n58wg028
haruhiko_yamagata
20th February 2012, 14:13
Sorry, still cannot reproduce.
I installed ffdshow_rev4323_20120213_clsid_x64.exe and imported the reg file. I run mpc-hc64 and build the graph as you posted.
I think this is exactly what you are doing. Maybe depends on hardware or device driver?
Can you reproduce the problem on another PC?
kc7bfi
20th February 2012, 14:28
@kc7bfi,
Please use MEDIASUBTYPE_H264.
Here is an updated JAR that uses the H264 subtype. It does make a great improvement. However, if you try this with the previous code and clip I sent, about 13 seconds into the video you see what I refer to as the "melty" video. Where there is motion buy the images do not seem to properly update. Is there still something wrong with how I am sending video to ffdshow? Thanks.
http://dl.dropbox.com/u/37804952/dsj.jar
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.