|
|
| fccHandler |
Posted: Aug 7 2011, 06:03 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
I have decided to release this experimental plugin: http://fcchandler.home.comcast.net/Plugins/QuickTime
I want to say that this is not an attempt to compete with the existing QuickTime plugin made by tateu. In fact, I had already started on this code long before he released his plugin. But I stopped working on it when I heard that he had made one.
Unfortunately I was never able to play with tateu's QuickTime plugin, since it requires QuickTime (or alternative) to be installed. I made a vow back in the 1990's that I would never install any Apple software on any of my PC's, and I have stuck to it.
I took a holiday last week, and I figured I would revisit this code to see if I could get it up and running again. You will need Windows VFW codecs; I recommend ffdshow-tryouts Beta 7.
I offer this plugin to you strictly as an experiment, so I may or may not honor your bug reports and/or feature requests. I make no promises right now, but I am surely interested to hear what you think...
Anyway, it is what it is, and it's FREE!
Enjoy. 
-------------------- May the FOURCC be with you... |
 |
| v0lt |
| Posted: Aug 7 2011, 10:03 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 119
Member No.: 26125
Joined: 5-September 09

|
Good news! It may be useful for video from cameras. |
 |
| -vdub- |
| Posted: Aug 7 2011, 05:30 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 613
Member No.: 27087
Joined: 24-February 10

|
What do you suggest is the best avc1 vfw codec to use when no ffdshow is installed ? |
 |
| fccHandler |
| Posted: Aug 7 2011, 08:27 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
Well I've never used anything for AVC except ffdshow-tryouts, so I don't have any suggestions.
-------------------- May the FOURCC be with you... |
 |
| Placio74 |
| Posted: Aug 7 2011, 09:58 PM |
 |
|

VideoAudio
  
Group: Members
Posts: 1216
Member No.: 21485
Joined: 24-May 07

|
Hmm... plugin mostly works well. Once or twice did not detect an audio track. Lack of support for Qdesign or ALAC is obvious... but why also u-Law/a-Law? Ability to change input FourCC can be sometime useful. Choice of video track (if there are more in container and especially when first is not main) can be sometime useful (rarely but...).
-------------------- VideoAudio.pl - Serwis o technologii wideo & audio |
 |
| fccHandler |
| Posted: Aug 7 2011, 10:47 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
| QUOTE (Placio74 @ Aug 7 2011, 05:58 PM) | | Lack of support for Qdesign or ALAC is obvious... but why also u-Law/a-Law? | I did not consider u-law/a-law to be a priority at the time. But I do have a couple of examples of these in an archive somewhere, so I will probably add support for them in the future.
I am sad about QDesign, that there is no ACM codec for it, because it is very common in older .mov files. 
-------------------- May the FOURCC be with you... |
 |
| fccHandler |
| Posted: Aug 14 2011, 04:59 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
Version 1.1 is up, see the Change Log for details: http://fcchandler.home.comcast.net/Plugins/QuickTime
While testing this plugin I've discovered several bugs in ffdshow-tryouts, and at least one bug in VirtualDub. To replicate the VirtualDub bug, download this video: http://samples.mplayerhq.hu/A-codecs/qtfl32/vb3.mov
Open it with my QuickTime plugin, and observe that Input Playback fails, while Output Playback succeeds. I don't understand what is happening with that...
-------------------- May the FOURCC be with you... |
 |
| v0lt |
| Posted: Aug 14 2011, 06:18 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 119
Member No.: 26125
Joined: 5-September 09

|
qt_pcm_audio_samples.7z
MPC-HC + internal MP4Splitter all formats need decoder (internal MpaDecFilter or LAV Audio)
MPC-HC + LAV Splitter 16L_(sowt), 24L_(in24), 32L_(in32), f32L_(fl32) does not need any decoder others formats need decoder (internal MpaDecFilter or LAV Audio)
08B_(twos) and 08L_(sowt) are identical (different header only) 08uB_(raw_) and 08uL_(raw_) are identical too (different header only)
ffdshow not work well with QT PCM |
 |
