WWBN / AVideo

Create Your Own Broadcast Network With AVideo Platform Open-Source. OAVP OVP
https://avideo.tube/AVideo_OpenSource
Other
1.96k stars 988 forks source link

Schedule Rebroadcast needs a feed that never stops #9814

Open JoshWho opened 2 months ago

JoshWho commented 2 months ago

If a video playlist is selected there needs to be a way to continue to the next video without disconnecting. I know it is possible for this to do this. The title updating is not important, should just stay the same title of the playlist.

9a0a418c-e309-4e7f-90ec-457b83299574

If the feed can stay constant without disconnecting reconnecting it would work perfect with the restreaming to other platforms as well.

has to be some way to stop the disconnect reconnect from happening after each video.

DanielnetoDotCom commented 2 months ago

Unfortunately, it is not possible to implement the feature you are asking for, as it would introduce more issues than solutions. Here are the reasons why:

  1. Incompatibility with Different Formats:

    • Videos in your platform are likely to have different formats, resolutions, bitrates, codecs, and extensions.
    • While FFmpeg can handle these differences without errors, the web player breaks when switching between videos due to HLS limitations—it seems HLS streams cannot dynamically change formats within the same stream.
  2. Playlist Updates:

    • Once the stream starts, the playlist cannot be updated dynamically without stopping and restarting FFmpeg.
    • This means that any changes or additions to the playlist would require the stream to disconnect and reconnect, defeating the purpose of a "seamless" experience.
  3. Metadata Limitations:

    • It would not be possible to track or know which video is currently playing during the stream.
    • This lack of metadata would affect user experience and potentially other features that depend on knowing what is being streamed.

For these reasons, the current implementation is the most reliable and functional option.

JoshWho commented 2 months ago

If the videos are all encoded in the same bitrate that shouldn't be an issue. Meta data is not important should just use the playlist title and maybe a uploaded thumbnail.

DanielnetoDotCom commented 2 months ago

But still the resolution issue Playlist Updates issue Metadata Limitations issue

JoshWho commented 2 months ago

I would think it would just like a radio encoder works. as long as the files are all the same bitrate it should be able to play all bits without interruption. Radio server works this exact way but it is audio only but same rules, it chunks the mp3 files into bit playlist and constant streams each track without interruption. Same way TV networks do it.

DanielnetoDotCom commented 2 months ago

I was thinking that may be possible but will cost some extra resources

But I cannot promise you this to be done now

JoshWho commented 1 month ago

Please let me know when you can try to modify it. Once this last step is done it will be ready for selling as a service. I feel we are so close to this being complete.

DanielnetoDotCom commented 1 month ago

this is a huge change, but why do you want this?

JoshWho commented 1 month ago

We have a user well a couple of users that want this feature but needs it to stay a constant broadcast.

This will be like a full TV broadcasting network and I bet this feature gets bought once people realize they can host a tv network in the cloud basically with this feature. VOD Live Streaming and 24/7 streaming completes it.

walt93 commented 1 month ago

Josh- FWIW I have spent a few days with the AI trying to architect a stable FFMPEG 24/7 livestream, and, it is a bitch. I will get back to this project soon, but I think it looks like having a 24/7/365 ffmpeg process that transcode-feeds the RTMP.

JoshWho commented 1 month ago

Testing today I watched it seamlessly play 3 videos in a row correctly then it stopped and I refreshed and now it is showing me the input streams feed.

Image

https://ftjmedia.com/live/0/Joshwho/inputBroadcast-91?justRedirected=1&return_line=4026

@DanielnetoDotCom

Output broadcast is not playing.

Looking at the home page and not showing at all.

Here is the info on the last video playing

Image

Image

DanielnetoDotCom commented 1 month ago

You can watch the input because it belongs to you. but the public one is the output.

some hout the output is gone, keep your show runing I will check

JoshWho commented 1 month ago

and just did it again after another 3 videos

Image

and when I refresh

Image

https://ftjmedia.com/live/0/Joshwho/inputBroadcast-91?justRedirected=1&return_line=4026

Image

JoshWho commented 1 month ago

You can watch the input because it belongs to you. but the public one is the output.

some hout the output is gone, keep your show running I will check

Will keep it going

DanielnetoDotCom commented 1 month ago

I will update you soon.

