Skip to content

Save audio and video tracks from rtsp to .ts files #230

Answered by aler9
jackovka asked this question in Questions
Discussion options

You must be logged in to vote

Hello, a full MPEG-TS muxer is available in mediacommon:
https://github.com/bluenviron/mediacommon/blob/main/pkg/formats/mpegts/writer.go

In particular:

  • MPEG4-audio units must be wrapped inside ADTS packets
  • you have to subtract initial audio DTS from audio DTS such that the first audio packet has DTS = 0
  • you have to subtract initial video DTS from video DTS and video PTS such that the first video packet has PTS = DTS = 0

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by jackovka
Comment options

You must be logged in to vote
1 reply
@aler9
Comment options

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