Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

Pages: (10) « First ... 7 8 [9] 10  ( Go to first unread post )
Experimental QuickTime Plugin, (does not require QuickTime)
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
fccHandler
Posted: Feb 20 2012, 06:09 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



QUOTE (ale5000 @ Feb 19 2012, 09:15 PM)
In particulare I noticed this difference that may be the problem:

Original =>
0x00 0x00 0x00 0x30 0x30 0x64 0x63 0x00

Remuxed using the QuickTime input plugin =>
0x00 0x00 0x00 0x30 0x30 0x64 0x63 0x10

That is the "key frame" flag (0x10) in the frame indices. All of the frames remuxed from your corrupt files will have this key frame flag set, since they are missing the 'stts' atom as I explained before.

However, there are three other mysterious differences:

1) At offset 0x00000070, the original file has 'WVC1' while the other has 0x00000000. This is the fccType field of the video AVIStreamHeader.

2) At offset 0x00000094, the original file has 0x00000000 while the other has 0xFFFFFFFF. This is the dwQuality field of the video AVIStreamHeader.

3) At offset 0x000000C0, the original file has 0x00079800, while the other has 0x00000000. This is the biSizeImage field of the video BITMAPINFOHEADER.

The first two are generated by VirtualDub and are not under my control. I can't explain why they would be different in this case.

The third one is under my control. The original has the equivalent of (width * height * 3) in this field. It is easy enough to change the plugin to write the same value. Let me test this change and see how it goes...

--------------------
May the FOURCC be with you...
 
     Top
ale5000
Posted: Feb 20 2012, 02:38 PM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



QUOTE (fccHandler @ Feb 20 2012, 07:09 AM)
All of the frames remuxed from your corrupt files will have this key frame flag set, since they are missing the 'stts' atom as I explained before.

The file isn't corrupt, maybe it is just a bug of ffmpeg that didn't add the 'stts' while remuxing to mp4.
But still corrupt files may exist, so isn't a better option set only the first frame as keyframe in these cases?
It is safer to avoid creating broken videos while cutting in direct strem copy.

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
fccHandler
Posted: Feb 20 2012, 03:55 PM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



QUOTE
Sync sample atoms have an atom type of 'stss'. The sync sample atom contains a table of sample numbers. Each entry in the table identifies a sample that is a key frame for the media. If no sync sample atom exists, then all the samples are key frames.

It is perfectly valid to not have this atom if your movie contains only key frames, and I have seen examples of this. But that is not true of your VC-1 movies. You've lost the random access points and therefore corrupted these movies forever.

--------------------
May the FOURCC be with you...
 
     Top
ale5000
Posted: Feb 20 2012, 05:11 PM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



I thought it was required because it say it in "Adobe Flash Video File Format Specification" that are usually similar to MP4 specifications.
Can be added an extended option for "Do not treat all frames as key frames when 'stts' is missing"?

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
fccHandler
Posted: Feb 20 2012, 07:09 PM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



Sorry, I wrote 'stts' above when I actually meant 'stss'. To clarify, 'stts' is required but 'stss' is not. It is the same in Adobe Flash:

QUOTE
2.7.6.6 Sync Sample box

Box type: 'stss'
Container: Sample Table box ('stbl')
Mandatory: No
Quantity: One

The Sync Sample (stss) box specifies which samples within a sample table are sync samples. Sync samples are samples that are safe to seek to. If the track is a video track, sync samples are the keyframes or intraframes that do not rely on any data from any other frames.
If the Sample Table (stbl) box does not contain an stss box, all samples in the track shall be treated as sync samples.


QUOTE (ale5000 @ Feb 20 2012, 01:11 PM)
Can be added an extended option for "Do not treat all frames as key frames when 'stts' is missing"?

And... then what? Just make the first frame a key frame? If the movie is very long that would make things even worse. Anyhow I don't really want to play this game. The specs are very clear about the usage of this table and in my opinion there is no reason for such an option to exist.


--------------------
May the FOURCC be with you...
 
     Top
ale5000
Posted: Feb 20 2012, 09:15 PM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



Does it support the audio encoder delay in MP4 files?

Sample file (aac_encoder_delay_sample.m4a): http://www.mediafire.com/?apa6bfa23g428a8

