Log in

View Full Version : ffdshow tryouts project: Discussion & Development


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 [294] 295 296 297 298 299 300 301 302 303 304 305 306 307 308

clsid
4th February 2012, 16:46
@clsid
The QS check doesn't work on non-SandyBridge machines. It fails on my 9400T (Penryn) which is capable of QS. I'm afraid it will also fail on IvyBridge.
Please remove the existing check untill a new one is found.
If it makes sense to you, I can export a check function from my dll.

If these checks are too complicated or time consuming (from you), please remove them altogether or at least make them pass on all Intel processors.A simple check function in the DLL would be fine. Let it return for example a DWORD with a bitmask of capabilities.

ipanema
4th February 2012, 16:55
Thanks for the sample.

Is it "MPEG-2 Demultiplexer" or "MPEG-2 Splitter"?
What is the OS?
"MPEG-2 Demux" isn't installed on my PC.

Sorry, it's the "MPEG-2 Demultiplexer" http://msdn.microsoft.com/en-us/library/dd390715%28v=vs.85%29.aspx

OS is Windows 7. I haven't checked other versions of Windows.

khagaroth
4th February 2012, 17:37
Updated Czech translation (http://www.mediafire.com/?wam72ztnbc6q6ii).

egur
4th February 2012, 20:43
A simple check function in the DLL would be fine. Let it return for example a DWORD with a bitmask of capabilities.

OK, I'll add a simple check with a DWORD bitmask. First version will have 2 properties - HW support and SW support (Media SDK installed).

Update:
Done at r4301.

haruhiko_yamagata
5th February 2012, 01:26
Sorry, it's the "MPEG-2 Demultiplexer" http://msdn.microsoft.com/en-us/library/dd390715%28v=vs.85%29.aspx

OS is Windows 7. I haven't checked other versions of Windows.
I cannot use "MPEG-2 Demultiplexer". There is the filter but it requires a source filter.
I tried "TS File Source". It connects but the screen is black whatever the decoder is.
Any other source filters I have do not connect.
How do you use the filter? Would you tell me the application and the source filter?

EDIT
I gave up MPEG-2 Demultiplexer. I tried DVBViewer and reproduced the problem.

Liisachan
5th February 2012, 09:31
@haruhiko_yamagata
About r4303: if it's not too much trouble could you please make this optional? Maybe "Frame timestamps" (original one) and "Frame timestamps (friendly)" (new format), or perhaps "Frame timestamps" (new format) and "Raw frame timestamps" (old format) in the "OSD" menu? I sometimes want to see the frame time stamp down to rt (or even ns), and the old feature in ffdshow was quite handy.

haruhiko_yamagata
5th February 2012, 10:26
@haruhiko_yamagata
About r4303: if it's not too much trouble could you please make this optional? Maybe "Frame timestamps" (original one) and "Frame timestamps (friendly)" (new format), or perhaps "Frame timestamps" (new format) and "Raw frame timestamps" (old format) in the "OSD" menu? I sometimes want to see the frame time stamp down to rt (or even ns), and the old feature in ffdshow was quite handy.
OK, then I'll create a new item.

ipanema
5th February 2012, 12:16
MPEG-2 demultiplexer can be a little tricky to set up. The output media type must be set manually. It's part of a test environment here which I think has its own source filter (I didn't write it).

I tried DVBViewer and reproduced the problem.

Great. :)

haruhiko_yamagata
5th February 2012, 13:08
@ipanema,
It has been fixed at rev 4302. Please try the latest build.

