Log in

View Full Version : Converting to HDV complient transport stream


trevorharris
12th January 2007, 11:49
I have been able to capture hdv transport streams from my Sony HC1 using
capdvhs. I then repair these using mpeg2repair which makes the non hdv
complient. I have found very little info on the net about hdv streams but
I have discovered the following streams using tsreaderlite.

Pid
0x0 PAT
0x1f PMT Network
0x81 PMT Program 100
0x810 ES (video)
0x814 ES (audio)
0x811 ES (Private data)
0x815 ES (Private data)
0x134 PCR

A normal transport stream as produced by mpegrepair and other ts
programs has

Pid
0x0 PAT
0x10 PMT Program 1
0x11 ES (video)
0x14 ES (audio)
0x11 PCR

I have written a program to try and convert the normal stream to hdv
stream but it does not record properly on my hc1.

Does any one know of a program which will convert standard mpeg2 ts streams
to hdv streams without rendering the video?. Most things I have tried re render
the video with a loss in quality.

I am not sure what the 0x811 and 0x815 streams are. They may be auxillary
video or audio?

Often the PCR data is embeded in the video stream but hdv has a seperate
stream. I know the format of the packets but I am not sure what values I
should use. The format is detailed in the iso13818-1 spec which I found
on the net.

If anyone has any details of the HDV spec I would be grateful for the info.

I know this is fairly technical are there any other forums I could post this
to.

Thanks

SeeMoreDigital
12th January 2007, 12:14
You might find more detailed information about these streams in some of DrMPEG's (Ron's) post: -

http://forum.doom9.org/member.php?u=25213

By-the-way. I can confirm, once these HDV .M2T streams are run thru' MPEG2Repair, it's possible to play them in "hardware players/devices" fitted with Sigma EM8620L chip-set.

jongov
12th January 2007, 21:47
Hi,
I don't have a HDV convert program, but I can help you understand these streams.

HDV is a standard MPEG-2 transport stream with 25 Mb/s bitrate.

Transport stream is composed from packets, each with length 188 bytes (or 204 bytes).
Each packet has its PID (Packet ID).

PAT(Program Association Table) is a packet with PID = 0, which contains information about the programs included in the stream - PIDs of all PMTs(Program Map Table).

Each program has its PMT(Program Map Table), which describes the program
PID streams - audio (PES stream), video (PES stream), clock.

You can try my MPEG TS Utils application - I'm sure it will help you in your research.

You can download it from here:
http://tsviatko.jongov.com/index_prj_mpegtsutils.htm

Regards,
Tsviatko Jongov
http://tsviatko.jongov.com

trevorharris
13th January 2007, 16:33
Thanks for your reply. Your utility is very good.

My main concern is there are 2 private data streams 0x811 and 0x815. My HC1 will work without an 0x815 stream but does need 0x815.

The 0x811 stream has a stream id of 0xbf and has a length 0f 115 bytes.

The 0x815 stream also has a stream id of 0xbf and has a length of 17 bytes.

The packet_code_start_bit is set on every packet and the adaptaion field is used stuff the rest of the packets.

I understand that it costs $800 to get the HDV spec which is very expensive.

Regards

pwimmer
9th May 2007, 22:19
PID 0x811 is the Video Aux stream. I discovered the meaning of a few bytes on the HC3. I don't know if the offsets will change with other HDV camcorders.

Offset 0-5: Header (0xBF=Private Stream 2, 0x0073=Length)
Offset 16-20: PTC
Offset 37: Timecode frames as BCD
Offset 38: Timecode seconds as BCD
Offset 39: Timecode minutes as BCD
Offset 40: Timecode hours as BCD
Offset 46: Seconds as BCD
Offset 47: Minutes as BCD
Offset 48: Hours as BCD

Can anybody provide more information on the video aux stream?

CruNcher
11th May 2007, 12:07
I'm not sure but could it be that the Metadata that HDVinfo reads out of HDV .m2t files is saved in those 2 streams ?
http://forum.doom9.org/showthread.php?t=110021