Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Children Display

Table of Contents

Introduction

Pipewire is a server and user space API to deal with multimedia pipelines.This page dedicated to bringing up and validation of multiple sample application with pipewire in RPI-3 B+ target. 

Get the list of captured encoded data file(pipewirexxxyyy.h264) from /tmp directory and play it in VLC player.

Build and Flash Procedure

RDK-C rdk-next Yocto 3.1 dunfell build for Raspberrypi

Validation Steps

STEP 1:

Add require SSID and PSK in /etc/wpa_supplicant.conf file in below format

network={

ssid="username"

psk="password"

}

Code Block
languagebash
titleConsole output
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1

network={
ssid="XXX"
psk="YYYYY"
}


STEP 2:

Reboot the Target

After Reboot don't do step 1 and 2.

Note : Step 1 & 2 is only applicable for fresh target boot-up with new image.


STEP 3:

WiFi connection is must needed for this validation to copy the encoded data file(pipewire.h264) to local PC.

Check WiFi connection by using below command.

ifconfig

Code Block
languagebash
titleConsole output
root@raspberrypi3-rdk-camera:~# ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:87 errors:0 dropped:0 overruns:0 frame:0
          TX packets:87 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4552 (4.4 KiB)  TX bytes:4552 (4.4 KiB)

wlan0     Link encap:Ethernet  HWaddr B8:27:EB:2E:72:2B  
          inet addr:192.168.43.246  Bcast:192.168.43.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23 errors:0 dropped:0 overruns:0 frame:0
          TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2893 (2.8 KiB)  TX bytes:5887 (5.7 KiB)


STEP 4:

Before validate this use case we should stop rms binary and mediastreamer binary with below command.

systemctl stop rms-launcher

systemctl stop mst-launcher


STEP 5:

Use the below command to export PATH variable

export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/libexec/installed-tests/pipewire-0.3/examples

Code Block
languagebash
titleConsole output
root@raspberrypi3-rdk-camera:~# export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/libexec/installed-tests/pipewire-0.3/examples


STEP 6:

Before trigger the pipewire binaries, We need to enable "repeat_sequence_header" in v4l2 driver to validate multiple sample application.

Code Block
languagebash
titleEnable seq header
root@raspberrypi3-rdk-camera:~# v4l2-ctl --set-ctrl=repeat_sequence_header=1 


STEP 7:

Run the pipewire binary with below command

pipewire &

Code Block
languagebash
titleConsole output
root@raspberrypi3-rdk-camera:~# pipewire & 


STEP 8:

Run the pipewire media session binary with below command

pipewire-media-session &

Code Block
languagebash
titleConsole output
root@raspberrypi3-rdk-camera:~# pipewire-media-session &


STEP 9:

Run the sample application binary with below command.

If you want to validate multiple application then run this binaries at multiple time.

For example : If you want to validate three application then run this binary at three times and then buffer file will be store in /tmp directory with date and time.

pw-capture

Code Block
languagebash
titleConsole output
root@raspberrypi3-rdk-camera:~# pw-capture &


STEP 9:

Get encoded data available file from local /tmp directory.

Code Block
languagebash
titleConsole output
root@raspberrypi0-rdk-camera:~# cd /tmp/
root@raspberrypi0-rdk-camera:/tmp# ls pipewire*



STEP 9:

Copy encoded data available file from your RPI /tmp directory into your local PC and play it in VLC player.

Code Block
languagebash
titleConsole output
xxxxxx@yyyyy-Lenovo-B480:~/XXXXX$ scp root@RPI_DEVICE_WIFI_IP:/tmp/pipewire.h264 .

Example:
xxxxxx@yyyyy-Lenovo-B480:~/XXXXX$ scp root@192.168.43.246:/tmp/pipewire.h264* .
pipewire-h264                                                                           100%   16KB  16.4KB/s   00:00    
xxxxxx@yyyyy-Lenovo-B480:~/XXXXX$ 

https://reolink.com/how-to-play-h264-files-in-vlc/

Play the pipewire.h264 file in VLC player.