haruhiko_yamagata
6th February 2012, 12:56
To fix the regression of performance of resize filter with Accurate rounding checked, I changed the base of ffdshow's libswscale from FFmpeg to Libav.
The performance is OK with Libav's libswscale plus ffdshow's custom multithreading.
As we are preparing for the next release, this kind of big change should be avoided if possible. But because it was a regression, I couldn't help...
Please test new builds.
x86 (http://www.ffdshow-tryout.sourceforge.net/doom9/ffdshow_rev4306_20120206_libswscale-Libav.exe)
x64 (http://www.ffdshow-tryout.sourceforge.net/doom9/ffdshow_rev4306_20120206_libswscale-Libav_x64.exe)
patch (http://www.ffdshow-tryout.sourceforge.net/doom9/libsws.patch)

EDIT
The patch reverts rev 4156 (http://ffdshow-tryout.svn.sourceforge.net/viewvc/ffdshow-tryout?view=revision&sortby=date&revision=4156).
Accurate rounding is enabled by default. The new builds and current SVN builds use a different registry value for "Accurate rounding". So please be careful if you compare performance or quality.

ipanema
6th February 2012, 13:20
@ipanema,
It has been fixed at rev 4302. Please try the latest build.

That was quick - thanks. I've just tried 4305 and it does seem to be fixed now. Great work.

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

For example, my FILE3 begins with the following input start timestamps

7770333
7103000 > B frame
7436666 > B frame
8771333
8104000
8437666
9772333
9105000
9438666

and Microsoft and Mainconcept decoders both output all the frames

7103000 > B frame
7436666 > B frame
7770333
8104000
8437666
8771333
9105000
9438666
9772333

but the ffdshow decoder outputs

7770333
8104000
8437666
8771333
9105000
9438666
9772333

note the missing B frames at the beginning.

nevcairiel
6th February 2012, 13:26
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.

ipanema
6th February 2012, 13:34
OK, but the leading B frames output by the Microsoft and Mainconcept decoders never show any corruption.

Blight
6th February 2012, 15:02
Hi,
I have a serious issue with recent builds (tested builds upto 4303) of ffdshow's audio decoder when the "Connect as PCM first" setting is disabled.
For some reason, when playing certain audio files (tested with AC3/DTS), the audio decoder exposes two media types.
One with major type "Audio" (and DTS/AC3 subtype) and a second with major type "stream" and sub-type "none":
http://t.inmatrix.com/ffdshowmediatype.gif

The problem is, my DSP filter is first presented with the "Stream" media type first and when it's rejected with "VFW_E_TYPE_NOT_ACCEPTED", the second media type (major type audio) isn't presented to my DSP filter at all.
If I enable "Connect as PCM first" or disable pass-through to S/PDIF, the problem disappears.

My question is,
Why is there a second media type with these values?
If it's an important feature for some conditions, can you make it optional and possibly default it to off?

kc7bfi
6th February 2012, 16:22
I have confirmed that the problem with the Optelecom H.264 video was created somewhere between version 4174 and 4194. Version 4174 plays the video fine but 4194 seems to only be playing I-frames. Any ideas what may have changed in those versions? If there are any intermediate Windows 64 bit installs I can also test them to try and narrow down the exact revision that caused the problem. Just let me know if they are available. Any help in resolving this issue would be greatly appreciated. David

I have verified that this was "broke" in version 4176. Version 4175 plays the Optelecom H.264 fine but version 4176 seems to only play I-frames. Any ideas what might have been changed? I looked through the code but I am far from understanding it. Thanks, David

clsid
6th February 2012, 19:07
I have verified that this was "broke" in version 4176. Version 4175 plays the Optelecom H.264 fine but version 4176 seems to only play I-frames. Any ideas what might have been changed? I looked through the code but I am far from understanding it. Thanks, DavidI need a sample file to reproduce the problem.

kc7bfi
6th February 2012, 19:07
I have verified that this was "broke" in version 4176. Version 4175 plays the Optelecom H.264 fine but version 4176 seems to only play I-frames. Any ideas what might have been changed? I looked through the code but I am far from understanding it. Thanks, David

Here is the DebugView from 4175
00000172 1.17888844 [10352] TffdshowDecVideo::Run thread=10896
00000173 1.41790235 [10352] TimgFilterOutput::process V-RAM access is Direct, t_indirect = 50000, t_direct = 50000
00000174 1.88360322 [10352] no frame!
00000175 2.71864915 [10352] no frame!
00000176 3.55155683 [10352] no frame!
00000177 4.38556004 [10352] no frame!
00000178 5.21953058 [10352] no frame!
00000179 6.05361080 [10352] no frame!
00000180 6.70131016 [10352] TffdshowDecVideo::Stop thread=8348
00000181 6.70138931 [10352] TffdshowDecVideoOutputPin::DeliverEndOfStream
00000182 6.70144272 [10352] TffdshowDecVideoOutputPin::Inactive
00000183 6.79012012 [10352] Removed from filter graph
00000184 6.79810095 [10352] TffdshowDecVideo::Destructor
00000185 6.79825163 [10352] TffdshowDecVideoOutputPin::Destructor

Here is the DebugView from 4176
00000172 1.21519601 [1428] TffdshowDecVideo::Run thread=9688
00000173 1.33532727 [1428] Missing reference picture
00000174 1.33536828 [1428] decode_slice_header error
00000175 1.33587193 [1428] concealing 1350 DC, 1350 AC, 1350 MV errors
00000176 1.34136713 [1428] Frame num gap 2 0
00000177 1.34260333 [1428] Frame num gap 3 1
00000178 1.35833633 [1428] Frame num gap 4 2
00000179 1.35930073 [1428] Frame num gap 5 3
00000180 1.36132705 [1428] Frame num gap 6 4
00000181 1.36357117 [1428] Frame num gap 7 5
00000182 1.36568916 [1428] Frame num gap 8 6
00000183 1.39263272 [1428] Frame num gap 9 7
00000184 1.45666087 [1428] Frame num gap 10 8
00000185 1.46278739 [1428] Frame num gap 11 9
00000186 1.49258065 [1428] Frame num gap 12 10
00000187 1.52566409 [1428] Frame num gap 13 11
00000188 1.52720392 [1428] TimgFilterOutput::process V-RAM access is Direct, t_indirect = 50000, t_direct = 30000
00000189 1.56086862 [1428] Frame num gap 14 12
00000190 1.59262443 [1428] Frame num gap 15 13
00000191 1.62587583 [1428] Missing reference picture
00000192 1.62593484 [1428] decode_slice_header error
00000193 1.62600315 [1428] concealing 1350 DC, 1350 AC, 1350 MV errors
00000194 1.65942085 [1428] mmco: unref short failure
00000195 1.65982413 [1428] Missing reference picture
00000196 1.65985489 [1428] decode_slice_header error
00000197 1.65990770 [1428] concealing 1350 DC, 1350 AC, 1350 MV errors
00000198 1.69238532 [1428] mmco: unref short failure
00000199 1.69255745 [1428] Frame num gap 2 0
00000200 1.72563791 [1428] Frame num gap 3 1
00000201 1.72627270 [1428] Frame num gap 4 2
00000202 1.72825873 [1428] Frame num gap 5 3
00000203 1.82658899 [1428] Frame num gap 6 4
00000204 1.85965872 [1428] Frame num gap 7 5
00000205 1.89266777 [1428] Frame num gap 8 6
00000206 1.92944741 [1428] no frame!
00000207 1.99259627 [1428] Missing reference picture
00000208 1.99266315 [1428] decode_slice_header error
00000209 1.99328876 [1428] concealing 1350 DC, 1350 AC, 1350 MV errors
00000210 2.02658963 [1428] Frame num gap 2 0
00000211 2.05956984 [1428] Frame num gap 4 2
00000212 2.06051445 [1428] Frame num gap 5 3
00000213 2.12658978 [1428] Frame num gap 6 4
00000214 2.19343543 [1428] Frame num gap 8 6
00000215 2.22663951 [1428] Frame num gap 9 7
00000216 2.25960851 [1428] Frame num gap 10 8
00000217 2.32662439 [1428] Frame num gap 12 10
00000218 2.35958147 [1428] Frame num gap 13 11
00000219 2.39361620 [1428] Frame num gap 14 12
00000220 2.46083927 [1428] Missing reference picture
00000221 2.46089482 [1428] decode_slice_header error
00000222 2.46102023 [1428] concealing 1350 DC, 1350 AC, 1350 MV errors
00000223 2.49345899 [1428] mmco: unref short failure
00000224 2.49374795 [1428] Missing reference picture
00000225 2.49380755 [1428] decode_slice_header error
00000226 2.49390459 [1428] concealing 1350 DC, 1350 AC, 1350 MV errors
00000227 2.52646852 [1428] mmco: unref short failure

Both versions are playing the same video. Any ideas? David

kc7bfi
6th February 2012, 19:13
I need a sample file to reproduce the problem.

Here is a wireshark capture:
http://dl.dropbox.com/u/37804952/Optelecom.pcap

Here is a Matroska recording
http://dl.dropbox.com/u/37804952/Optelecom.mkv

This is a live encoder. If it would be helpful I could also put our encoder in the Internet so you could access it.

Thanks for the help. David

Liisachan
7th February 2012, 11:05
OK, then I'll create a new item.

Thanks! Your awesome work, especially in Subtitles, is always appreciated :)

haruhiko_yamagata
7th February 2012, 13:44
Here is a wireshark capture:
http://dl.dropbox.com/u/37804952/Optelecom.pcap

Here is a Matroska recording
http://dl.dropbox.com/u/37804952/Optelecom.mkv

This is a live encoder. If it would be helpful I could also put our encoder in the Internet so you could access it.

Thanks for the help. David
I tried the mkv file. If LAV Splitter Source is used, and the decoder is either LAV Video Decoder or ffdshow, it does not work. Microsoft DTV decoder works.
If Haali's splitter is used, it is OK. nevcairiel, if you are reading this, would you take a look?

@kc7bfi,
As the example above shows, the source/splitter filter is the key. I can't debug anything or help you unless you provide the source/splitter filter.

nevcairiel
7th February 2012, 13:54
nevcairiel, if you are reading this, would you take a look?

That file is odd, whatever muxed it is a broken application.
It muxed an AnnexB stream into MKV, which in itself is not wrong, BUT it created MP4 style extradata. Either you mux in AnnexB mode, or in MP4 mode, combining the two is .... weird. Horrible. :)

I can probably fix it in the splitter, though.

haruhiko_yamagata
7th February 2012, 14:28
That file is odd, whatever muxed it is a broken application.
It muxed an AnnexB stream into MKV, which in itself is not wrong, BUT it created MP4 style extradata. Either you mux in AnnexB mode, or in MP4 mode, combining the two is .... weird. Horrible. :)

I agree it's horrible and broken. Thanks for your time.

I can probably fix it in the splitter, though.
Only if you have extra time.

nevcairiel
7th February 2012, 16:32
After fixing the source, LAV Video in software mode still cannot decode it, must be a problem in libav/ffmpeg itself. If i run it though CUDA or the Intel decoder, it works just fine.

For the record, it never worked with Haali for me either.

Edit:
I actually fixed it, the file is just muxed very badly. It doesn't work 100% from the start .. but it works, kind of.

kc7bfi
8th February 2012, 20:47
That file is odd, whatever muxed it is a broken application.
It muxed an AnnexB stream into MKV, which in itself is not wrong, BUT it created MP4 style extradata. Either you mux in AnnexB mode, or in MP4 mode, combining the two is .... weird. Horrible. :)

