[FFmpeg-devel] [PATCH v11] avformat: add demuxer for Pro Pinball Series' Soundbanks
Michael Niedermayer
michael at niedermayer.cc
Sun May 3 20:10:51 EEST 2020
On Sun, May 03, 2020 at 01:43:24PM +0000, Zane van Iperen wrote:
> On Sun, 3 May 2020 15:23:19 +0200
> "Michael Niedermayer" <michael at niedermayer.cc> wrote:
>
> > On Fri, May 01, 2020 at 12:55:18AM +0000, Zane van Iperen wrote:
> > > On Fri, 01 May 2020 00:36:57 +0000
> > > "Zane van Iperen" <zane at zanevaniperen.com> wrote:
> > >
> > > > On Fri, 1 May 2020 01:09:17 +0200
> > > > "Michael Niedermayer" <michael at niedermayer.cc> wrote:
> > > >
> > > > > > + size = FFMIN(trk->data_size - ctx->bytes_read,
> > > > > > PP_BNK_MAX_READ_SIZE); +
> > > > > > + if ((ret = av_get_packet(s->pb, pkt, size)) < 0)
> > > > > > + return ret;
> > > > > > +
> > > > > > + ctx->bytes_read += ret;
> > > > > > + pkt->flags &= ~AV_PKT_FLAG_CORRUPT;
> > > > > > + pkt->stream_index = ctx->current_track;
> > > > > > + pkt->duration = ret * 2;
> > > > >
> > > > > With this each stream would be returned completely before the
> > > > > next such non interleaved output is a bit odd.
> > > > >
> > > >
> > > > Yep, it's an odd format. Some files are meant to be stereo, but I
> > > > can't present them as such. I have to present them as separate
> > > > mono streams and merge them with a filter.
> > > >
> > > > > also where can i find such a file ?
> > > > >
> > > >
> > > > Here's a file I trimmed for FATE:
> > > >
> > > > https://0x0.st/ie7O.11c
> > > >
> > > Probably should have mentioned that first file is meant to be stereo
> > > music.
> > >
> > > Here's one that's meant to be just a bunch of mono tracks:
> > > https://0x0.st/ie74.5C
> >
> > just tried, and as expected this doesnt work
> >
> > ./ffmpeg -i pinball/ie74.5C -map 0 test.nut
> > ...
> > Press [q] to stop, [?] for help
> > Too many packets buffered for output stream 0:1.
> > [libvorbis @ 0x557f49f3da40] 16 frames left in the queue on closing
> > [libvorbis @ 0x557f49f3f340] 14 frames left in the queue on closing
> > Conversion failed!
> >
>
> Interesting... that worked for me :/
>
> ./ffmpeg -y -i pp/ie74.5C -map 0 test.nut
> ...
> [nut @ 0x55615988d700] Multiple keyframes with same PTS
> Last message repeated 5 times
> size= 632kB time=00:00:06.37 bitrate= 812.2kbits/s speed=59.8x
> video:0kB audio:630kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.366753%
Interresting, but the problem with 100% uninterleaved streams remains
applications will have issues with this, and the more the longer these are
>
>
> This isn't a valid use case for this file format regardless, as they're soundbanks.
Well, if -map 0 is not a valid use case then how would you
convert such a pinball file to a new pinball file ?
(maybe with some audio filter adding echo or whatever)
Theres no muxer currently but if there was one that seems a valid use
case to me
> Each stream should be split into a separate file, and it's almost guaranteed that they're all different lengths.
>
> If this is required, then I'm not sure of the best course of action is.
iam also not sure but maybe looking at what exists could lead to some
inspiration
audio streams with concatenated songs, chapters, slide shows, mpeg ts which
stores several independant programms, ...
> Unless I constantly seek back and forth in the file, but that seems messy...
streams can be set to AVDISCARD_ALL when they are unneeded. So at least this
should not happen when parts are unused. Still not sure thats a solution
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200503/dc22026b/attachment.sig>
More information about the ffmpeg-devel
mailing list