encoder_sample.mp4 的內容訊息
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L6.1@Main
Codec ID : hvc1
Codec ID/Info : High Efficiency Video Coding
Duration : 1 min 56 s
Bit rate : 20.1 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 30.000 FPS
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Bits/(Pixel*Frame) : 0.081
Stream size : 280 MiB (99%)
Encoded date : UTC 2000-01-01 00:00:00
Tagged date : UTC 2000-01-01 00:00:00
Color range : Full
Color primaries : BT.601 NTSC
Transfer characteristics : BT.601
Matrix coefficients : BT.601
Codec configuration box : hvcC
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 1 min 56 s
Bit rate mode : Constant
Bit rate : 192 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 2.64 MiB (1%)
Encoded date : UTC 2000-01-01 00:00:00
Tagged date : UTC 2000-01-01 00:00:00
=================================================================
video 播放:
gst-launch-1.0 -v rtpbin name=rtpbin filesrc location=./encoder_sample.mp4 ! qtdemux name=d d.video_0 ! queue ! rtph265pay config-interval=10 pt=96 ! udpsink host=192.168.36.100 port=5098
v=0
m=video 5096 RTP/AVP 96
c=IN IP4 192.168.36.102
a=rtpmap:96 H265/90000
pt值請參考:
https://en.wikipedia.org/wiki/RTP_audio_video_profile
=================================================================
audio 播放:
gst-launch-1.0 -v rtpbin name=rtpbin filesrc location=./encoder_sample.mp4 ! qtdemux name=d d.audio_0 ! queue ! rtpmp4gpay ! udpsink host=192.168.36.100 port=5098
v=0
m=audio 5098 RTP/AVP 96
a=rtpmap:96 mpeg4-generic/48000
a=fmtp:96 streamtype=5; profile-level-id=2; mode=AAC-hbr; config=1190; SizeLength=13; IndexLength=3; IndexDeltaLength=3
c=IN IP4 192.168.36.102
有關於sdp的一些參數, 可以透過gst-launch-1.0的執行後, console下可以看到相對應的參數.
=====================================================================
audio/video播放:
gst-launch-1.0 -v rtpbin name=rtpbin filesrc location=./encoder_sample.mp4 ! qtdemux name=d d.video_0 ! queue ! rtph265pay config-interval=1 pt=96 ! udpsink host=192.168.36.100 port=5096 d.audio_0 ! queue ! rtpmp4gpay ! udpsink host=192.168.36.100 port=5098
v=0
m=video 5096 RTP/AVP 96
a=rtpmap:96 H265/90000
m=audio 5098 RTP/AVP 96
a=rtpmap:96 mpeg4-generic/48000
a=fmtp:96 streamtype=5; profile-level-id=2; mode=AAC-hbr; config=1190; SizeLength=13; IndexLength=3; IndexDeltaLength=3
c=IN IP4 192.168.36.102
上述的video port可以改為52856, audio port 可以改為52859
port的定義值可以參考以下網址:
TCP/UDP埠列表
https://zh.wikipedia.org/wiki/TCP/UDP%E7%AB%AF%E5%8F%A3%E5%88%97%E8%A1%A8
===================================================================
gstreamer相關套件說明:
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/
gstreamer相關套件說明:
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/
沒有留言:
張貼留言