asticode / go-astits

Demux and mux MPEG Transport Streams (.ts) natively in GO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

split into files

ramyak-mehra opened this issue · comments

Hey, thanks for this great package, I was building sort of a replacement for mediafilesegmenter which is a very apple specific thing.
I was successfully able to inject ID3 data into the stream, I was wondering if there is a way to split the files based on duration too. I saw the packets has a field called RandomAccessIndicator which we can sort of use, but is there a way to somehow calculate time too based on this.

I tried segmenting the file using ffmpeg but it did not do it properly the ID3 data was just everywhere.

Also if I do use, RandomAccessIndicator for my file I get every 250th packet as an I-frame confirmed via ffmpeg too.
How would I split a stream based on just this info.

Would I just add these packets, into n new mixer directly and it would generate the tables and all that. Or should I first grab the elementary stream add them, write the table and then grab the individual packets.

Thanks!