200 likes | 352 Views
xStreamer Modular Multimedia Streaming. Nicolas Staelens nicolas.staelens@intec.ugent.be www.ibcn.intec.ugent.be INTEC Broadband Communication Networks (IBCN) Department of Information Technology (INTEC) Ghent University - IBBT. xStreamer. In-house developed modular multimedia streamer
E N D
xStreamerModular Multimedia Streaming Nicolas Staelens nicolas.staelens@intec.ugent.be www.ibcn.intec.ugent.be INTEC Broadband Communication Networks (IBCN) Department of Information Technology (INTEC) Ghent University - IBBT
xStreamer • In-house developed modular multimedia streamer • Alexis Rombaut (alexis.rombaut@intec.ugent.be) • Written in C++ • Uses libraries: • libavformat/libavcodec (parsing/encoding/decoding) • live555 (RTSP) • jrtplib (RTP) • Released under General Public License (GPL) • Freely available at http://xstreamer.atlantis.ugent.be/
ModularMultimedia Streaming Inspired by Click Modular Router & DirectShow Offers different components • Performs basic functions • Readers, packetizers, multiplexers, schedulers, transmitters, receivers, writers, classifiers, analyzers Streamer is directed graph of components
ModularMultimedia Streaming Supports audio and video • Using RTP packetization: • MPEG-1/2/4 Video & Audio • Using MPEG-2 Transport Streams: • MPEG-1/2/4 Video & Audio • H.264 AVC/SVC
ModularMultimedia Streaming Multitude of supportedprotocols RTP/UDP RTSP/RTP/UDP UDP TCP
What can xStreamer do? Advanced streaming server • Own MPEG-2 TS multiplexer • SVC streaming • Differentiated streaming using classifiers Proxy/client • Proxy: convert differentiated stream into a single stream • Client: save captured stream to file Video tool • No ‘real’ streaming involved • Simulate packet loss • Collect tracefiles during streaming
Create xStreamer configuration Configuration saved in XML-based file • Describes directed graph of components and connections between components Graphical User Interface • Visualize directed graph • Drag components and draw connections • Configure components
Example: Differentiated SVC streaming Read raw H.264 video stream Avoidburstsbysmoothing packets over time Packetize frames into packets as defined in RFC3984 Classify NAL units dependingon SVC layer Stream different layers over different connections
Example: Proxy/Client Proxy Client
xStreamer as video tool Offline simulator • No ‘real’ streaming • Simulate packet loss using Classifier component • Random, Gilbert-Elliott • Write resulting packet stream back to file Tracefile generation • Packetizer: video trace • Transmitter: sender trace • Receiver: receiver trace • Classifier: sender & receiver trace
xStreamer – HDTV PVS creation HDTV PVS Creation • H.264/AVC • Packet loss Toolchain • Encoding • Streaming • Decoding & syncing
HDTV PVS Creation – xStreamer config Packet loss simulator usingGilbert-Elliott model
HDTV PVS Creation – Tracefiles Video tracefilegeneration • 0 H 539 1 1.066667 • 0 H 24 1 1.066667 • 0 H 4 1 1.066667 • 0 I 256835 180 1.066667 • 1 P 111970 79 1.133333 • 2 B 52428 37 1.100000 • 3 P 43918 31 1.200000 • 4 B 30967 22 1.166667 • 5 P 62890 45 1.266667 • 6 B 20660 15 1.233333 • 7 P 69342 49 1.300000 • 8 P 65287 46 1.333333 • 9 P 78591 56 1.400000 • 10 B 31715 23 1.366667 • 11 P 78028 55 1.466667 • 12 B 34809 25 1.433333 • P 71582 51 1.533333 • … <id> <slice_type> <size> <nb_packets> <pts>
HDTV PVS Creation – Tracefiles Sender tracefile 0.00 id 1 udp 24 0.00 id 2 udp 4 0.00 id 3 udp 1430 0.00 id 4 udp 1430 0.00 id 5 udp 1430 0.00 id 6 udp 1430 0.00 id 7 udp 1430 0.00 id 8 udp 1430 0.00 id 9 udp 1430 0.00 id 10 udp 1430 0.00 id 11 udp 1430 0.00 id 12 udp 1430 0.00 id 13 udp 1430 0.00 id 14 udp 1430 0.00 id 15 udp 1430 0.00 id 16 udp 1430 0.00 id 17 udp 1430 … <tx_time> <pckt_id> <protocol> <size>
HDTV PVS Creation – Tracefiles Receiver tracefile 0.00 id 0 udp 539 0.00 id 1 udp 24 0.00 id 2 udp 4 0.00 id 3 udp 1430 0.00 id 4 udp 1430 0.00 id 5 udp 1430 0.00 id 6 udp 1430 0.00 id 7 udp 1430 0.00 id 8 udp 1430 0.00 id 9 udp 1430 0.00 id 10 udp 1430 0.00 id 11 udp 1430 0.00 id 12 udp 1430 0.00 id 15 udp 1430 0.00 id 16 udp 1430 0.00 id 17 udp 1430 0.00 id 18 udp 1430 … <rcv_time> <pckt_id> <protocol> <size> 2 packets lost: id 13 & 14
Combining tracefiles video trace sender trace receiver trace 0 H CORRECT 0 H CORRECT 0 H CORRECT 0 I DAMAGED …
PVS Creation: decoding & syncing Decode streamed raw H.264/AVC file • avc-decoder based on libavcodec (ffmpeg) • Only decodes correctly received frames Align decoded and original sequence • Decoded sequence misses pictures • Lost & damaged • Tracefile analysis • Locate missing pictures • Conceal missing pictures • Copy previous frame, gray, black, green, …
Conclusion Modular architecture • Logical structure • Easily extendable Advanced streaming server • SVC Support • Differentiated streaming Video tool • Network simulation • Tracefile generation