Support SEI NAL from ffmpeg transcoding
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package h264
|
package h264
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/binary"
|
||||||
"github.com/AlexxIT/go2rtc/pkg/streamer"
|
"github.com/AlexxIT/go2rtc/pkg/streamer"
|
||||||
"github.com/pion/rtp"
|
"github.com/pion/rtp"
|
||||||
"github.com/pion/rtp/codecs"
|
"github.com/pion/rtp/codecs"
|
||||||
@@ -47,6 +48,13 @@ func RTPDepay(track *streamer.Track) streamer.WrapperFunc {
|
|||||||
switch NALUType(payload) {
|
switch NALUType(payload) {
|
||||||
case NALUTypeIFrame:
|
case NALUTypeIFrame:
|
||||||
payload = Join(ps, payload)
|
payload = Join(ps, payload)
|
||||||
|
case NALUTypeSEI:
|
||||||
|
// ffmpeg with transcoding
|
||||||
|
i := 4 + binary.BigEndian.Uint32(payload)
|
||||||
|
payload = payload[i:]
|
||||||
|
if NALUType(payload) == NALUTypeIFrame {
|
||||||
|
payload = Join(ps, payload)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clone := *packet
|
clone := *packet
|
||||||
|
|||||||
Reference in New Issue
Block a user