-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ciao a tutti. Mi domandavo se ci sono sviluppi per lo smooth streaming su Linux. Sto facendo qualche prova con il live streaming e il downloader scritto in Bash sembra funzioni bene. Ma poi, oltre a riasemblare i vari frammenti video con una cat dentro un file con estensione vc1, come mi ha suggerito Lufuscu, li mi sono fermato. Ho pero' visto che un gruppo ungherese (dvb-crew) ha scritto in .NET un programmino che, portroppo solo su win, scarica e ricompone il flusso smooth streaming pertendo da un manifest. L'ho testato e funziona. http://dvb- crew.atw.hu/applications/ismdownloader/ismdownloader2.zip Ho scritto al gruppo e mi hanno spiegato che, secondo loro, e' semplice ricostruire il flusso una volta scaricati i vari frammenti. Vi posto la loro risposta:
Hi! It is very simple, u should index each sample in the chunks using the trun box (it contains the duration and the size of each sample), that means u should store the path of the container file, the offset of the first byte and the length of the sample, the start timecode of the sample, and the duration of the sample. Global timecode of a sample: u need the start_time=xxx value, and just add the durations values in the trun box. Example: int length = (int)tfhd.default_sample_size; uint duration = tfhd.default_sample_duration; for (int j = 0; j < trun.sample_count; j++) { if (tfhd.default_sample_size == 0) length = (int)trun.array[j].sample_size; if (tfhd.default_sample_duration == 0) duration = trun.array[j].sample_duration; if (j == 0 || type == MediaStreamType.Audio) is_keyframe = true; else is_keyframe = false; samples.Add(new MediaSample(path, offset, length, starttime / 10000, duration / 10000, is_keyframe)); starttime += duration; offset += length; } MediaSample is my own format to store the informations about the samples: public class MediaSample { public string Path { get; set; } public long Offset { get; set; } public int Length { get; set; } public ulong StartTime { get; set; } public ulong EndTime { get; set; } public uint Duration { get; set; } public bool IsKeyFrame { get; set; } } Choose a media container format which supports VC-1, WMA, H264 and AAC, reconstruct the header using the informations of the manifest, and mux the samples into the file then. (Each container format has a different methode, how to mux the samples). Io non sono un programmer. Qualcuno ha idea di come utilizzare questo pezzo di codice per iniziare la ricostruzione dei frammenti scaricati? Ciao a tutti -----BEGIN PGP SIGNATURE----- Charset: UTF8 Version: Hush 3.0 Note: This signature can be verified at https://www.hushtools.com/verify wpwEAQMCAAYFAk0IqdcACgkQ1EjLxG8g4RkTdgP/eeiqd1/ZFEMo3KA/I3t1a/bXALcj bCRgrKxalh+JO4ib/XB1pkhnalAr9arVXsF4NPttpovN7ZrPd3eXwZ3Eq3NylsnZyiOA /Vew8aOCpdwyrT29WbO7FXKS+Hg3qaqhrgmyN4ZjMOcxjeFb0PVCYqwyVGHJyUpml0c6 Cdnoc7U= =qShV -----END PGP SIGNATURE----- _______________________________________________ Mailing list: https://launchpad.net/~olrait Post to : olrait@lists.launchpad.net Unsubscribe : https://launchpad.net/~olrait More help : https://help.launchpad.net/ListHelp