Info:
https://www.bunkus.org/bugzilla/show_bug.cgi?id=715
https://github.com/mbunkus/mkvtoolnix/commi...ee056b2aad597a4

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
fccHandler
Posted: Feb 25 2012, 07:45 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



QUOTE (ale5000 @ Feb 20 2012, 05:15 PM)
Does it support the audio encoder delay in MP4 files?

No... And if we're talking about a "delay" which would affect audio/video sync, and you want me to fix it, then you should at least send me a sample to demonstrate the sync problem. Your sample is audio only, so obviously there is no audio/video desync; i.e., nothing there to fix.

My impression is, these delay atoms sound like they are poorly documented and not well supported. Even if I did want to support them, I don't see how it would be possible to implement, because the audio block reading (by the plugin) is wholly decoupled from the audio block decoding (by the codec). There is no defined way to pass the delay information from the plugin to the codec.

In other news, I have a rudimentary sort of error log working which will be in the next release, coming soon...


--------------------
May the FOURCC be with you...
 
     Top
fccHandler
Posted: Feb 26 2012, 05:24 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



QuickTime plugin version 2.4 is up:
http://fcchandler.home.comcast.net/Plugins/QuickTime

Non-fatal errors (such as an unsupported track) are now written to an internal log, and a button in File Information will appear whenever that log is not empty.

All FOURCCs presented to the VCM are uppercased now by default, with the exception of Cinepak ('cvid'). For some strange reason ffdshow-tryouts requires this one to be lowercase.

QUOTE (fccHandler @ Feb 20 2012, 02:09 AM)
1)  At offset 0x00000070, the original file has 'WVC1' while the other has 0x00000000.  This is the fccType field of the video AVIStreamHeader.

