# Accessing h.264 stream with mpa client

Source: https://forum.modalai.com/topic/396/accessing-h-264-stream-with-mpa-client
Category: VOXL SDK and Software (https://forum.modalai.com/category/47/voxl-sdk-and-software)
Tags: mpa
Posted: 2021-08-16 17:26:41 UTC by PawelJ
Replies: 5 · Views: 2161

## PawelJ · 2021-08-16 17:26:41 UTC

Is there a way to access the h.264 stream instead of the yuv images from the 4k camera? I am working on sending a video stream from the 4k camera offboard to a jetson NX over the adb port ([previous forum post](https://forum.modalai.com/topic/374/connecting-voxl-to-jetson-nx)) at a resolution of 832x832. I have a simple message being sent from a server on the voxl to a client on the jetson over the adb port with some [adb port forwarding commands](https://blog.usejournal.com/adb-port-forwarding-and-reversing-d2bc71835d43). I am working through the process of implementing the h.264 encoding / decoding, however I notice that there is an h264 stream used in `voxl-rtsp`. Unfortunately I require the voxl-camera-server as I am using vvpx4, and @Alex-Kushleyev mentioned in a prior [post of mine](https://forum.modalai.com/topic/341/minimal-example-of-using-camera_cb/2?_=1629134156192) that you cannot run the `voxl-camera-server` and `voxl-rtsp` at the same time. I am still working my way through the `voxl-rtsp` code to sort out where the h264 stream is created / accessible from, as I am trying to sort out if there is a way to access the h264 stream without `voxl-rtsp`, or if that is something created in that service from the raw YUV images.

## Reply by Alex Kushleyev (ModalAI staff) · 2021-08-17 12:55:11 UTC

If you would like to use voxl-camera-server, then voxl-streamer is the way to go https://docs.modalai.com/voxl-streamer/ . Please check it out and let us know if you have any questions. the combination of the camera server and voxl-streamer will generate an rtsp stream with h264 encoding. Also, you should be able to separate the h264 stream from rtsp encapsulation in voxl-streamer if you need to.

Alex

## Reply by Alex Kushleyev (ModalAI staff) · 2021-08-17 13:00:24 UTC

Oh, also, just to mention.. You should be able to run voxl-rtsp at the same time as the camera server, however:
- disable voxl-camera-server from accessing the particular camera (4K in your case)
- start voxl-rtsp after you start the camera server (if you start camera server after voxl-rtsp, it will disrupt voxl-rtsp session during initialization)

Should work, I believe..

## Reply by PawelJ · 2021-08-30 20:11:27 UTC

HI @Alex-Kushleyev ,

Thanks for the advice, using the voxl-rtsp server to a specified port and using adb port forwarding worked quite nicely. How would you recommend disabling the hires camera in the `voxl-camera-server`? I removed it from the config and changed my tflite-server to use the stereo-cameras, but the camera-server throws an error about the `J2` port missing.
`ERROR: object missing port_J2`

Cheers,

Pawel

## Reply by Guest · 2021-08-30 20:34:38 UTC

You should just be able to set the enabled flag in the camera server config file to false. It won't access data from a port unless the camera is enabled.

## Reply by PawelJ · 2021-09-01 17:27:03 UTC

Thanks @Alex-Gardner that did the trick. I can get the cam-server and rtsp server running at the same time now. Is there a way to get `voxl-rtsp` to run at aspect ratios other than 3:4? When I try to change it I keep getting the following error
```
/ # voxl-rtsp -s 832x832
voxl-rtsp version 1.0.4
Setting resolution: 832x832
Connected
Started camera 0
Created session
Video track created
in setGainAndExposure: Unable to get camera parameters
rtsp://192.168.86.215:8900/live
Camera Control FIFO starting: /dev/camera0_control
Unable to connect to start session: -19
Unable to delete video track: -19

```
If I maintain the 3:4  AR it works as expected.
