Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support scte-35 parsing #10

Open
flavioribeiro opened this issue Nov 14, 2022 · 7 comments
Open

support scte-35 parsing #10

flavioribeiro opened this issue Nov 14, 2022 · 7 comments
Labels

Comments

@flavioribeiro
Copy link
Owner

suggested by @tretelny.

Need to check with @futzu if we could use his lib.

@flavioribeiro
Copy link
Owner Author

@flavioribeiro flavioribeiro added the enhancement New feature or request label Nov 14, 2022
@flavioribeiro
Copy link
Owner Author

@futzu
Copy link

futzu commented Nov 14, 2022

Flavio,
of course.
If I can do anything to help, just let me know.

@futzu
Copy link

futzu commented Nov 14, 2022

I see you already have asitis parsing the stream, all you really would have to do is make a cuei.Cue instance and pass it the payload from a SCTE-35 packet like this

import 
	"github.com/futzu/cuei"


var cue cuei.Cue
cue.Decode(payload)

Then you can access whatever you need with dot notation like
cue.Command.PTS

cue.Show() will print the Cue in JSON

cue.Show()
type Cue struct {
	InfoSection
	Command     SpliceCommand
	Descriptors []SpliceDescriptor `json:",omitempty"`
	Packet      *PacketData        `json:",omitempty"`
}

All the SCTE35 Splice Commands (Splice Insert, Time Signal etc) are consolidated into the SpliceCommand struct
and all the Descriptors are consolidated into SpliceDescriptor. No interfaces needed. it makes it much easier to get to vars in the struct.

@futzu
Copy link

futzu commented Nov 15, 2022

I put some examples up.

@flavioribeiro flavioribeiro added feature and removed enhancement New feature or request labels Nov 16, 2022
@flavioribeiro
Copy link
Owner Author

thanks, @futzu !

@futzu
Copy link

futzu commented Dec 3, 2022

I was looking at how you were doing things with the close captions, and I added something similar.

https://github.com/futzu/cuei#use-cuei-with-another-mpegts-stream-parser--demuxer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants