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

Leak
3rd December 2008, 21:18
Can we do inverse telicine + deinterlace transformation in ffdshow for film source (29i (film) -> 24p) ?
Errr... yes? (http://ffdshow-tryout.wiki.sourceforge.net/AviSynth)

np: Mr. Scruff - Kalimba (Ninja Tuna)

tal.aloni
3rd December 2008, 21:52
Personally, it's more confusing for me.
Once we decided to call it after how it is ordered in memory, we can remember it. Please add some comment to PNG and BMP conversion part.

OK, here it is, comments only patch:
http://iknowu.net/files/public/ffdshow/2410-Comments-RC2.patch

Please notify me if you think something is inaccurate.

Tal

Snowknight26
4th December 2008, 05:15
It seems that the channel order for 5.1 channel AC3 streams differs between liba52 and libavcodec in r2314 - using the Mixer to downmix to 2.0 though so don't hold me to it. I'll check the latest revision soon but I doubt there are any changes as they would have been mentioned in the SVN (unless its under updated ffmpeg).

haruhiko_yamagata
4th December 2008, 11:56
OK, here it is, comments only patch:
http://iknowu.net/files/public/ffdshow/2410-Comments-RC2.patch

Please notify me if you think something is inaccurate.

TalThank you, the patch looks OK. Please commit it.

haruhiko_yamagata
4th December 2008, 11:58
Just to explain why it is in FFmpeg the way it is: calling it "after how it is ordered in memory" works really badly for the 16, 15 and 8 bit RGB/BGR formats (same for the 10 bit/component formats except FFmpeg does not support them yet).Thank you for letting me know.
I don't care about RGB15/16, because we hardly use them.

haruhiko_yamagata
4th December 2008, 14:29
It seems that the channel order for 5.1 channel AC3 streams differs between liba52 and libavcodec in r2314 - using the Mixer to downmix to 2.0 though so don't hold me to it. I'll check the latest revision soon but I doubt there are any changes as they would have been mentioned in the SVN (unless its under updated ffmpeg).Do you have a sample that is easy to hear?

cbemoore
4th December 2008, 17:09
It seems that the channel order for 5.1 channel AC3 streams differs between liba52 and libavcodec in r2314 - using the Mixer to downmix to 2.0 though so don't hold me to it. I'll check the latest revision soon but I doubt there are any changes as they would have been mentioned in the SVN (unless its under updated ffmpeg).

You're right. I originally posted the issue here (http://forum.doom9.org/showthread.php?p=1219215#post1219215), but noone commented.

I've just tried changing from libavcodec to liba52, and this solves the problem. So it looks like libavcodec is broken.

@Haruhiko - I've got a 66MB sample if that helps? How can I send it to you?

Snowknight26
4th December 2008, 17:30
Do you have a sample that is easy to hear?

Funny you should mention that.. I just deleted it. Found another one though. (http://www.stfcc.org/misc/pleasantville.ac3)

Also, another thing. With DTS being decoded with libavcodec, the output is always 16-bit, regardless of what I specify under Output.

tal.aloni
4th December 2008, 21:59
Thank you, the patch looks OK. Please commit it.

I have commited as rev. 2415,
I accidently forgot to add comment while committing, (oh, the irony), please forgive me.
Reimar, Thanks for stepping in to clarify.

I still feel we could do a little bit better regarding the issue. (both ffdshow and ffmpeg)

Tal

whurlston
4th December 2008, 22:20
I can decode TrueHD audio streams by connecting to the ArcSoft MPEG demux but the channel mappings are off. The center channel plays out of the back left surround. Is anyone else experiencing this?

cbemoore
5th December 2008, 00:16
I can decode TrueHD audio streams by connecting to the ArcSoft MPEG demux but the channel mappings are off. The center channel plays out of the back left surround. Is anyone else experiencing this?

Not sure about TrueHD, but DTS mappings are wrong with libavcodec....

STaRGaZeR
5th December 2008, 10:49
The MP3 clicks using libav are gone with the last rev! In fact there are no problems when seeking, playing... whatever. Also if mp3lib is selected ffdshow crashes the player (maybe with the changes in rev2416?).

cbemoore, please describe your details because DTS mapping is fine here with libav. Samples are always welcome.

PS: any news about the high pitch sound when playing DVDs (only happens with DVDs as a whole, not with the individual VOBs) with libavcodec AC3 in MPC-HC?

clsid
5th December 2008, 11:25
I will fix the mp3lib problem. It is an SSE2 issue and MinGW GCC being a bitch with alignment.

haruhiko_yamagata
5th December 2008, 11:58
Since we have dropped ANSI builds, translations are welcome in UNICODE.
Many of the files in \bin\languages are garbled for me.
Maybe because I don't have proper font for them, but Unicode works definitely better.
I converted ffdshow.1028.tc successfully, but I can't convert most of the files.
Please convert them to UNICODE.

fastplayer
5th December 2008, 12:06
Since we have dropped ANSI builds, translations are welcome in UNICODE.
So support for Win95/98/ME is no more? Since which build? Link to last build?
This should go into the FAQ. I'll add an entry.

clsid
5th December 2008, 12:12
Here are the files converted to Unicode (with UltraEdit):
http://www.zshare.net/download/5228467730784fef/

Revision 2352 is the last build that works on win9x.

haruhiko_yamagata
5th December 2008, 12:23
Funny you should mention that.. I just deleted it. Found another one though. (http://www.stfcc.org/misc/pleasantville.ac3)
I can't find any difference between liba52 and libavcodec. Which channel is wrong? Where is it audible?

Also, another thing. With DTS being decoded with libavcodec, the output is always 16-bit, regardless of what I specify under Output.
I can't reproduce.

fastplayer
5th December 2008, 12:35
Revision 2352 is the last build that works on win9x.
I guess that's enough:
http://ffdshow-tryout.wiki.sourceforge.net/FAQ#win9x

haruhiko_yamagata
5th December 2008, 12:51
Here are the files converted to Unicode (with UltraEdit):
http://www.zshare.net/download/5228467730784fef/
ffdshow.1028.tc doesn't look correct to me.
Did you manually specify the original local?

tal.aloni
5th December 2008, 13:06
please review my latest patch:

1. DRC is now based on presets, (this might be useful for "night mode" preset).

2. DRC can now be turned on/off immediately, without restarting ffdshow, very useful to test its effects.

3. I moved the DRC checkbox to the processing tab,
IMO, this is the most appropriate location, this would also give me the needed space to add a DRC Level "slider" in the future. (other places suggested in the past are problematic)

http://iknowu.net/files/public/ffdshow/Processing-DRC.png

Patch:
http://iknowu.net/files/public/ffdshow/2414-DRCBasedOnPresets.patch

Build:
http://iknowu.net/files/public/ffdshow/ffdshow_rev2414-DRC_20081205.exe

fastplayer
5th December 2008, 13:30
3. I moved the DRC checkbox to the processing tab,
IMO, this is the most appropriate location,...
...and the most un-intuitive location IMO... :p

haruhiko_yamagata
5th December 2008, 13:35
3. I moved the DRC checkbox to the processing tab,
IMO, this is the most appropriate location, this would also give me the needed space to add a DRC Level "slider" in the future. (other places suggested in the past are problematic)
It's difficult to find. People don't open that page.
Please add a new page below "Processing" with fixed order.


//EDIT this was my mistake.
The installer upgrade path will continue to overwrite all the presets on every installation, because it does not delete the old registry value.

fastplayer
5th December 2008, 13:40
Are these "Processing" options related to "Presets" or not? Because that's what the indent suggests. It somehow "confuses" me and probably even Joe Sixpack and Joe The Plumber... :D
How about moving it close to the "Output" options?

clsid
5th December 2008, 13:53
ffdshow.1028.tc doesn't look correct to me.
Did you manually specify the original local?
No. I only converted from ASCII to Unicode.

ffdshow.2052.sc was the only file that originally had UTF-8 encoding. Maybe that is why something went wrong. Are the other files OK?

Maybe the editors mentioned here will be better:
http://sourceforge.net/tracker/index.php?func=detail&aid=1952999&group_id=173941&atid=867360

haruhiko_yamagata
5th December 2008, 14:23
No. I only converted from ASCII to Unicode.

ffdshow.2052.sc was the only file that originally had UTF-8 encoding. Maybe that is why something went wrong. Are the other files OK?

Maybe the editors mentioned here will be better:
http://sourceforge.net/tracker/index.php?func=detail&aid=1952999&group_id=173941&atid=867360
UTF-8 is OK, though the recommended is UTF-16 with BOM (little endian).
I can't find a good converter that can convert all the files.
You have to specify locale (for example 1041 for Japanese). Auto detection may succeed, but we can't depend on it.

haruhiko_yamagata
5th December 2008, 14:30
Why does the "Apply"-button change its state from disabled to enabled every time you navigate to "DirectShow control" in ffdshow's options even though you haven't changed any setting on that page at all? I find this confusing because it suggests that I have performed - possibly unwanted - changes...
I can't reproduce this.

haruhiko_yamagata
5th December 2008, 14:32
I've just found a bug with DTS decoding in the latest (rev 2405) ffdshow code. I guess its either the decoder at fault, or maybe its related to the recent audio restructuring code.

My ffdshow mixer is set to 5channels+LFE, and I'm trying to play a 3-channel DTS film with Left, Center and Right channels. For some reason, the center channel being sent to my rear speakers instead of the front center. Older versions of ffdshow didn't have this issue. I haven't enabled ffdshow channel swapping, so that's not the problem.

Just to confirm the problem, I tried using S/PDIF to my receiver, and the receiver outputs correctly to the front center speaker.

Is there anything I can do to help debug the problem? I can upload a sample if you let me know where to put it.
Please send it through MegaUpload or sendspace.

fastplayer
5th December 2008, 14:43
I can't reproduce this.
It happens always for "DirectShow control" in the ffdshow's video decoder configuration. It will not happen if the last saved option is "DirectShow control". That is when you exit ffdshow settings with this page open.
I can reproduce it on Server 2003 (32bit) as well as XP (32bit) inside a VM. This has been happening for a long time but I was too lazy to post about it... :o
It happens sometimes in audio configuration, too. Unfortunately, I can not reproduce this reliably.

Edit: Forget the last sentence. The "Apply" button goes from "disabled" to "enabled" when I visit OSD first (without changing any setting at all) in ffdshow audio configuration.
Edit - part deux: On a fresh install, ffdshow audio configuration --> DirectShow control --> Apply button --> Enabled
Edit - part trois: On a fresh install, ffdshow audio configuration --> OSD --> Apply button --> Enabled --> click on Apply --> go to another category --> go back to OSD --> Apply button enabled again...
For me, the behavior of the "Apply" button is completely erratic.

Dark Eiri
5th December 2008, 16:25
Can you please add fallout3.exe to the blacklist by default? It causes the game to crash every 30 seconds or so.

tal.aloni
5th December 2008, 16:38
Haruhiko, you were partially right, the 'default' preset was being overwritten, I have fixed it.

anyway, I have created another tab, as requested,
and called it "Decoder options", also, I created an "audio" folder in the "dialog" folder, I hope that's OK. (I think that seperation to audio and video there would be preferred)

http://iknowu.net/files/public/ffdshow/drc/Processing-DRC-RC2.png

Patch:
http://iknowu.net/files/public/ffdshow/drc/2420-DRCBasedOnPresets-RC4.patch

Build:
http://iknowu.net/files/public/ffdshow/drc/ffdshow_rev2420-PresetDRC-RC4_20081205.exe

Tal

Note:
I have manualy modified the icl10 and the VC2003 project files, but I don't have these compilers to test.
if something is wrong, please notify me.

Snowknight26
5th December 2008, 16:48
I can't find any difference between liba52 and libavcodec. Which channel is wrong? Where is it audible? Maybe it only happens in mkvs. http://www.stfcc.org/misc/pleasantville.mkv

I can't reproduce.
http://www.stfcc.org/misc/dts.libavcodec.jpg
http://www.stfcc.org/misc/dts.libdts.jpg
Notice the system tray info.

clsid
5th December 2008, 17:08
Can you please add fallout3.exe to the blacklist by default? It causes the game to crash every 30 seconds or so.
It is already on the default blacklist. Reset yours to default.

KoD
5th December 2008, 17:58
ffdshow translation files converted to UTF16LE & BOM. Manually converted using the most likely code pages. Download link here (http://s000.tinyupload.com/index.php?file_id=27160445829653187709). The japanese translation file is the one posted on SVN 5 hours ago. The english transaltion file was not included.

haruhiko_yamagata
5th December 2008, 18:03
http://www.stfcc.org/misc/dts.libavcodec.jpg
http://www.stfcc.org/misc/dts.libdts.jpg
Notice the system tray info.
Is this a bug? I think it's the spec.

haruhiko_yamagata
5th December 2008, 18:09
ffdshow translation files converted to UTF16LE & BOM. Manually converted using the most likely code pages. Download link here (http://s000.tinyupload.com/index.php?file_id=27160445829653187709). The japanese translation file is the one posted on SVN 5 hours ago. The english transaltion file was not included.Good work. It looks OK. Can anyone confirm?
:thanks:

fastplayer
5th December 2008, 18:12
Good work. It looks OK. Can anyone confirm?
:thanks:
I can't confirm tc/sc/ja/jp because PSPad only shows some squares but everything else looks fine.

Eragon4ever
5th December 2008, 18:20
Everything looking fine here (tc/sc/ja/jp included). You might want to remove jp, though.

clsid
5th December 2008, 19:51
Maybe it only happens in mkvs. http://www.stfcc.org/misc/pleasantville.mkv


http://www.stfcc.org/misc/dts.libavcodec.jpg
http://www.stfcc.org/misc/dts.libdts.jpg
Notice the system tray info.
You have checked 16/24/32bit as allowed outputs. So when either of those are outputted, the behavior is correct.

libavcodec decodes to 16-bit, so that is why it chooses that as output.
liba52 probably decodes to 32-bit, so that is why it output as 32-bit

If you enable only 32-bit as allowed output, then ffdshow will output 32-bit. That means that when using libavcodec, it will convert from 16 to 32. That does not mean better quality, just extra CPU load.

tal.aloni
5th December 2008, 20:33
@developers,
The following variables have been removed from ffmpeg a long time ago, and I'm about to remove them from ffdshow as well:

inter_matrix_luma,inter_matrix_chroma,intra_matrix_luma,intra_matrix_chroma

if you have any objection, please notify me.

Patch:
http://iknowu.net/files/public/ffdshow/2420-IntraMatrixLuma.patch

clsid
5th December 2008, 21:17
OK.

h263.c also contains a few lines of inter/intra_matrix stuff that differs from FFmpeg SVN. I suspect that can be removed as well.

BatKnight
5th December 2008, 22:01
Is there any other site where one can download the latest ffdshow-MT build when Alexin's www.xvidvideo.ru is down?

Thanks

Bat

Snowknight26
5th December 2008, 23:34
If you enable only 32-bit as allowed output, then ffdshow will output 32-bit. That means that when using libavcodec, it will convert from 16 to 32. That does not mean better quality, just extra CPU load.

Why doesn't libavcodec just output 32-bit then downsample if necessary? Shouldn't it try to connect with the highest bitdepth allowed?

Continuing with the trend, AC3 is only decoded as 16-bit when 16/24/32-bit output is set. Since AC3 doesn't have a bitdepth, its up to the decoder to choose what the output is. Shouldn't libavcodec do all its internal decoding in 64-bit floating point then downsample to the maximum output allowed (32-bit if its checked)?

Dark Shikari
5th December 2008, 23:36
Why doesn't libavcodec just output 32-bit then downsample if necessary? Shouldn't it try to connect with the highest bitdepth allowed?

Continuing with the trend, AC3 is only decoded as 16-bit when 16/24/32-bit output is set. Since AC3 doesn't have a bitdepth, its up to the decoder to choose what the output is. Shouldn't libavcodec do all its internal decoding in 64-bit floating point then downsample to the maximum output allowed (32-bit if its checked)?Almost nothing in lavc uses 64-bit floating point IIRC; it's way too slow.

Internal decoding AFAIK is done in 32-bit float. The output conversion is defined by the sample_fmt, I think.

tal.aloni
6th December 2008, 00:14
I've added support for setting DRC level for liba52 (and added another function to modify it during playback), this could be useful for other projects besides ffdshow, but the website at sourceforge seems dead.

does anybody know if the project is still maintained somewere, and how can I contact the developers?

Thanks,
Tal

fastplayer
6th December 2008, 01:27
@clsid:
A RAR file (languages_unicode.rar) slipped into the {app}\languages directory and IS script.

haruhiko_yamagata
6th December 2008, 01:36
I have created another tab, as requested,
and called it "Decoder options", also, I created an "audio" folder in the "dialog" folder, I hope that's OK. (I think that seperation to audio and video there would be preferred)

http://iknowu.net/files/public/ffdshow/drc/Processing-DRC-RC2.png

I said below "Processing", but excuse me...
If it is called "Decoder options" it should be consistent with video, above "Output".
If we are not going to add more options in the page, "Dynamic range compression" is preferred because it is easier to find.
You might have to expand the width of the column though (IDD_FFDSHOWAUDIO). It looks somewhat ...
Anyway I'm not a good designer.

===================================================================
--- src/dialog/audio/CaudioDecoderOptions.cpp (revision 0)
+++ src/dialog/audio/CaudioDecoderOptions.cpp (revision 0)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2004-2006 Milan Cutka
+ *
Please don't hesitate to put your name there.

MatMaul
6th December 2008, 02:28
here is a little patch concerning libavcodec which :
- activate high precision mp3 decoding (32 bits)
- activate the use of 32 bits output when the bitdepth of lossless format is superior to 16 (only concerning mlp atm)
Index: src/codecs/TaudioCodecLibavcodec.cpp
===================================================================
--- src/codecs/TaudioCodecLibavcodec.cpp (revision 2422)
+++ src/codecs/TaudioCodecLibavcodec.cpp (working copy)
@@ -125,6 +125,7 @@
switch (avctx->sample_fmt)
{
case SAMPLE_FMT_S16:fmt.sf=TsampleFormat::SF_PCM16;break;
+ case SAMPLE_FMT_S32:fmt.sf=TsampleFormat::SF_PCM32;break;
case SAMPLE_FMT_FLT:fmt.sf=TsampleFormat::SF_FLOAT32;break;
}
isGain=deci->getParam2(IDFF_vorbisgain);
@@ -231,7 +232,12 @@
{
fmt.setChannels(avctx->channels);
fmt.freq=avctx->sample_rate;
- fmt.sf=avctx->sample_fmt;
+ switch (avctx->sample_fmt)
+ {
+ case SAMPLE_FMT_S16:fmt.sf=TsampleFormat::SF_PCM16;break;
+ case SAMPLE_FMT_S32:fmt.sf=TsampleFormat::SF_PCM32;break;
+ case SAMPLE_FMT_FLT:fmt.sf=TsampleFormat::SF_FLOAT32;break;
+ }
}

// Correct channel mapping
Index: src/ffmpeg/config.h
===================================================================
--- src/ffmpeg/config.h (revision 2422)
+++ src/ffmpeg/config.h (working copy)
@@ -54,6 +54,8 @@
#define ENABLE_SMALL 0

#define ENABLE_GRAY 1
+
+#define CONFIG_AUDIO_NONSHORT 1


#define CONFIG_AASC_DECODER 1
Index: src/ffmpeg/libavcodec/mlp_parser.c
===================================================================
--- src/ffmpeg/libavcodec/mlp_parser.c (revision 2422)
+++ src/ffmpeg/libavcodec/mlp_parser.c (working copy)
@@ -258,8 +258,8 @@
goto lost_sync;

#ifdef CONFIG_AUDIO_NONSHORT
- avctx->bits_per_sample = mh.group1_bits;
- if (avctx->bits_per_sample > 16)
+ avctx->bits_per_raw_sample = mh.group1_bits;
+ if (avctx->bits_per_raw_sample > 16)
avctx->sample_fmt = SAMPLE_FMT_S32;
#endif
avctx->sample_rate = mh.group1_samplerate;
Index: src/ffmpeg/libavcodec/mlpdec.c
===================================================================
--- src/ffmpeg/libavcodec/mlpdec.c (revision 2422)
+++ src/ffmpeg/libavcodec/mlpdec.c (working copy)
@@ -302,7 +302,7 @@
m->avctx->frame_size = mh.access_unit_size;

#ifdef CONFIG_AUDIO_NONSHORT
- m->avctx->bits_per_sample = mh.group1_bits;
+ m->avctx->bits_per_raw_sample = mh.group1_bits;
if (mh.group1_bits > 16) {
m->avctx->sample_fmt = SAMPLE_FMT_S32;
}

haruhiko_yamagata
6th December 2008, 05:15
It happens always for "DirectShow control" in the ffdshow's video decoder configuration. It will not happen if the last saved option is "DirectShow control". That is when you exit ffdshow settings with this page open.
I can reproduce it on Server 2003 (32bit) as well as XP (32bit) inside a VM. This has been happening for a long time but I was too lazy to post about it... :o
It happens sometimes in audio configuration, too. Unfortunately, I can not reproduce this reliably.

Edit: Forget the last sentence. The "Apply" button goes from "disabled" to "enabled" when I visit OSD first (without changing any setting at all) in ffdshow audio configuration.
Edit - part deux: On a fresh install, ffdshow audio configuration --> DirectShow control --> Apply button --> Enabled
Edit - part trois: On a fresh install, ffdshow audio configuration --> OSD --> Apply button --> Enabled --> click on Apply --> go to another category --> go back to OSD --> Apply button enabled again...
For me, the behavior of the "Apply" button is completely erratic.
I can confirm when I visit OSD page, it turns to enabled.

Snowknight26
6th December 2008, 06:25
- activate the use of 32 bits output when the bitdepth of lossless format is superior to 16 (only concerning mlp atm)


Excellent. Hope FLAC (not like anyone uses libavcodec for it anyway, buggy) and LPCM come next if they don't already do that.

haruhiko_yamagata
6th December 2008, 07:03
here is a little patch concerning libavcodec which :
- activate high precision mp3 decoding (32 bits)
- activate the use of 32 bits output when the bitdepth of lossless format is superior to 16 (only concerning mlp atm)

Thank you, applied.