| fccHandler |
| Posted: Aug 14 2011, 07:49 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
Thank you for posting those! They were very enlightening.
The changes to support them were not difficult, so I have uploaded version 1.2: http://fcchandler.home.comcast.net/Plugins/QuickTime
Note that VirtualDub does not seem to work properly with 24-bit or 32-bit PCM, or 32-bit or 64-bit float. However, you can extract the raw audio to a .wav file and probably open them in an audio editor. I know for example that Adobe Audition can work with all of these formats.
-------------------- May the FOURCC be with you... |
 |
| v0lt |
| Posted: Aug 15 2011, 01:20 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 119
Member No.: 26125
Joined: 5-September 09

|
Now is much better! |
 |
| v0lt |
| Posted: Aug 15 2011, 01:45 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 119
Member No.: 26125
Joined: 5-September 09

|
8-bit samples must sound the same. But samples 08B_(twos) and 08L_(sowt) sound more hollow. These samples must be converted to unsigned 8-bit.
Example:
| CODE | AudioSourceQT.cpp 363 actual = parentPtr->ReadRawStream(lpBuffer, lStart64 * ba, lCount * ba, *audio);
+ if (wfex->wBitsPerSample == 8 && (audio->dwFormat == A_SOWT || audio->dwFormat == A_TWOS)) + { + char *src = (char *)lpBuffer; + for (unsigned int i=0; i < actual; i++) + { + src[i] = src[i] + 128; // convert signed 8-bit to unsigned 8-bit. + } + } + else if (audio->iEndianness == 0) - if (audio->iEndianness == 0) + else if (audio->iEndianness == 0) { // swap big-endian to little-endian
QTTrack.cpp 1259 }
- if ((dwFormat == A_SOWT || dwFormat == A_TWOS) && wfex->wBitsPerSample == 8) - { - // 'twos' and 'sowt' are defined as 16-bit audio formats, - // but some tracks have 8 bits per sample specified in the - // header! It appears to work fine though if we correct - // the values here, and play the audio at half-rate. - - // Note: We can only do this after the chunks are parsed! - // Note: 'sowt' is actually big-endian in this case! - - wfex->wBitsPerSample *= 2; - wfex->nBlockAlign *= 2; - wfex->nSamplesPerSec /= 2; - } - wfex->wFormatTag = WAVE_FORMAT_PCM; wfex->nAvgBytesPerSec = wfex->nBlockAlign * wfex->nSamplesPerSec; | |
 |
| fccHandler |
| Posted: Aug 16 2011, 11:32 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
Aha, so they are signed 8-bit! That explains a lot. I will fix it in the next release. Thanks.
-------------------- May the FOURCC be with you... |
 |
| fccHandler |
| Posted: Aug 20 2011, 08:51 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
I've uploaded version 1.3 which fixes the 8-bit problem and adds support for variable frame rate video: http://fcchandler.home.comcast.net/Plugins/QuickTime
-------------------- May the FOURCC be with you... |
 |
| v0lt |
| Posted: Aug 20 2011, 09:20 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 119
Member No.: 26125
Joined: 5-September 09

|
| QUOTE (fccHandler @ Aug 20 2011, 08:51 PM) | | ... and adds support for variable frame rate video |
In VirtualDub? How it works? |
 |
| fccHandler |
| Posted: Aug 20 2011, 11:03 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
Well, obviously we have to convert it to a constant frame rate for VirtualDub. In a nutshell, use the time-to-sample atom to find the least difference between any two frame timestamps. The reciprocal of this will be the "perceived" frame rate we report to VirtualDub.
Then build a mapping of "perceived" frames to actual media samples, and when delivering the video, drop duplicates as necessary to achieve a constant output rate. (Consequently, you will know you have VFR video if you see any dropped frames on VirtualDub's timeline.)
Although not 100% foolproof, I find this approach is working much better than the often flawed method used by the WMV plugin. In fact I will probably port this idea to my other plugins at some point.
-------------------- May the FOURCC be with you... |
 |