# Technical details about decoding rtsp streams via node-red-contrib-ffmpeg-spawn

**URL:** https://discourse.nodered.org/t/technical-details-about-decoding-rtsp-streams-via-node-red-contrib-ffmpeg-spawn/63100
**Category:** General
**Created:** [26 May 2022 09:24 UTC](https://discourse.nodered.org/t/technical-details-about-decoding-rtsp-streams-via-node-red-contrib-ffmpeg-spawn/63100 "2022-05-26T09:24:28Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [29 May 2022 08:22 UTC](https://discourse.nodered.org/t/technical-details-about-decoding-rtsp-streams-via-node-red-contrib-ffmpeg-spawn/63100/12 "2022-05-29T08:22:17Z")

</div>

> [@BartButenaers](#):
>
> I still don't get the mp4 frags working 😱

Nailed it. Now it works 🍾

Found an older [advise](https://discourse.nodered.org/t/how-to-build-a-video-surveillance-system-from-scratch/51077/11) from our ffmpeg wizard Kevin, to get info about my rtsp stream using _ **ffprobe** _. This was the output of my probe:

> Metadata:  
> title : Media Presentation  
> Duration: N/A, start: 0.000000, bitrate: N/A  
> Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 800x600 [SAR 1:1 DAR 4:3], 29.92 tbr, 90k tbn  
> Stream #0:1: Audio: pcm\_mulaw, 8000 Hz, mono, s16, 64 kb/s

I suddenly realized that I converted the audio to AAC, but for video I used the 'clone codec' option. As a result I stored mjpeg chunks into mp4 containers, because I thought that my cam did send an H.264 stream. Not appearantly...

After I instructed ffmpeg to convert the video to H.264 (using `... -c:v libx264...`) everything seems to work fine in my dashboard. Will have a look tonight whether my old cam can send h.264, to avoid having to do this conversion in my Node-RED flow.

@kevinGodell: your mp4frag nodes are a real piece of art. Must have been an awfull lot of development work to get it running. If you ever have some ideas to troubleshoot root causes of issues (like the one I had) more easily, please share it!

---

_[View the full topic](https://discourse.nodered.org/t/technical-details-about-decoding-rtsp-streams-via-node-red-contrib-ffmpeg-spawn/63100)._
