Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6545715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:37:12+00:00 2026-05-25T11:37:12+00:00

I’m looking for advice and whether what I want to do is possible. I’ve

  • 0

I’m looking for advice and whether what I want to do is possible.

I’ve been ask to create something similar to ID3 mp3 tags that can be used with MPEG 2/MPEG-TS video files. Because I’m a crude individual, I was thinking of just dumping some sort of XML structure within the file itself. However, this causes problems with applications trying to decode/play the video file as the app is not expecting XML/ASCII data in the file.

I’m not sure whether it is possible to have some sort of END OF FILE ‘command’ that can be amended to the end of MPEG files, and I can dump my XML after that part.

Compatibility wise, I only need avoid the video file from ‘breaking’ any commercial app that is reading it. The tag information will be parsed by an application I have yet to write.

Any ideas? Or is what I’m suggesting impossible?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:37:13+00:00Added an answer on May 25, 2026 at 11:37 am

    Any program that is decoding an MPEG2-TS file will be looking for a 188 byte packet over and over again. If you look at the hex, you will see a 0x47 byte, which is the sync byte (also first byte) of every packet every 188 bytes. That is why adding XML data to the file will screw up any decoders.

    What you could do is add your own packets, or hijack the null-PID packets typically at the start of an MPEG2-TS file. Unfortunately, to do this properly, you would likely want this data to be in a Network Information Table, which may not already exist. This means you may have to add a reference to the NIT in the PMT. All requiring advanced knowledge and parsing/writing capability of the transport stream.

    You might be able to get away with adding packets at the start of the file without having to adjust clock references. Or just hijack the existing null-PID packets (no clock reference changes needed). Then in your new packets use a packet ID that probably won’t be used like 8190. Doing this without modifying the PMT to reference a NIT would not be a completely valid MPEG2-TS because of the unreferenced PID, but would probably still work in most commercial decoders.

    A lot of this is not making sense I’m sure, because you are just trying to add some tag info and not familiar with MPEG2-TS. But the standard that defines the exact format is ISO/IEC 13818-1. Beware this is pretty heavy reading. If you want to go lighter (and cheaper), you might be able to get away with just wikipedia.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.