Background: I am trying to build my own RTMP server for live streaming. (Python3+) I have succeeded to establish an RTMP connection between the server and the client (using OBS). The client sends me the video and audio data. (audio codec: AAC, video codec: AVC). I also built a website (HTTP), with HLS (hls.js) player (.TS & .M3U8) that works properly.
Goal: What I need to do is to take the video and audio data (bytes) from the RTMP connection and join them into a .ts file container so it could be playable on my website.
Plan: I planned to join them into an FLV file and then convert it to TS using FFmpeg. which actually worked with the audio data because FLV support AAC, so I generated FLV files that contained audio-only.
Problem: The problem started when I tried to add the video data into the FLV file, but it is not possible because FLV does not support AVC.
What I tried to do:
I can choose another file container to work with, that supports AVC/AAC but they all seem really complicated and I don't have much time for this.
I tried to find a way to convert the AVC to H.263 and then put it inside the FLV (Because it does support H263) but I couldn't find a way.
I really need help. Thanks in advance!