On 05/09/14 10:28, "Martin Storsjö" <[email protected]> wrote:
>Hi Mika,
>
>On Thu, 4 Sep 2014, Mika Raento wrote:
>
>> This is a non-standard file that maps the MSS segment names to offsets
>> in the ISMV file. This can be used to build a custom MSS streaming
>> server without splitting the ISMV into separate files.
>> ---
>> tools/ismindex.c | 118
>>++++++++++++++++++++++++++++++++++++++++++++-----------
>> 1 file changed, 96 insertions(+), 22 deletions(-)
>
>Thanks - this looked good, pushed (with one pair of extra braces
>removed).
>Some final/further comments below:
>
>> for (i = start_index; i < tracks->nb_tracks; i++) {
>> struct Track *track = tracks->tracks[i];
>> const char *type = track->is_video ? "video" : "audio";
>> snprintf(dirname, sizeof(dirname), "%sQualityLevels(%d)",
>>output_prefix, track->bitrate);
>> - mkdir(dirname, 0777);
>> + if (split) {
>> + if (mkdir(dirname, 0777) == -1 && errno != EEXIST) {
>
>Nice - why didn't I think of that before?
>
>> + ret = AVERROR(errno);
>> + perror(dirname);
>> + goto fail;
>> + }
>> + }
>> for (j = 0; j < track->chunks; j++) {
>> snprintf(filename, sizeof(filename),
>>"%s/Fragments(%s=%"PRId64")",
>> dirname, type, track->offsets[j].time);
>> avio_seek(in, track->offsets[j].offset, SEEK_SET);
>> - write_fragment(filename, in);
>> + if (ismf)
>> + fprintf(out, "%s %"PRId64, filename, avio_tell(in));
>> + if (split)
>> + fragment_ret = write_fragment(filename, in);
>> + else
>> + fragment_ret = skip_fragment(in);
>> + if (ismf)
>> + fprintf(out, " %"PRId64"\n", avio_tell(in));
>
>Now when I finally tested this, I noticed that you don't write the source
>filename into the ismf file. If you only use one single ismv source file
>that's obviously ok, but technically you could also have multiple
>ismv/isma files (e.g. with one track each - that's how some samples I saw
>seemed to do it), and then you're missing the mapping explaining which
>file the byte offsets relate to. Would you be interested in adding the
>source file name into the ismf index as well?
>
>// Martin
>
I wouldn't mind adding the source file, but have to admit it won't be a
high priority as we always use a single .ismv input and I need to then
change the streaming code too. Give me a couple of weeks?
Mika
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel