Coder Social home page Coder Social logo

Add a muxer about go-astits HOT 13 CLOSED

sjpotter avatar sjpotter commented on June 26, 2024
Add a muxer

from go-astits.

Comments (13)

barbashov avatar barbashov commented on June 26, 2024 2

@barbashov care to share more? I'm not too worried about the crypto (if I understand what data needs to be decoded) but I'm not sure how to rebuild the stream without a muxer.

I've written a muxer :) It's under review currently, but already useful #16

from go-astits.

asticode avatar asticode commented on June 26, 2024 1

I don't think anybody is working on this, go for it! ❤️

Try to reuse as much code as possible in this lib, create the least amount of new .go files and export the simplest and smallest API would be my points of emphasis.

from go-astits.

asticode avatar asticode commented on June 26, 2024

you're definitely right, it would mean adding a muxer.

if you feel like contributing, I'm welcoming PRs

from go-astits.

ivanjaros avatar ivanjaros commented on June 26, 2024

you could use https://github.com/nareix/joy4/tree/master/format/ts, since it is not maintained, it would be nice to have some up-to-date library..even if it is only for ts.

from go-astits.

BRUHItsABunny avatar BRUHItsABunny commented on June 26, 2024

I'm currently doing some preliminary research to make a TS muxer to mux small TS files into 1 big TS file. Anyone else working on this or might I be the one to issue a PR?

from go-astits.

mattetti avatar mattetti commented on June 26, 2024

I'm playing with sample-aes encrypted hls streams that I'd like to demux, decode and remux. If this package were to offer a muxer, it would really make it close to complete. I understand nobody's really working on it at this moment and I'm afraid my TS knowledge is too limited but contribute but if maybe if a few of us work together we can get something working decently rapidely.

from go-astits.

BRUHItsABunny avatar BRUHItsABunny commented on June 26, 2024

Sorry I completely forgot about this. I'm probably not going to be working this until I get settled into my new job.

from go-astits.

barbashov avatar barbashov commented on June 26, 2024

I'm playing with sample-aes encrypted hls streams that I'd like to demux, decode and remux. If this package were to offer a muxer, it would really make it close to complete.

Well you can do this now. You got to handle decoding yourself though. But it's not hard since go std lib offers good crypto API. Just be aware of PKCS7 padding, that one costed me a bunch of grey hairs :)

from go-astits.

mattetti avatar mattetti commented on June 26, 2024

@barbashov care to share more? I'm not too worried about the crypto (if I understand what data needs to be decoded) but I'm not sure how to rebuild the stream without a muxer.

from go-astits.

barbashov avatar barbashov commented on June 26, 2024

@asticode you may want to close that one as well

from go-astits.

asticode avatar asticode commented on June 26, 2024

Thanks to @barbashov 's great work, this lib now has a muxer ❤️

Closing this issue

from go-astits.

mattetti avatar mattetti commented on June 26, 2024

I'm playing with sample-aes encrypted hls streams that I'd like to demux, decode and remux. If this package were to offer a muxer, it would really make it close to complete.

Well you can do this now. You got to handle decoding yourself though. But it's not hard since go std lib offers good crypto API. Just be aware of PKCS7 padding, that one costed me a bunch of grey hairs :)

Thanks @barbashov , I wrote the aes-128 crypto (CBC/PKCS7) code needed to decode the entire files but sample-aes is a bit more tricky since it requires also understanding the transport protocol (only only part of the data is encrypted).

My understanding is that I need to do something similar to your what you have here:
https://github.com/asticode/go-astits/blob/master/cmd/astits-es-split/main.go#L107

That would give me access to the partially encrypted data, then decrypt the data and remux the file by adding the decrypted PES to the new stream. Does that seem right or do I need to copy/add more data to my decrypted stream?

from go-astits.

barbashov avatar barbashov commented on June 26, 2024

I'm playing with sample-aes encrypted hls streams that I'd like to demux, decode and remux. If this package were to offer a muxer, it would really make it close to complete.

Well you can do this now. You got to handle decoding yourself though. But it's not hard since go std lib offers good crypto API. Just be aware of PKCS7 padding, that one costed me a bunch of grey hairs :)

Thanks @barbashov , I wrote the aes-128 crypto (CBC/PKCS7) code needed to decode the entire files but sample-aes is a bit more tricky since it requires also understanding the transport protocol (only only part of the data is encrypted).

My understanding is that I need to do something similar to your what you have here:
https://github.com/asticode/go-astits/blob/master/cmd/astits-es-split/main.go#L107

That would give me access to the partially encrypted data, then decrypt the data and remux the file by adding the decrypted PES to the new stream. Does that seem right or do I need to copy/add more data to my decrypted stream?

I don't really know how to help you since I haven't implemented SAMPLE-AES at this point in my software.
Though as far as i know, SAMPLE-AES doesn't encrypt the whole packet, it encrypts just the payload. If that's right, what you need to do is to decrypt only the payload. Anyway, I would follow HLS RFC here.

from go-astits.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.