udpate convts.sh
This commit is contained in:
parent
77392eddb2
commit
264d172b2b
@ -1,2 +1,4 @@
|
|||||||
|
|
||||||
avconv -i tiny2.mov -acodec aac -vcodec h264 -strict experimental tiny2.ts
|
./avconv -loglevel debug -y -i /tmp/tiny2.mov \
|
||||||
|
-bsf h264_mp4toannexb -acodec copy -vcodec copy -strict experimental /tmp/out.ts 2>&1
|
||||||
|
|
||||||
|
@ -68,6 +68,7 @@ func ReadTSHeader(r io.Reader) (self TSHeader, err error) {
|
|||||||
{13, "pid"},
|
{13, "pid"},
|
||||||
{2, "scrambling_control"},
|
{2, "scrambling_control"},
|
||||||
{1, "adaptation_field_flag"},
|
{1, "adaptation_field_flag"},
|
||||||
|
{1, "payload_flag"},
|
||||||
{4, "continuity_counter"},
|
{4, "continuity_counter"},
|
||||||
},
|
},
|
||||||
Val: flags,
|
Val: flags,
|
||||||
@ -76,6 +77,7 @@ func ReadTSHeader(r io.Reader) (self TSHeader, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if flags & 0x400000 != 0 {
|
if flags & 0x400000 != 0 {
|
||||||
|
// When set to '1' it indicates that this TS packet contains the first PES packet.
|
||||||
self.PayloadUnitStart = true
|
self.PayloadUnitStart = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -516,8 +518,8 @@ func ReadPESHeader(r io.Reader) (res *PESHeader, err error) {
|
|||||||
self.PTS = PESUIntToTs(v)
|
self.PTS = PESUIntToTs(v)
|
||||||
|
|
||||||
if debug {
|
if debug {
|
||||||
fmt.Printf("pes: pts %x(%x)=>%x %f\n",
|
fmt.Printf("pes: pts %x=>%x %f\n",
|
||||||
v, (v>>1)&0xef, self.PTS, float64(self.PTS)/90000)
|
v, self.PTS, float64(self.PTS)/90000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user