Encoding USB camera stream to h.264 or h.265

Hello,

I`m considering using Jetson Nano for my future project. Finally one affordable computer from Nvidia that looks very promising.
However first I would like to know if Jetson Nano is capable of encoding 1080p30fps video from USB camera (in Raw, YUV or MJPEG format) to H.264 or H.265 for real-time streaming?

My project:

I need video feed from my drones USB camera to be streamed in real-time over internet (web browser based interface for operator).
I need as little latency as possible, below 200 ms or so. Encoding should be done by GPU or hardware encoder (if Jetson Nano has one) because I don`t want to put that extra load on CPU.

Is that feasible with Jetson Nano?

I have no previous experience with Nvidia single-board computers.
Thanks.

1 Like

Hi syvva, yes this is possible, Jetson Nano has a hardware video encoder and decoder. Recommend looking at the L4T Accelerated GStreamer User Guide for examples:

https://developer.nvidia.com/embedded/dlc/l4t-accelerated-gstreamer-guide-32-1

Hi dusty_nv,

That is great. Will try Jetson Nano.
Thanks for the examples.

Hi @syvva,

Thanks for your asking this question because I have similar query. Have you found solution to your problem? If yes, could your share at least a snippet of your code of h.265 encoding!

Thank you

Hi @jaiforfriend @syvva

I have exactly the same needs as both of you !

Could you share with me your solution ?
It would be really great !! :)

Thx

1 Like

Hi jaiforfriend and coderoom.fleury,

Good to know that I`m not the only one wanting to do this.
Unfortunately I have not started writing code yet because I decided to design custom ESC and a new controller board for my drone. Still developing this hardware.
I wanted to get quick heads up with my question to make sure Jetson Nano is up for the task.
Please let me know if you find the solution before I do.

NB! I found lots of very informative threads in these forums. Some are explaining video encoding very well.

Regards,

Syvva

You may have a look to this post (was for a YUV422/MJPG camera).

Thanks @Honey_Patouceul

I tried

Reciever:

gst-launch-1.0 udpsrc port=8888 ! application/x-rtp, clock-rate=90000, payload=96 ! rtph265depay ! h265parse ! vaapidecode ! vaapisink

Transmitter:

gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=500 ! 'video/x-raw, width=1280,height=720,framerate=(fraction)30/1' ! vaapih265enc ! h265parse ! rtph265pay pt=96 ! udpsink host=192.168.1.142 port=8888 sync=false

But I find RTPH server induces lots of latency. And also no proper tool for latency calulation, i.e. time-stamps.

If there is any possibility of sending ROS msgs(h265 packets), then network latency can be calculated easily. Additionally options would be open.

@coderoom.fleury @jaiforfriend
Hi guys, I am also looking something like this, did you complete your projects?

@alicanavar
You’d better create a new topic, you would get more visibility than within an old solved topic.
Also be sure to clearly explain what you want to acheive, how you’re trying to do (code or commands) and what fails (error messages) for better advice.