I can probably fix it in the splitter, though.

I must confess that I am not very familiar with the finer points of H.264 video nor its packaging. Also, it may be possible that something went wrong woth the MKV file creation, but I have a few questions:

1) Do you see the same "muxed" issues in the wireshark?
2) Would this explain the DebugView log I included in a previous message?
3) Would there have been something changed between revisions 4175 and 4176 that would have caused this problem?

It it would be helpful I could create a small program that will play the video from the encoder (over the Internet) using the ffdshow filter for decoding. Just let me know. David

haruhiko_yamagata
8th February 2012, 23:51
I must confess that I am not very familiar with the finer points of H.264 video nor its packaging. Also, it may be possible that something went wrong woth the MKV file creation, but I have a few questions:

1) Do you see the same "muxed" issues in the wireshark?

How can I analyze it? I won't read bit-stream using binary editor. I'm not a computer.

2) Would this explain the DebugView log I included in a previous message?

The debug log indicates the stream is broken. Or it may be indicating the bug of the source/splitter filter or ffdshow.

3) Would there have been something changed between revisions 4175 and 4176 that would have caused this problem?

Rev 4176 changes the way of calculation of NAL unit size. As the mkv file shown, the upper stream filter must not use start code "00 00 01" if the container is mkv or mp4. It must use NAL unit size instead. Microsoft's guideline (http://msdn.microsoft.com/en-us/library/windows/desktop/dd757808%28v=vs.85%29.aspx). Does simply changing the FOURCC work? If your source is RTSP, I don't know how NAL unit size is handled in DirectShow. I think the guideline still should be followed. If I'm wrong, please correct me.