If disconnect it will auto reconnect.

the problem is, the inpuit connect and reconnect multiple times, but the output should not do it. but some times it happen, so if happen it will reconnect.

Also I am sending a fix for

JoshWho commented 1 month ago

I will update you soon.

If disconnect it will auto reconnect.

the problem is, the inpuit connect and reconnect multiple times, but the output should not do it. but some times it happen, so if happen it will reconnect.

Also I am sending a fix for

  • when we are in live the we back on dvr and watch in 2x at the end it do not comes back to 1x
  • rename rebroadcast to replays

Excellent sounds good Daniel

JoshWho commented 1 month ago

It doesn't just disconnect it also sends a redirect to the url if you refresh to the input version.

https://ftjmedia.com/live/0/Joshwho/inputBroadcast-91?justRedirected=1&return_line=4026

DanielnetoDotCom commented 1 month ago

once it will auto reconnect I suspect it will not redirect anymore

JoshWho commented 1 month ago

Another thing I just thought about, how radios servers do this , they buffer 2 to 3 minutes of the audio so there is zero delays on the main output.

DanielnetoDotCom commented 1 month ago

Audio is much easier, the main issue here is video resolution/bitrates etc.

JoshWho commented 1 month ago

Now it is looping the same 30 seconds and the audio is messed up. https://ftjmedia.com/live/0/Joshwho/outputBroadcast-91

DanielnetoDotCom commented 1 month ago

I will kill and restart it, just sent udpates

JoshWho commented 1 month ago

Audio is much easier, the main issue here is video resolution/bitrates etc.

Correct, same goes for the audio. The audio can be fed to the server in different bitrates and gets re encoded at the output to all be the same format. That is why TV broadcast has a 30 second to 3 minute delays on some streams to make it seamless.

JoshWho commented 1 month ago

Looping again

JoshWho commented 1 month ago

This company is doing it with Youtube videos

https://www.youtube.com/watch?v=eijPC0axPjg&t=18s

https://www.livereacting.com/24-7-live-stream-channel

Image

JoshWho commented 1 month ago

This guy does it using Ant media server https://www.youtube.com/watch?v=2FrrYuLh1kY

Image

Other recommended servers for 24/7 broadcast

Streaming Software: Plex, Jellyfin, or Emby: These are widely used for media management and streaming. Each has its pros: Plex is user-friendly with a large community, good for beginners.

Jellyfin is open-source, offering more control and no subscription fees.

Emby offers similar features to Plex but with different pricing and features.

DanielnetoDotCom commented 1 month ago

If you previeously transcode the video it is possible, not sure but I guess with them after you start the live you probalbly cannot update the playlist anymore. but we are doing in a way you can update the playlist anytime. but anyway, since last time I restarted your schedule it is connected without disconnect

JoshWho commented 1 month ago

I still see it looping with the bad audio again https://ftjmedia.com/live/0/Joshwho/outputBroadcast-91

seems like it degrades worse each loop. eventually it is going to crash I think.

JoshWho commented 1 month ago

If you previeously transcode the video it is possible, not sure but I guess with them after you start the live you probalbly cannot update the playlist anymore. but we are doing in a way you can update the playlist anytime. but anyway, since last time I restarted your schedule it is connected without disconnect

You might have been looking at the live link one..

DanielnetoDotCom commented 1 month ago

Hold I can see it is in loop, I am checking.

DanielnetoDotCom commented 1 month ago

josh what video is that?

Image

I would like to inspect it

JoshWho commented 1 month ago

Here it is https://ftjmedia.com/channel/Joshwho/video/.vXG47V5yYOIwUMgt8wwCmA/bumpers-8

This playlist https://ftjmedia.com/viewProgram/92314/Play+Broadcaster

JoshWho commented 1 month ago

Input server is playing fine https://ftjmedia.com/live/0/Joshwho/inputBroadcast-91

It is the final output doing that. https://ftjmedia.com/live/0/Joshwho/outputBroadcast-91

DanielnetoDotCom commented 1 month ago

I found something, making new updates

JoshWho commented 1 month ago

Weird thing with the notification bell during this numbers rapidly changing from 4 to 5 trippy.

Image

JoshWho commented 1 month ago

I think a 30 second delay buffer would make it never show the disconnect at all.

