[Matroska-devel] Matroska-devel Digest, Vol 83, Issue 4
Shashank Tulsyan
shashaanktulsyan at gmail.com
Fri Mar 12 19:30:07 CET 2010
Hey,
On Friday 12 March 2010 16:33:38 Shashank Tulsyan wrote:
>>/ In AVVVAVVV ..
/>>/ Let's say I am in some A part. I move forward and now i am V part.
/>>/ So what you are telling is i can't i know the length of this V part
/>>/ without reading this entire V part?
/>>/ I expected a vint to be present as the first thing in V block, that tell
/>>/ the size of the block.
/>
> No, that's actually the case. Each EBML element starts with an ID and
> its size. The size is always the size including all of the element's
> children -- e.g. a cluster's size also covers all of the blocks inside
> that cluster.ch
>
> What I meant was that there is no index pointing exactly to each and
> every audio/video/subtitle track. There's only an index pointing to the
> clusters.
>
> Regards,
> Mosu
Sorry for not being clear, but what you are saying is exactly what I understood.
Okay suppose I got a cluster, it has audio video interlaced.
What I understood is that I cannot know how much of this cluster is what without reading the entire cluster.
What I want to know why is it.
I normal situation if i have to distinguish between to blocks of data i would either use length or a signature (like HTTP does).
But signature consumes a lot of space. So I can only think the way to distinguish must be lenght.
But if it's length it must be located at start and then it would be easy to skip, but you also said that lenght is not specified explicitly (for blocks that is).
So I suppose that the method to know the length is specific to the codec of the audio/video taken into consideration.
How does mkvtoolnix understand and extract tracks ?
In case my question seems very n00bish and I seem to be wasting ur time, please point me to a guide/link which i should read before asking further questions.
I really want my software to have the feature (indirectly that is) to download only audio from mkv files (or mayb e video, although it wouldn't save much MBs)
Why?
Because let's say I have two files :
1) Some movie with gr8 quality video but foreign language audio with subs
2) Same movie dubbed with crappy quality video
How I imagine it to be is.
User makes an avisynth script, using some simple/intutive graphical utility, which gives something like
----------------
video=DirectShowSource("..link to the virtual file1...",audio=false)
audio=DirectShowSource("..link to the virtual file2...",video=false)
//assuming both files to be synchronized
AudioDub(video,audio)
------------------
Where I already have a decent demuxer for the source which has the capability of exclusively
requesting only audio/video portion as required.
Such that the net download in between size of one file and size of both file together.
BTW, avisynth files can be mounted, using AVFS (not made by me, but we share the same core). That is they'll change into folder, and inside will
be a virtual avi file, uncompressed, therefore taking insane amount of space ( like a 200MB video becomes 13GB when mounted as a avs file. But no
worry as it does not consume hdd space as it is virtual).
This allows file to be played even by players that don't support directshow.
Avisynth3 is cross platform, my virtual filesystem will very soon should be able to run on mac and linux as well.
There are others things that can be done using this.
I call these files, abstract, because their content and length are unpredictable, consume dynamic and content can be function of request offset. (that is arriving
at the same fileoffset starting from different offset gives different results, ) and in general would be output of a program.
The applications are immense.
Like, users open a 100TB abstract file. Today he sees a movie in it, tomorrow the same thing shows a football match.
Combining server side and avisynth, ads could be injected into videos based on good yield management strategy .... so on .... (although i don't really like the idea of ads being injected)
Bascially my downloader, allows files to be not only HTTP links, but bittorrent as well, rapidshare will also work,
even files inside RAR would work.
I am sure you might not be knowing this, but it is possible to seek inside archives, if some of index is available (indexing done
and shared by someone who has the entire file).
The downloader part I made is just for analysis and testing.
The actual downloader is JDownloader. Which has the cabability of automatically entering captchas in sites
like megaupload (has an inbuilt OCR developed by my freind), and also can reboot router (scripts for many routers already
a part of the standard distribution).
This all basically allows average Joe, with no money to buy big servers for hosting, to start his own entertainment channel.
With video quality far beyond flv, because it can anything h264 or rv40 or maybe xvid ..., variable frame rate ... etc
all that which is not possible in flv because it is crap in name of a container.
Besides most good quality videos available don't include flv.
In case you'd like to check if all this is real :
http://sourceforge.net/apps/mediawiki/jpfm/index.php?title=Monitoredfs<<<< Seeking in archives
http://neembuu.sourceforge.net/wiki/index.php/File_abstraction_example<<<< Abstract Files and avisynth file system
I had discussed with many people about possibility of extracting RAR archives from middle.
Most people thought there could be no way...
but then WinMount3 did it ( $$ware )
The developer of ZipArchive library (not pkzip, this is a c++ based lib. for zip) is working on a free alternative to this.
Seeking in RAR is possible (although it requires an external index file, which is like 500KB for a 700MB RAR).
So there is no reason for extracting audio (without requesting video portion) from containers (which are
designed specifically for containing these) to be unavailable.
If everything fails as I said, i would like to index/map the regions.
I can save this in a file, it is usually very small, when data is saved as vint and compressed.
And this works in AVI. I has uploaded an attachment of the pattern I obtained while extracting audio
from an avi file, i don't know if you had a look. It had ~50,000 unique requests in 200MB. Saving
this index info takes ~9KB, which is pretty great. And BTW i used mkvtoolnix for demuxing.
Another really important thing.
I would like to really thank matroska developers for making mkv.
It is really way better than avi, and it is very suited for my "Watch as you donwload" feature.
For example check this, this shows request pattern on various types of containers :
(a little forwarding was done on the mkv and rmvb file, but not on avi. avi seems to require far spaces 15 regions just to start (may be fault of the specific file or VLC) )
http://neembuu.sourceforge.net/wiki/index.php/File:Request_pattern_of_vlc_on_different_types_of_videos.png
Thanks the above ^^ wouldn't have been possible without mkv container. (RMVB is also good for watch as you download, but featurewise .. mkv is obviously better)
Regards
Shashank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20100313/81ad43a4/attachment.html>
More information about the Matroska-devel
mailing list