Example-5: (Transcode → Stream out using Ethernet ... Streaming In → Decode → Display) - 2021.2 English

H.264/H.265 Video Codec Unit v1.2 Solutions LogiCORE IP Product Guide (PG252)

Document ID
PG252
Release Date
2021-10-27
Version
2021.2 English

This example requires two boards. Board-1 is used for transcoding and streaming-out (as a server) and board-2 is used for streaming-in and decoding purposes (as a client). The VLC player on the host machine can be used as a client instead of board-2.

  1. Ensure input video file is copied to board-1 for streaming.
  2. Connect two boards back to back with an Ethernet cable or make sure both the boards are connected to the same Ethernet hub.
    1. If the VLC player is used as client, ensure that the host machine and server (board-1) are connected to the same Ethernet hub or connect them back to back using an Ethernet cable.

      Set client IP address and execute stream-in → Decode example on board-2, if board-2 is used as a client and connect the boards back to back with an Ethernet cable.

      ifconfig eth0 192.168.0.2
      Note: Setting up an IP is not required if the boards are already connected to the same LAN.
      vcu-demo-streamin-decode-display.sh -c avc
      Note: This means client is receiving AVC bitstream from server, Use -c hevc if server is sending HEVC bitstream.
  3. If the VLC player is used as client, set the host machine IP address to 192.168.0.2 if it is connected to the board directly with an Ethernet cable.
    Note: Setting up an IP address is not required if the boards are already connected to the same LAN.
  4. Create a test.sdp file on the host with the following content (add a separate line in test.sdp for each of the following items) and play test.sdp on host machine.
    v=0 c=IN IP4 <Client machine IP address>
    m=video 50000 RTP/AVP 96
    a=rtpmap:96 H264/90000
    a=framerate=30

    Trouble-shoot for VLC player setup: IP4 is client-IP address. H264/H265 is used based on received codec type on the client. Turn-off the firewall in the host machine if packets are not received to VLC.

  5. Set server IP and execute Transcode → stream-out example on board-1
    ifconfig eth0 192.168.0.1
    Note: Setting of IP is not required if the boards are already connected to the same LAN.
    vcu-demo-transcode-to-streamout.sh -i /home/root/bbb_sunflower_2160p_30fps_normal_hevc.mkv -c hevc -b 5000 -a <Client Machine/Board IP address>