It it would be helpful I could create a small program that will play the video from the encoder (over the Internet) using the ffdshow filter for decoding. Just let me know. David
That would help a lot. I'll wait for it.

mandarinka
9th February 2012, 05:10
I tried enabling software scaling, but it seems to me the aspect ratio handling might not be working as expected.

I tried to play a 16/9 movie on a 16/10 LCD (1680x1050), so I followed the instructions here: http://ffdshow-tryout.sourceforge.net/wiki/video:resize_aspect

(That means, "specify horizontal and vertical size" enabled, set to: 1680x1050, "keep original aspect ratio" enabled, "process pixel aspect ratio internally" enabled. At the same time, I disabled "keep aspect ratio" in mpc as the help entry suggests.)

If I understand the help properly, this should scale the image, keeping the aspect ratio, until width or height hits the specified dimensions. However, ffdshow will also pad the image with black bars to meet the specified resolution on top of that, it will expand 4:3 or 16:9 frame to the full 16/10 of the LCD.
This has two weird consequences: subtitle positioning is changed, and if you switch the player to window, the black bars padding will affect the windowed display.

Is this how it is supposed to work, or am I missing something? I'm afraid don't recall how the function behaved in the past, so I have no idea if this is actually a regression or standard behaviour...

(revision tested: 4296, x86 MSVC buld from xvidvideo.ru; windows XP sp3 home, MPC-HC 1.5.3.3819)

P.S. If the padding is intentional, I'd like to suggest adding an option to disable it. It would make the scaling more useful if ASS subtitles that rely on positioning are used.

clsid
9th February 2012, 06:02
As the documentation says: If you specify both height and width, then ffdshow will resize to that exact resolution. Padding is required if the aspect ratio of the video differs from your target resolution.

If you don't want padding you need to create two profiles:
aspect < 16/10 -> specify height
aspect >= 16/10 -> specify width

Disabling that option in MPC should not be needed.

nevcairiel
9th February 2012, 07:45
the upper stream filter must not use start code "00 00 01" if the container is mkv or mp4. It must use NAL unit size instead.

Thats not true, MKV is fine with start-code based H264, that particular file has just mixed both solutions into one.

The stream itself works fine with various hardware decoders i tried, it seems to be an issue with the software decoder.
I do actually get an image now with LAV, but the first few frames are missing.

haruhiko_yamagata
9th February 2012, 10:29
Thats not true, MKV is fine with start-code based H264
Thanks for the info. I didn't know.

haruhiko_yamagata
9th February 2012, 13:06
@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?