DanielnetoDotCom commented 1 month ago

I can increase the delay, but the delay will reduce on each new video, at some point it will reach the end of the stream. So it will help for some time, but it is not a final solution.

JoshWho commented 1 month ago

I can increase the delay, but the delay will reduce on each new video, at some point it will reach the end of the stream. So it will help for some time, but it is not a final solution.

Maybe a floating adjusting variable on the delay or something.

DanielnetoDotCom commented 1 month ago

I do not think so. I just sent another update, lets see how it will go

JoshWho commented 1 month ago

I am starting to think maybe we should use a media server for this that is already capable of doing this without any interruption.

That Plex media server looks kewl works on Ubuntu.

Image

https://www.howtogeek.com/install-plex-media-server-on-ubuntu/


I feel like we are reinventing the wheel, if there is already media servers that can do this.

DanielnetoDotCom commented 1 month ago

I am not sure how to use it

DanielnetoDotCom commented 1 month ago

If you install what do you need from AVideo?

JoshWho commented 1 month ago

Here is others as well. https://www.tecmint.com/best-media-server-software-for-linux/

Just thinking maybe this all could be a lot more simple .

DanielnetoDotCom commented 1 month ago

Tell me what do you need from AVideo

I am not sure if they work as you expect

JoshWho commented 1 month ago

This is the home page right now

Image

JoshWho commented 1 month ago

The transitioning looks better between videos now. The signalling with notifications and the chat refreshing is weird.

I want to know how they do this. https://www.livereacting.com/

JoshWho commented 1 month ago

Tell me what do you need from AVideo

I am not sure if they work as you expect

I am not sure as well. Just trying to think of how to either mimic how the tech works with those other media servers. Something we are missing.

JoshWho commented 1 month ago

Transcoding is a critical process in video streaming that involves converting video from one format (codec, resolution, bitrate) to another. Here's a deeper look into how transcoding works, especially in the context of media servers:

Basics of Transcoding: Decoding: The first step in transcoding is to decode the original video file. This involves decompressing the video data from its format (e.g., H.264, H.265) into raw video data that can be manipulated.

Processing: Resolution Adjustment: The video might be scaled to different resolutions (e.g., from 4K to 1080p or 720p) to cater to different device capabilities or network conditions.

Bitrate Adjustment: The bitrate can be altered to match the available bandwidth of the viewer's internet connection, ensuring smooth playback.

Frame Rate Adjustment: The frame rate might be changed to match the capabilities of the playback device or to save on bandwidth.

Audio Encoding: The audio might also be transcoded, sometimes to different formats or bitrates, or even to add subtitles or different audio tracks.

Encoding: After processing, the video data is encoded again into the desired format. This process compresses the video to make it suitable for streaming, reducing file size while trying to maintain quality.

Key Aspects of Transcoding for Streaming: On-the-fly vs. Pre-transcoding: On-the-fly (Live) Transcoding: The server transcodes the video in real-time as it's streamed, adapting to each user's device capabilities and network conditions. This method is resource-intensive but provides the most flexibility.

JoshWho commented 1 month ago

I feel your version of this is getting really close, just not getting how that other website https://www.livereacting.com/ is selling this service. I just looked at one of the streams on their homepage being playing on Youtube since last december. Zero interruptions, and somehow they have 10k customers using their services. I feel it is possible, just not sure what we are missing.

DanielnetoDotCom commented 1 month ago

Again:

  1. if you do not need to change the playlist while it is playing
  2. no need to track what video you are playing it is easier
  3. also if loop a single video, it will never disconnect.
JoshWho commented 1 month ago

Again:

  1. if you do not need to change the playlist while it is playing
  2. no need to track what video you are playing it is easier
  3. also if loop a single video, it will never disconnect.

Totally fine with not changing the playlist once it is playing. Never wanted to be able to do that

Correct, do not need the metadata, just use the 1 title and description of the playlist.

Playing a single video in loop would not be a good idea.

this is that stream I was talking about above that has been running since December https://www.youtube.com/watch?v=P1Vmpmmgwww ran by this company https://www.livereacting.com/24-7-live-stream-channel

Title never changes plays thousands of different videos a month.

It is our exact concept, I almost feel they got the idea from this post.

Just need it to be seamless. No need to update the title or refresh the chat, or re notify