As it turns out, this was incorrect. The field in question is actually the fccHandler field, not the fccType field. (There is a bug in VirtualDub's hex editor which identifies it as 'fccType'.)

I thought I could populate the field by exposing the IVDXStreamSourceV3 interface and filling in the VDXStreamSourceInfoV3.mfccHandler field. However, this makes no difference that I can see. Maybe it is another VirtualDub bug?

How did you create the file "VC-1 original.avi"? I can see that you used VirtualDub-1.10.2-test2, but how did you import the .mov file?

Regarding Vorbis, at the moment I am not supporting it. I have seen three files now with Vorbis audio and each one uses a different Object Type ID. In fact I wonder if this is the so-called "private track ID" that we were talking about before...

Vorbis in AVI is pretty much a lost cause right now, as my experience with the Matroska plugin demonstrated. I think it could be made to work correctly if I was willing to put in the effort, but it's always been a low priority for me and I can't promise that I will ever get around to it.


--------------------
May the FOURCC be with you...
 
     Top
ale5000
Posted: Feb 28 2012, 03:01 AM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



QUOTE (fccHandler @ Feb 26 2012, 06:24 AM)
All FOURCCs presented to the VCM are uppercased now by default, with the exception of Cinepak ('cvid').  For some strange reason ffdshow-tryouts requires this one to be lowercase.
Unrecognized video formats aren't uppercased.

QUOTE (fccHandler @ Feb 26 2012, 06:24 AM)
How did you create the file "VC-1 original.avi"?  I can see that you used VirtualDub-1.10.2-test2, but how did you import the .mov file?
Now I don't remember exactly, but maybe it was remuxed starting from a mkv or a wmv file using your input plugins.
Then once the original avi is done I have remuxed it to mov with ffmpeg.
Then remuxed to avi again with VirtualDub.

QUOTE (fccHandler @ Feb 26 2012, 06:24 AM)
Regarding Vorbis, at the moment I am not supporting it.  I have seen three files now with Vorbis audio and each one uses a different Object Type ID.  In fact I wonder if this is the so-called "private track ID" that we were talking about before...

Vorbis in AVI is pretty much a lost cause right now, as my experience with the Matroska plugin demonstrated.  I think it could be made to work correctly if I was willing to put in the effort, but it's always been a low priority for me and I can't promise that I will ever get around to it.
The files that I have posted was created with ffmpeg.


PS: The crash with the Microsoft VC-1 decoder is fixed.

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
ale5000
Posted: Feb 28 2012, 04:41 PM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



Sample file (Fragmented MP4.zip - 25.7 MB): http://uploading.com/files/f18c1cmb/Fragme...nted%2BMP4.zip/

The fragmented mp4 is in the mp4 specs and it is used by IIS Smooth Streaming.
You can be sure it is a Fragmented MP4 because the file have a "mvex" box.
The file play in MPC-HC using the Nero MP4 splitter and also in mplayer.

Now your plugin only say: "Cannot parse Fragmented MP4.mp4".

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
ale5000
Posted: Feb 29 2012, 05:24 PM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



QUOTE (ale5000 @ Feb 20 2012, 02:15 AM)
Can you please show the "Elementary Stream Descriptor Object Type ID" in file informations for mp4a and mp4v?
Can you please show version and layer for mpeg audio in file informations?

Maybe the button can be renamed from "View Import Log..." to "Advanced Info..." and show non fatal errors and advanced info like the "Elementary Stream Descriptor Object Type ID", layer and version for mpeg audio and the GUID for the Wave Format Extensible.

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
fccHandler
Posted: Mar 3 2012, 02:04 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



QUOTE (ale5000 @ Feb 27 2012, 11:01 PM)
Unrecognized video formats aren't uppercased.

Yep, I will fix that in the next version.

QUOTE (ale5000 @ Feb 28 2012, 12:41 PM)
The fragmented mp4 is in the mp4 specs and it is used by IIS Smooth Streaming.

Thank you for the sample. I have examined it and read what the spec has to say about fragmented movies. Unfortunately, supporting these will involve a major rewrite of the plugin. I will add it to my TODO list but I can't promise that I will ever implement it.

QUOTE (ale5000 @ Feb 28 2012, 12:41 PM)
Maybe the button can be renamed from "View Import Log..." to "Advanced Info..."

Although the purpose of the log was only to reveal import errors, it could be useful for other esoteric info. I will think about it.

--------------------
May the FOURCC be with you...
 
     Top
her34
Posted: Mar 3 2012, 09:21 PM


Member


Group: Members
Posts: 14
Member No.: 21931
Joined: 16-August 07



QUOTE (fccHandler @ Mar 3 2012, 02:04 AM)
QUOTE (ale5000 @ Feb 28 2012, 12:41 PM)
The fragmented mp4 is in the mp4 specs and it is used by IIS Smooth Streaming.

Thank you for the sample. I have examined it and read what the spec has to say about fragmented movies. Unfortunately, supporting these will involve a major rewrite of the plugin. I will add it to my TODO list but I can't promise that I will ever implement it.

Out of curiosity would you mind explaining what they are doing to fragmented mp4's that make them different?

And why would that require a rewrite?



 
     Top
her34
Posted: Mar 3 2012, 09:32 PM


Member


Group: Members
Posts: 14
Member No.: 21931
Joined: 16-August 07



Thank you for great plugin.

I am using plugin to edit out parts of mp4 videos. The original mp4 plays fine in devices i have such as smartphones, tablets, etc. I use direct stream copy for audio and video.

The problem is that output is in avi container format. Is there a way to output to mp4 container?

If not directly output, then is there a safe program to remux the avi to mp4? By safe I mean the new mp4 won't have any problems playing in devices
 
     Top
fccHandler
Posted: Mar 4 2012, 05:03 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



You can't output to .mp4 with VirtualDub, it can only create .avi files. I'm sure there are tools out there that can create .mp4 files, but I've never used any myself so I can't advise you about that.

Regarding fragmented files, you may have noticed that the QuickTime plugin doesn't pop up a parsing dialog and movies seem to load instantly. The reason is that it only parses the 'moov' resource (which is usually pretty small), and it expects to find everything there that it needs to deliver the audio and video samples.

The problem with a fragmented file is that its 'moov' resource is only partially filled in; most of the needed fields and tables are empty. Instead, they are located elsewhere in the file and I will have to do a much deeper parse to build the tables dynamically. The current code is not equipped to handle this at all. It would definitely involve a whole lot of work to make this possible, maybe even a complete redesign of the plugin.


--------------------
May the FOURCC be with you...
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
148 replies since Aug 7 2011, 06:03 AM Track this topic | Email this topic | Print this topic
Pages: (10) « First ... 7 8 [9] 10 
<< Back to VirtualDub Filters and Filter Development