Skip to content

Conversation

@phsm
Copy link

@phsm phsm commented Jan 10, 2018

Seems that small fix helps to read mpegts files.

How to reproduce the bug it seems to fix:

  1. Pick any videofile in any format (I used mkv with h264 codec stream)
  2. Convert it into mpegts:
    ffmpeg -i video.mkv -codec copy -f mpegts video.ts
  3. Use the following code to check
package main

import (
    "github.com/nareix/joy4/format/ts"
    "os"
    "log"
)

func main() {
    file, err := os.Open("/home/user/video.ts")
    if err != nil {
        log.Fatalln(err)
    }
    demux := ts.NewDemuxer(file)
    
    streams, err := demux.Streams()
    if err != nil {
        fmt.Printf("error getting streams: %s\n", err)
        os.Exit(1)
    }
}

It should throw an error: "error getting streams: invalid PMT"

@phsm phsm changed the title Update tsio.go Bug in reading TS files Jan 10, 2018
@argon338
Copy link

Thnx bro my ass was on fire.

@phsm
Copy link
Author

phsm commented Jan 29, 2022

Thnx bro my ass was on fire.

I'd advise you to refrain from using this software anyway, as it seems to be an abandonware.
You can take a look at OvenMediaEngine instead

@argon338
Copy link

Thnx bro my ass was on fire.

I'd advise you to refrain from using this software anyway, as it seems to be an abandonware. You can take a look at OvenMediaEngine instead

Thanks a lot for your advice. But I'm on another side of service. I need to read flv and ts to decompose packets and gather statistics for our service purpose. So I'm kind a client.
Using joy4 I can decompose both formats using one module.
If you know another ways I will be thankful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants