Hello,
I have a settop box type "Imperial HD 3k" for the reception of cable TV.
This device can record and play back TV transmissions.
The file system is FAT32. Long videos are therefore split into several 4GB files.
If I want to make the box replay external videos, I have to adapt those accordingly.
One peculiarity of the box is that these files have to contain a specific number of packets which gives them a size shortly below the 4GB limit.
Therefore I cannot use existing tools for the division, but have to program it myself.
When I do it the "simple" way, just cutting at the desired number of packets, the starting pictures of the next file are slightly destorted.
I believe that this is due to cutting in the middle of a picture frame.
My questions:
1. does the start of a frame correspond with the start of a packet?
2. if so, how is that packet marked?
3. are there other aspects to be considered when splitting TS-files?
Cheers,
kyriako41.
+ Reply to Thread
Results 1 to 7 of 7
-
-
I believe that this is due to cutting in the middle of a picture frame.
does the start of a frame correspond with the start of a packet?
if so, how is that packet marked?
One peculiarity of the box is that these files have to contain a specific number of packets
are there other aspects to be considered when splitting TS-files?
Cu Selur -
Hello Selur,
thank you for the hints.
It is true that the requirement of a special number of packets(in a 4GB file) is strange.
Originally I just devided a big file in about equal parts. But the video would stop at the end of the first file.
Only with the right number of packets, the second part would start.
Can you give me a hint on how the start of a frame may be marked inside the content of a packet?
Cheers,
kyriako41 -
for h.264 raw streams the NAL units have a hex start code of: 00 00 01 X Y
with:
X = IDR Picture NAL Units (25, 45, 65)
X = Non IDR Picture NAL Units (01, 21, 41, 61) ; 01 = b-frames, 41 = p-frames
and remember frames are often splitted over multiple NAL Units.
Since you didn't mention it: did you try to simply load your source into tsMuxeR, activate it's split function (setting it to 4GB), then save the new files and feed them to your device? -
Hello Selur,
for h.264 raw streams the NAL units have a hex start code of: 00 00 01 X Y
with:
X = IDR Picture NAL Units (25, 45, 65)
X = Non IDR Picture NAL Units (01, 21, 41, 61) ; 01 = b-frames, 41 = p-frames
and remember frames are often splitted over multiple NAL Units.
Since you didn't mention it: did you try to simply load your source into tsMuxeR, activate it's split function (setting it to 4GB), then save the new files and feed them to your device?
Cheers,
kyriako41. -
Do you have any information about MPEG-2-streams?
-
Hello Selur,
Thank you for the information.
I solved the cutting problem in a practical way:
assuming that the video-PID is 0x25A, the header of a video packet looks like this:
47 02 5A xx
There exist, however, packets with the same PID, marked in the second byte:
47 E2 5A xx
As far as I know, these are the PCR(program clock reference) packets.
Expecting that these packets are inserted only after a complete frame, I cut the file just in front of this packet.
It works fine, although I could not test it thoroughly so far.
To whom it may concern:
you can download my converting tool here:
http://home.arcor.de/guentermeinel/cx70/TS_Test.zip
Cheers,
kyriako41.
Similar Threads
-
MTS files merged by tsMuxeR can't be play correctly
By SmilingSun in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 2Last Post: 15th Apr 2013, 20:35 -
Split mkv file no playing correctly
By mchild in forum Newbie / General discussionsReplies: 6Last Post: 28th Mar 2013, 09:02 -
.avi files that won't work correctly!
By RolloSwe in forum MacReplies: 10Last Post: 24th Feb 2011, 10:45 -
.avi files that won't work correctly!
By RolloSwe in forum Newbie / General discussionsReplies: 8Last Post: 17th Feb 2011, 16:41 -
How to join vob files -CORRECTLY!
By mcfcguvnors in forum EditingReplies: 18Last Post: 17th Jul 2009, 08:38