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. |
16th April 2015, 18:37 | #15281 | Link |
Registered User
Join Date: Jan 2014
Location: France
Posts: 76
|
Hi clsid,
I have some questions to the great expert you are. I've seen this in FFDShowAPI.cs : Code:
public String ActivePreset { get { string tmpStr = getStringParam(FFDShowConstants.FFDShowDataId.IDFF_OSDcurPreset); if (tmpStr != null && !tmpStr.Equals("")) { return tmpStr; } else { return DefaultVideoPreset; } } set { if (IsFFDShowActive) { PlayState playState = getState(); if (playState == PlayState.PlayState || playState == PlayState.FastForwardRewind) pauseVideo(); Win32.COPYDATASTRUCT cd = new Win32.COPYDATASTRUCT(); cd.dwData = new UIntPtr((uint)FFDSM_SET_ACTIVE_PRESET_STR); #if UNICODE cd.lpData = Marshal.StringToHGlobalUni(value); #else cd.lpData = Marshal.StringToHGlobalAnsi(value); #endif cd.cbData = (uint)Win32.GlobalSize(cd.lpData); if (receiver == null) receiver = new FFDShowReceiver(Thread.CurrentThread); receiver.ReceivedString = null; receiver.ReceivedType = 0; //receiver.ParentThread = Thread.CurrentThread; Win32.SendMessage(new IntPtr(ffDShowInstanceHandle), Win32.WM_COPYDATA, receiver.Handle.ToInt32(), ref cd); if (playState == PlayState.PlayState || playState == PlayState.FastForwardRewind) startVideo(); } DefaultVideoPreset = value; } } Problem 1 : I realized that changing preset while a video is playing can crash the player, especially when avisynth is enabled within ffdshow. I realized that pausing the video before changing preset helps a lot. But if we look in the code above, we can see that you already did this stuff. At the beginning of the ActivePreset set Method, if the video is playing or seeking, it is paused because of this : Code:
PlayState playState = getState(); if (playState == PlayState.PlayState || playState == PlayState.FastForwardRewind) pauseVideo(); At the end of the function, we have : Code:
Win32.SendMessage(new IntPtr(ffDShowInstanceHandle), Win32.WM_COPYDATA, receiver.Handle.ToInt32(), ref cd); if (playState == PlayState.PlayState || playState == PlayState.FastForwardRewind) startVideo(); Problem 2 : ActivePreset get method does not seem to work. It contains the wrong current preset. Maybe a bug ? ActivePreset set method works fine ! System : Windows 7 x64 ffdshow last release (32 bit) 32 bits chain : MPC-HC + LAV splitter + LAV video decoder + ffdshow Raw filter + madVR VS 2013 / C# & VB .NET / .NET Framework 4.5 Thanks a lot Olivier |
19th April 2015, 16:56 | #15282 | Link |
Registered User
Join Date: Jul 2004
Posts: 40
|
.avi Original Framerate Bug
BUG IN FFDSHOW OR AVISYNTH ?
30fps.avi mediainfo says: Code:
Video ID : 0 Format : MPEG-4 Visual Format profile : Advanced Simple@L5 Format settings, BVOP : Yes Format settings, QPel : No Format settings, GMC : No warppoints Format settings, Matrix : Default (H.263) Codec ID : XVID Codec ID/Hint : XviD Duration : 25s 167ms Bit rate : 1 300 Kbps Width : 624 pixels Height : 352 pixels Display aspect ratio : 16:9 Frame rate : 30.000 fps Original frame rate : 23.976 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Compression mode : Lossy Bits/(Pixel*Frame) : 0.197 Stream size : 3.90 MiB (99%) Writing library : XviD 1.2.1 (UTC 2008-12-04) ffdshow info tab says 30.000 fps but avisynth still thinks that its 23.976. and due to this my changefps script doesnt work correctly: Code:
(FrameRate < 25.001) ? ChangeFPS(FrameRate * 2) : last i dont know if its ffdshows or avisynths fault. with .mkv all runs fine. any ideas ? Last edited by thomaz909; 19th April 2015 at 17:01. |
19th April 2015, 18:10 | #15283 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
|
More likely an issue with the MPEG-4 ASP video stream, where the 3:2 pull-down flags have become borked!
This provides a good example of why the .avi container is no longer used
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
19th April 2015, 21:01 | #15284 | Link |
Registered User
Join Date: Jul 2004
Posts: 40
|
lav splitter
lav video decoder ffdshow raw decoder > avisynth how does avisynth gets the information ? lav splitter reports "original framerate" to lav video decoder. lav vid dec reports ffdshow "original framerate" ? and finally ffdshow passes this value to avisynth ? i have no idea from where avisynth gets the "original framerate" information. any chance that ffdshow devs can force avisynth to use the "frame rate" value instead of "original framerate" ? Last edited by thomaz909; 19th April 2015 at 21:08. |
20th April 2015, 13:44 | #15286 | Link |
Registered User
Join Date: Jul 2004
Posts: 40
|
now i tried to achieve my goal with "automatic preset loading" and guess what happens.
exactly the opposite. i use "on frame rate match" with "fps<25" and with the 30fps.avi the correct preset is loaded but with 30fps_native.avi (which has no "original framerate" info in it) the preset is not loaded and the default one is used. on both files ffdshow says "movie fps: 30.000" but different presets are loaded !!! i now think its absolutely ffdshow related and has to get fixed *dream*. Last edited by thomaz909; 20th April 2015 at 14:01. |
20th April 2015, 15:14 | #15287 | Link |
*****
Join Date: Feb 2005
Posts: 5,647
|
If you turn on the OSD in ffdshow you can see that the "Movie FPS" value changes from 23.975 to 30.000 after the first few frames. The present is selected based on the initial value and isn't changed during playback.
__________________
MPC-HC 2.2.1 |
20th April 2015, 15:16 | #15288 | Link |
*****
Join Date: Feb 2005
Posts: 5,647
|
@Olivier
The people who wrote all that code are not around anymore. I will gladly commit any patches for bug fixes that people submit here, but other than that I am not able to provide any assistance.
__________________
MPC-HC 2.2.1 |
21st April 2015, 16:24 | #15289 | Link | |
Registered User
Join Date: Jul 2004
Posts: 40
|
Quote:
it jumps from 23.975 to 30.000. so the component which causes this must get fixed. ffmpeg ? btw. when i use xvid decoder it jumps from 25.000 to 30.000. Last edited by thomaz909; 21st April 2015 at 16:40. |
|
19th May 2015, 02:13 | #15291 | Link |
Registered User
Join Date: Jun 2013
Posts: 23
|
Hi I have a couple of questions about ffdshow audio decoder.
1. Are there any recent good guides for using ffdshow for room correction? - The guides I've found are all from about 5-10 years ago, and I wonder if things have become simplified since then. 2. Is it possible to load a seperate ffdshow audio configuration depending on whether the decoded audio is 5.1 vs 6.1 vs 7.1? - The reason I ask is because I run 5.1 audio but want to run a custom mixdown to 5.1 where I mixdown surround rear right into 80% surround rear + 20% surround rer left, etc. Creating virtual rear speakers. All of the current mixdown methods eg. ffdshow default mixing, windows mixing, my avr all just copy surround rear right directly into surround right channel. EDIT: I see you can load a preset based on number of channels match. 3. It looks like the decoder now support DTS-HD MA/Dolby TrueHD lossless audio. That is great news! Last edited by kiwijunglist; 19th May 2015 at 02:18. |
19th May 2015, 16:11 | #15292 | Link |
*****
Join Date: Feb 2005
Posts: 5,647
|
ffdshow does not support DTS-HD MA. You must be confusing it with LAV Audio Decoder.
__________________
MPC-HC 2.2.1 |
6th June 2015, 04:54 | #15293 | Link |
Registered User
Join Date: Aug 2003
Posts: 14
|
Audio decoder frame rate detection
Is there any way to detect video frame rate for auto preset loading for the audio decoder?
My 2011 Samsung 65" plasma has a ~250ms processing delay when running in 24Hz mode and a ~70ms delay when running in 50/60Hz mode. I would like to load an FFDShow audio preset with a 250ms delay if the video is 23.976 or 24fps else use a 70ms audio delay. Is it possible? At the moment, I'm just defaulting to 250ms and then manually creating a preset file for any non-24fps videos which is a bit of a pain. |
6th June 2015, 09:24 | #15294 | Link | |
Registered User
Join Date: Dec 2007
Location: Enschede, NL
Posts: 301
|
Quote:
__________________
Roelofs Coaching |
|
24th August 2015, 09:08 | #15296 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,783
|
A discussion came up in the German doom9/Gleitz board regarding FFV1 as an "archival format", and its support in ffdshow. According to Wikipedia, the format v3 is "frozen" since 2013. But AVIs generated with ffvfw seem to contain the version number 0 (not sure how to check that, ffdshow version information tells little details, only the libav date stamp). I'd assume that the last build from clsid would contain current ffmpeg sources of that time (2014), so is it quite certain that FFV1 videos created by this version (as long as there are VfW based workflows, e.g. while capturing) are in a stable format?
|
24th August 2015, 12:29 | #15297 | Link |
*****
Join Date: Feb 2005
Posts: 5,647
|
The ffmpeg stuff was last updated in ffdshow 3 years ago. But a lot of code is even older, because ffdshow uses old ffmpeg APIs. So updating would require rewriting a lot of code. It would be far easier to write a whole new VFW wrapper for ffmpeg.
__________________
MPC-HC 2.2.1 |
25th August 2015, 13:43 | #15298 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
If you use the same ffdshow, it's always stable, of course. To be frank, I don't think ffdshow will be updated to any new formats; LAV has taken over the decoding side of things.
Whether that applies to FFV1 as an ongoing format, you'd have to ask the ffmpeg devs. They control the format. |
25th August 2015, 14:14 | #15299 | Link |
*****
Join Date: Feb 2005
Posts: 5,647
|
He was referring to the FFV1 encoder.
The FFV1 decoder in LAV/FFmpeg should be fully backward compatible.
__________________
MPC-HC 2.2.1 |
25th August 2015, 15:50 | #15300 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,783
|
To summarize again: A few people may be interested in using FFV1 in version 3 to capture video. May it just be due to curiosity. Unfortunately, ffdshow may not provide such a recent FFV1 encoder code, and there may not yet be any other FFV1 VfW codec; LAV Filters may provide FFV1 as DirectShow encoder (if Wikipedia is correct), but hardly any software supports DirectShow encoders at all (I only know some GrassValley software as prominent exception). As a CLI encoder, ffmpeg provides FFV1 in version 3, but is not usable as "inline" encoder (especially not for capturing).
Because ffdshow's VfW bridge to the ffmpeg API (ffvfw) won't be updated anymore, clsid concluded that ffdshow won't be the solution for these few people; instead, rather any other possible VfW bridge for ffmpeg (provided anyone would ever create one)... |
Tags |
ffdshow, ffdshow tryouts, ffdshow-mt, ffplay, icl |
|
|