betaking
9th February 2012, 14:56
to h_yamagata: can not compile last ffdshow svn
1>C:\ffdshow\src\ffmpeg/libswscale/swscale.h(157): error C2371: “SwsVector”: 重定义;不同的基类型
c:\ffdshow\src\ffmpeg\Tlibavcodec.h(18) : 参见“SwsVector”的声明
1>C:\ffdshow\src\ffmpeg/libswscale/swscale.h(165): error C2371: “SwsFilter”: 重定义;不同的基类型
c:\ffdshow\src\ffmpeg\Tlibavcodec.h(17) : 参见“SwsFilter”的声明
TDXVADecoderH264.cpp
TDXVADecoderVC1.cpp
ffdshow_converters.cpp
ffImgfmt.cpp
image.cpp
Tconvert.cpp
1>C:\ffdshow\src\ffmpeg\libswscale/swscale.h(157): error C2371: “SwsVector”: 重定义;不同的基类型
C:\ffdshow\src\ffmpeg\Tlibavcodec.h(18) : 参见“SwsVector”的声明
1>C:\ffdshow\src\ffmpeg\libswscale/swscale.h(165): error C2371: “SwsFilter”: 重定义;不同的基类型
C:\ffdshow\src\ffmpeg\Tlibavcodec.h(17) : 参见“SwsFilter”的声明
1>c:\ffdshow\src\ffmpeg\libavutil\bswap.h(75): warning C4244: “参数”: 从“uint64_t”转换到“uint32_t”,可能丢失数据
TrgbPrimaries.cpp
Tswscale.cpp
1>C:\ffdshow\src\ffmpeg\libswscale/swscale.h(157): error C2371: “SwsVector”: 重定义;不同的基类型
C:\ffdshow\src\ffmpeg\Tlibavcodec.h(18) : 参见“SwsVector”的声明
1>C:\ffdshow\src\ffmpeg\libswscale/swscale.h(165): error C2371: “SwsFilter”: 重定义;不同的基类型
C:\ffdshow\src\ffmpeg\Tlibavcodec.h(17) : 参见“SwsFilter”的声明
dither.cpp
fftsg.cpp
firfilter.cpp
mixer.cpp
TaudioFilter.cpp
TaudioFilterChannelSwap.cpp
TaudioFilterConvolver.cpp
TaudioFilterCrystality.cpp
TaudioFilterDelay.cpp
TaudioFilterDenoise.cpp
TaudioFilterDolbyDecoder.cpp
TaudioFilterEQ.cpp
TaudioFilterEQsuper.cpp
1>c:\ffdshow\src\audiofilters\supereq.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
TaudioFilterFIR.cpp
TaudioFilterFreeverb.cpp
TaudioFilterHeadphone.cpp
TaudioFilterLFEcrossover.cpp
1>src\audioFilters\TaudioFilterLFEcrossover.cpp(98): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
1>src\audioFilters\TaudioFilterLFEcrossover.cpp(100): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
1>src\audioFilters\TaudioFilterLFEcrossover.cpp(147): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
1>src\audioFilters\TaudioFilterLFEcrossover.cpp(149): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
1>src\audioFilters\TaudioFilterLFEcrossover.cpp(155): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
TaudioFilterMixer.cpp
TaudioFilterOSD.cpp
TaudioFilterOutput.cpp
TaudioFilterResample.cpp
TaudioFilters.cpp
TaudioFilterVolume.cpp
TaudioFilterWinamp2.cpp
TsampleFormat.cpp
Twinamp2.cpp
revmodel.cpp
resample2.cpp
TffProcAudio.cpp
TencStats.cpp
TffdshowEnc.cpp
Tffvfw.cpp
Tmuxer.cpp
TmuxerFile.cpp
Tacm.cpp
CSSauth.cpp
CSSscramble.cpp
DeCSSInputPin.cpp
Tfilter.cpp
Tfilters.cpp
TOSDprovider.cpp
amfilter.cpp
combase.cpp
dllentry.cpp
dllsetup.cpp
mtype.cpp
outputq.cpp
pstream.cpp
strmiids.cpp
transfrm.cpp
wxdebug.cpp
wxlist.cpp
wxutil.cpp
1>已完成生成项目“C:\ffdshow\ffdshow_2010.vcxproj”(build 个目标)的操作 - 失败。

haruhiko_yamagata
9th February 2012, 15:13
Compilation fixed.
I found x64 version's color is broken for 10-bit video. Please wait.

betaking
9th February 2012, 15:22
Compilation fixed.
I found x64 version's color is broken for 10-bit video. Please wait.

:thanks: i wait now!

haruhiko_yamagata
9th February 2012, 15:44
I have fixed my working copy. I'll commit tomorrow.

betaking
9th February 2012, 15:47
I have fixed my working copy. I'll commit tomorrow.

OK! thanks again!

haruhiko_yamagata
10th February 2012, 00:01
I have committed as rev 4314. Hope there are not too many regressions...

