Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th May 2011, 19:16   #1  |  Link
ipanema
Registered User
 
Join Date: Apr 2009
Posts: 93
Inserting SEI

I'm thinking of adding a user-defined SEI to existing H.264/MTS files. It should be possible by inserting occasional MTS packets to hold the inserted data, and any existing data that would need to be moved to make room for the inserted data.

But this would progressively shift existing packets forward in the file.

Would this be likely to break any indexes that might be present in the other files that are present in the Blu-ray and AVCHD folder structure?

Or is there a better method of inserting data int existing H.264/MTS files?
ipanema is offline   Reply With Quote
Old 6th May 2011, 19:18   #2  |  Link
kieranrk
Registered User
 
Join Date: Jun 2009
Location: London, United Kingdom
Posts: 707
It would break the VBV. It would also be pretty unlikely that you'd find a TS packet on exactly the right boundary to insert an SEI.
kieranrk is offline   Reply With Quote
Old 6th May 2011, 19:28   #3  |  Link
ipanema
Registered User
 
Join Date: Apr 2009
Posts: 93
Thanks for the quick response. I expected it would be problematic. In theory I think it should be possible to insert data with byte accuracy by resizing the preceding packet payload size, and moving the rest of the data into the inserted packet after the new data.

Is there any way to insert data without breaking anything?

I just noticed that tsmuxer seems to have a feature which inserts SEIs to existing files but I haven't looked at how it does this, or whether it ignores any indexing problems that may be caused by this.
ipanema is offline   Reply With Quote
Old 6th May 2011, 20:08   #4  |  Link
kieranrk
Registered User
 
Join Date: Jun 2009
Location: London, United Kingdom
Posts: 707
Yes, you can extract the PES, add your SEI and put the PES back into TS packets.
kieranrk is offline   Reply With Quote
Old 7th May 2011, 12:52   #5  |  Link
ipanema
Registered User
 
Join Date: Apr 2009
Posts: 93
Quote:
you can extract the PES, add your SEI and put the PES back into TS packets.
If I did that would it upset the integrity of the video stream at all - you mentioned breaking the VBV for example? (I guess the bitrate of the video stream would be very slightly greater.)

As regards any indexes that may be present in other auxilliary Blu-ray/AVCHD files, I'm assuming that any repackaging of the PES packets would break these indexes.
ipanema is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.