# \[beta testing\] nodes for live streaming mp4

**URL:** <https://discourse.nodered.org/t/beta-testing-nodes-for-live-streaming-mp4/33743>\
**Category:** Share Your Nodes\
**Created:** [4 October 2020 23:35 UTC](https://discourse.nodered.org/t/beta-testing-nodes-for-live-streaming-mp4/33743 "2020-10-04T23:35:12Z")\
**Posts on this page:** 1\
**Showing post:** 59

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [17 October 2020 05:53 UTC](https://discourse.nodered.org/t/beta-testing-nodes-for-live-streaming-mp4/33743/59 "2020-10-17T05:53:51Z")

</div>

Time for an update. I managed to make it work using the GPU 🍾 🍾

1. Maybe not necessary but I decided to re-build ffmpeg from scratch to get the latest version and also to be sure it really was built with gpu support. Following this guide here:  
[(RPi) Compile FFmpeg with the OpenMAX H.264 GPU acceleration · legotheboss/YouTube-files Wiki · GitHub](https://github.com/legotheboss/YouTube-files/wiki/(RPi)-Compile-FFmpeg-with-the-OpenMAX-H.264-GPU-acceleration)

Except that I used these configure parameters (to link the atomic library which was needed in my case):

```auto
./configure --extra-ldflags="-latomic" --arch=armel --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree

```

1. Edit /boot/config.txt and change to at least gpu\_mem=128  
Note: maybe this would have solved my issue, so try this first before re-building the whole ffmpeg package

2. Reboot

3. Checking versions

> pi@raspberrypi:~ $ ffmpeg -encoders | grep 264  
> ffmpeg version N-99578-gaf701196ec Copyright (c) 2000-2020 the FFmpeg developers  
> built with gcc 8 (Raspbian 8.3.0-6+rpi1)  
> configuration: --extra-ldflags=-latomic --arch=armel --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree  
> libavutil 56. 60.100 / 56. 60.100  
> libavcodec 58.111.101 / 58.111.101  
> libavformat 58. 62.100 / 58. 62.100  
> libavdevice 58. 11.102 / 58. 11.102  
> libavfilter 7. 87.100 / 7. 87.100  
> libswscale 5. 8.100 / 5. 8.100  
> libswresample 3. 8.100 / 3. 8.100  
> libpostproc 55. 8.100 / 55. 8.100  
> V..... h264\_omx OpenMAX IL H.264 video encoder (codec h264)  
> V..... h264\_v4l2m2m V4L2 mem2mem H.264 encoder wrapper (codec h264)  
> V..... h264\_vaapi H.264/AVC (VAAPI) (codec h264)

1. Running test

The command line:

```auto
ffmpeg -i http://192.168.0.236:8889/?action=stream -pix_fmt yuvj422p -c:v h264_omx -f mp4 -movflags +frag_keyframe+empty_moov+default_base_moof pipe:1

```

And it works, it's now using the GPU!!! The total CPU load has gone down and is now just around 20% on average and the CPU/GPU temperature seems to stabilize around 58 degrees celsius

The sequence durations are now steady 1 second

> [h264\_omx @ 0x1b96580] Using OMX.broadcom.video\_encode

> Output #0, mp4, to 'pipe:1':  
> Metadata:  
> encoder : Lavf58.62.100  
> Stream #0:0: Video: h264 (h264\_omx) (avc1 / 0x31637661), yuv420p, 640x480, q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc  
> Metadata:  
> encoder : Lavc58.111.101 h264\_omx

> frame= 59 fps= 14 q=-0.0 size= 48kB time=00:00:02.28 bitrate= 173.3kbits/s speed=0.543x

etc, etc

The picture quality is however not as good now, don't know why but this is how it looks like. The picture looks distorted

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/4/74b094940e882f89a10c0ad3a880650a87a33ad2.jpeg)

---

_[View the full topic](https://discourse.nodered.org/t/beta-testing-nodes-for-live-streaming-mp4/33743)._