kc7bfi
10th February 2012, 14:29
How can I analyze it? I won't read bit-stream using binary editor. I'm not a computer.

The debug log indicates the stream is broken. Or it may be indicating the bug of the source/splitter filter or ffdshow.

Rev 4176 changes the way of calculation of NAL unit size. As the mkv file shown, the upper stream filter must not use start code "00 00 01" if the container is mkv or mp4. It must use NAL unit size instead. Microsoft's guideline (http://msdn.microsoft.com/en-us/library/windows/desktop/dd757808%28v=vs.85%29.aspx). Does simply changing the FOURCC work? If your source is RTSP, I don't know how NAL unit size is handled in DirectShow. I think the guideline still should be followed. If I'm wrong, please correct me.

That would help a lot. I'll wait for it.

Thanks for looking into this. I understand moving video via RTSP but when it comes to the bits and bytes of video my knowledge drops off exponentially. The following link has a program that will replay a wireshark capture indicating the problem. Just unpack it and run the run.bat program. Let me know if you have trouble. Thanks, David
http://dl.dropbox.com/u/37804952/H264replay.zip

haruhiko_yamagata
10th February 2012, 15:29
Thanks for looking into this. I understand moving video via RTSP but when it comes to the bits and bytes of video my knowledge drops off exponentially. The following link has a program that will replay a wireshark capture indicating the problem. Just unpack it and run the run.bat program. Let me know if you have trouble. Thanks, David
http://dl.dropbox.com/u/37804952/H264replay.zip
Thanks, but the playback does not start.
"Source IP" (192.168.111.12) doesn't look like a valid address.
I inserted "C:\Program Files (x86)\Java\jre6\bin\" before "java" in run.bat. Was it OK? Otherwise, which "java" should I use?
It looks like it is trying to load x64 dll.

http://ffdshow-tryout.sourceforge.net/doom9/vicads.png

kc7bfi
10th February 2012, 15:34
Thanks, but the playback does not start.
"Source IP" (192.168.111.12) doesn't look like a valid address.
I inserted "C:\Program Files (x86)\Java\jre6\bin\" before "java" in run.bat. Was it OK? Otherwise, which "java" should I use?
It looks like it is trying to load x64 dll.

http://ffdshow-tryout.sourceforge.net/doom9/vicads.png

Yes this is a 64 bit program. It is a Java program that includes an interface to the DirectShow system. If you want to use a 32 bit Java, try using this dsj.dll instead of the one I previously sent.
http://dl.dropbox.com/u/37804952/dsj.dll

David

haruhiko_yamagata
10th February 2012, 16:09
A progress, it tries to connect, but fails.

C:\ff\rtsp>"C:\Program Files (x86)\Java\jre6\bin\java" -Xmx512m -cp .;dsj.jar;Vicads-DsjPlayer-4.0.jar;orci-commons-logging-1.0.jar;orci-commons-lang-1.0.jar;log4j-1.2.16.jar;packer-2.0.jar;javahelp-2.0.02.jar com.orci.vicads.PCAPReplay.MainApp
log4j:WARN No appenders could be found for logger (com.orci.vicads.PCAPReplay.MainApp).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Source: Connect
Closing
Closed
de.humatic.dsj.DSJException: RTPSource could not resolve streams, no data received
at de.humatic.dsj.src.RTPSource.createGraph(SourceFile:594)
at com.orci.vicads.PCAPReplay.MainFrame.startReplay(MainFrame.java:219)
at com.orci.vicads.PCAPReplay.MainFrame.access$300(MainFrame.java:49)
at com.orci.vicads.PCAPReplay.MainFrame$5.actionPerformed(MainFrame.java:179)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

kc7bfi
10th February 2012, 17:41
A progress, it tries to connect, but fails.

C:\ff\rtsp>"C:\Program Files (x86)\Java\jre6\bin\java" -Xmx512m -cp .;dsj.jar;Vicads-DsjPlayer-4.0.jar;orci-commons-logging-1.0.jar;orci-commons-lang-1.0.jar;log4j-1.2.16.jar;packer-2.0.jar;javahelp-2.0.02.jar com.orci.vicads.PCAPReplay.MainApp
log4j:WARN No appenders could be found for logger (com.orci.vicads.PCAPReplay.MainApp).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Source: Connect
Closing
Closed
de.humatic.dsj.DSJException: RTPSource could not resolve streams, no data received
at de.humatic.dsj.src.RTPSource.createGraph(SourceFile:594)
at com.orci.vicads.PCAPReplay.MainFrame.startReplay(MainFrame.java:219)
at com.orci.vicads.PCAPReplay.MainFrame.access$300(MainFrame.java:49)
at com.orci.vicads.PCAPReplay.MainFrame$5.actionPerformed(MainFrame.java:179)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


