5

Is there any way to insert User Data (Start code = 0X1B2) in a MPEG stream? What I am looking for is a simple tool, script or some tips using and Hex Editor...

Or you may have a patch for ffmpeg (libavcodec and libavformat) that allows to do that?

Rais Alam
  • 6,970
  • 12
  • 53
  • 84
hzrari
  • 1,803
  • 1
  • 15
  • 26

1 Answers1

-2

If you're going to insert user data into a Transport Stream, the easiest solution is when it is in a PID of its own not overlapping with any of the existing PIDs in the stream - where you need not worry about adjusting the continuity counter of the original stream packets following the insertion points.

But it is really impossible to make assumptions about what PIDs you can expect in a TS stream, and if you're trying to generalize it - you would need to take care of adjusting the continuity counter in the TS header for packets of the same PID.

Tuxdude
  • 47,485
  • 15
  • 109
  • 110
  • Thanks, but I am looking for a tool to do that? – hzrari Dec 10 '12 at 14:26
  • 2
    This answer is quite disconnected with the question. User Data with start code 0x000001B2 are inserted directly into the video Elementary Stream, and are completely independent from PID and Transport Stream. I am too looking for an answer for this question. – lvella Nov 28 '16 at 17:16