Hmmm. works here. Try this new zip. It adds some logging. The log will be in your user directory named PCAPReplay.log. Make sure not to change any of the parameters on the form. They should be set correctly. David

http://dl.dropbox.com/u/37804952/H264replay2.zip

Reino
10th February 2012, 21:38
Do you people really have to fully quote every successive post?!

haruhiko_yamagata
10th February 2012, 23:54
Still not working on x64 Java.

C:\ff\rtsp>"C:\Program Files\Java\jre6\bin\java" -Xmx512m -cp .;dsj.jar;Vicads-DsjPlayer-4.0.jar;orci-commons-logging-1.0.jar;orci-commons-lang-1.0.jar;log4j-1.2.16.jar;packer-2.0.jar;javahelp-2.0.02.jar com.orci.vicads.PCAPReplay.MainApp
0 [main] INFO com.orci.vicads.PCAPReplay.MainApp - Create main frame...
90 [main] WARN com.orci.vicads.PCAPReplay.MainFrame - ViewerFrame: Unable to load logo image file /images/vicads_app_icon.gif: java.lang.NullPointerException
183 [main] WARN com.orci.vicads.PCAPReplay.MainFrame - Could not load helpset: javax.help.HelpSetException: Could not parse
Got an IOException (null)
Parsing failed for null
2919 [AWT-EventQueue-0] INFO com.orci.vicads.PCAPReplay.MainFrame - pcap=Optelecom.pcap
2919 [AWT-EventQueue-0] INFO com.orci.vicads.PCAPReplay.MainFrame - srcIp=192.168.111.12
2919 [AWT-EventQueue-0] INFO com.orci.vicads.PCAPReplay.MainFrame - destIp=224.0.111.12:50000
2919 [AWT-EventQueue-0] INFO com.orci.vicads.PCAPReplay.MainFrame - sdp=Optelecom.sdp
2978 [AWT-EventQueue-0] INFO stdout - Source: Connect
3028 [AWT-EventQueue-0] INFO stdout - Graph error: Cannot add filter
17942 [Timer-0] INFO stdout - Closing
17996 [Timer-0] INFO stdout - Closed
23129 [AWT-EventQueue-0] ERROR stderr - de.humatic.dsj.DSJException: RTPSource could not resolve streams, no data received
23129 [AWT-EventQueue-0] ERROR stderr - at de.humatic.dsj.src.RTPSource.createGraph(SourceFile:594)
23130 [AWT-EventQueue-0] ERROR stderr - at com.orci.vicads.PCAPReplay.MainFrame.startReplay(MainFrame.java:223)
23130 [AWT-EventQueue-0] ERROR stderr - at com.orci.vicads.PCAPReplay.MainFrame.access$300(MainFrame.java:49)
23130 [AWT-EventQueue-0] ERROR stderr - at com.orci.vicads.PCAPReplay.MainFrame$5.actionPerformed(MainFrame.java:179)
23130 [AWT-EventQueue-0] ERROR stderr - at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
23130 [AWT-EventQueue-0] ERROR stderr - at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
23131 [AWT-EventQueue-0] ERROR stderr - at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
23131 [AWT-EventQueue-0] ERROR stderr - at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
23131 [AWT-EventQueue-0] ERROR stderr - at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
23131 [AWT-EventQueue-0] ERROR stderr - at java.awt.Component.processMouseEvent(Unknown Source)
23131 [AWT-EventQueue-0] ERROR stderr - at javax.swing.JComponent.processMouseEvent(Unknown Source)
23132 [AWT-EventQueue-0] ERROR stderr - at java.awt.Component.processEvent(Unknown Source)
23132 [AWT-EventQueue-0] ERROR stderr - at java.awt.Container.processEvent(Unknown Source)
23132 [AWT-EventQueue-0] ERROR stderr - at java.awt.Component.dispatchEventImpl(Unknown Source)
23132 [AWT-EventQueue-0] ERROR stderr - at java.awt.Container.dispatchEventImpl(Unknown Source)
23132 [AWT-EventQueue-0] ERROR stderr - at java.awt.Component.dispatchEvent(Unknown Source)
23133 [AWT-EventQueue-0] ERROR stderr - at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
23133 [AWT-EventQueue-0] ERROR stderr - at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
23133 [AWT-EventQueue-0] ERROR stderr - at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
23133 [AWT-EventQueue-0] ERROR stderr - at java.awt.Container.dispatchEventImpl(Unknown Source)
23133 [AWT-EventQueue-0] ERROR stderr - at java.awt.Window.dispatchEventImpl(Unknown Source)
23134 [AWT-EventQueue-0] ERROR stderr - at java.awt.Component.dispatchEvent(Unknown Source)
23134 [AWT-EventQueue-0] ERROR stderr - at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
23134 [AWT-EventQueue-0] ERROR stderr - at java.awt.EventQueue.access$000(Unknown Source)
23134 [AWT-EventQueue-0] ERROR stderr - at java.awt.EventQueue$1.run(Unknown Source)
23134 [AWT-EventQueue-0] ERROR stderr - at java.awt.EventQueue$1.run(Unknown Source)
23135 [AWT-EventQueue-0] ERROR stderr - at java.security.AccessController.doPrivileged(Native Method)
23135 [AWT-EventQueue-0] ERROR stderr - at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
23135 [AWT-EventQueue-0] ERROR stderr - at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
23135 [AWT-EventQueue-0] ERROR stderr - at java.awt.EventQueue$2.run(Unknown Source)
23135 [AWT-EventQueue-0] ERROR stderr - at java.awt.EventQueue$2.run(Unknown Source)
23136 [AWT-EventQueue-0] ERROR stderr - at java.security.AccessController.doPrivileged(Native Method)
23136 [AWT-EventQueue-0] ERROR stderr - at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
23136 [AWT-EventQueue-0] ERROR stderr - at java.awt.EventQueue.dispatchEvent(Unknown Source)
23136 [AWT-EventQueue-0] ERROR stderr - at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
23136 [AWT-EventQueue-0] ERROR stderr - at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
23137 [AWT-EventQueue-0] ERROR stderr - at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
23137 [AWT-EventQueue-0] ERROR stderr - at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
23137 [AWT-EventQueue-0] ERROR stderr - at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
23137 [AWT-EventQueue-0] ERROR stderr - at java.awt.EventDispatchThread.run(Unknown Source)

EDIT
I tried regsvr32 dsj.dll, which resulted error. I think I need the source/splitter filter.ax.

Snowknight26
11th February 2012, 00:11
FPS1 -> NV12 conversion results in wrong colors. Example. (http://stfcc.org/pics/i/fdd3ea6f828a7dff2805e9bca9c0e8e1.png)
FPS1 -> * is fine. Example. (http://stfcc.org/pics/i/2ed44b4ab9a96899cd03a77fe3726bf7.png)

Sample. (http://stfcc.org/misc/ffdshow.fraps.colors.zip)

haruhiko_yamagata
11th February 2012, 00:59
FPS1 -> NV12 conversion results in wrong colors. Example. (http://stfcc.org/pics/i/fdd3ea6f828a7dff2805e9bca9c0e8e1.png)
FPS1 -> * is fine. Example. (http://stfcc.org/pics/i/2ed44b4ab9a96899cd03a77fe3726bf7.png)

Sample. (http://stfcc.org/misc/ffdshow.fraps.colors.zip)Thanks, I can reproduce.
Perhaps RGB->YCbCr conversion is currently broken.
(This issue is not related to the migration of libswscale.)

ryrynz
11th February 2012, 03:32
Dunno if you would care Haruhiko but I'd like to mention Pastebin as being a great place to store debug outputs and such which you could link to thus helping keep the thread tidy this would help fix up the reply issue Corone mentioned.

kc7bfi
11th February 2012, 16:34
I tried regsvr32 dsj.dll, which resulted error. I think I need the source/splitter filter.ax.

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

egur
12th February 2012, 00:30
Please note my last commit:

Modified/fixed TtelecineManager class (in TvideoCodec.cpp + .h). Changed behavior to produce exactly 23.976 fps when entering film mode. Previous behavior was not producing smooth playback. In film mode time stamps are calculated from the first frame of the film sequence.

Playback wasn't smooth on many clips. averaging time stamps is not a good concept... Now it's much better with less code :)

Re-added an initialization from SPS header (H264) of the pictIn variable used for codec initialization. Need to check if this is actually used since no one complained.

haruhiko_yamagata
12th February 2012, 01:15
Currently ffdshow use libswscale to convert RGB24 to YV12.
Neither Libav nor FFmpeg supports color matrix configuration. BT.601-TV is simply hard coded. That's why FPS1 -> NV12 conversion is failing.
Everyone, please give me an advice, from which project to import. A converter that has good scaler and supports configuration of matrix and range is wanted.

haruhiko_yamagata
12th February 2012, 01:39
Please note my last commit:

Modified/fixed TtelecineManager class (in TvideoCodec.cpp + .h). Changed behavior to produce exactly 23.976 fps when entering film mode. Previous behavior was not producing smooth playback. In film mode time stamps are calculated from the first frame of the film sequence.

Playback wasn't smooth on many clips. averaging time stamps is not a good concept... Now it's much better with less code :)
Thanks for fix.
I've broken something when I changed the code to check only one repeat first field flag to enter film mode.
Formerly, it checked 4 frames (10 fields) and buffered them to calculate the average.
Is it safe enough to assume 23.976 fps just by detecting only one repeat first field flag?

Re-added an initialization from SPS header (H264) of the pictIn variable used for codec initialization. Need to check if this is actually used since no one complained.

In my working copy for the next commit, it needs to get frame rate from SPS.
That function is now very robust and won't crash anymore. Please keep it.