m1k1o / go-transcode

On-demand transcoding origin server for live inputs and static files in Go using ffmpeg. Also with NVIDIA GPU hardware acceleration.
Apache License 2.0
208 stars 38 forks source link

2nd+ streams lead to errors that can cause some players to not work. #22

Closed noideaman closed 2 years ago

noideaman commented 2 years ago

The first person to get the stream works, video plays back fine. any one after will get errors that cause the video to freeze or the player to refuse to play

See the attached video

https://user-images.githubusercontent.com/39884745/141701010-e01b7afc-674c-4485-b930-6abff0671df8.mp4

This happens on lan and over hls proxy. I have tried changing the type of audio as well happens to both aac and mp3 Using the latest git docker build as well.

m1k1o commented 2 years ago

Thanks for reporting. My first thought is issue #20. Could you please enable debug logs and see what messages are reported?

In Yaml:

# allow debug outputs
debug: true
noideaman commented 2 years ago

error.log got the debug output. hdhomeruns are weird they always out put a bit of garbage (at least primes) at the start.

m1k1o commented 2 years ago

I can't seem to reproduce it with my source and players (vlc & ffplay). All five clients are running smoothly.

image

noideaman commented 2 years ago

Can i get you a box on my network to test on? it will be windows due to parsec. can msg ya on matrix

m1k1o commented 2 years ago

Sure. That would help.

noideaman commented 2 years ago

got you ready to go, but cant seem to msg you.

m1k1o commented 2 years ago

I cant seem to message you too. It just keeps loading.

UPDATE: I was able to send invite to your old matirx.net account. So it is maybe some misconfiguration on your server. Do you have enabled federation?

noideaman commented 2 years ago

I have federation enabled. it is a docker container, just updated it seems to be having issues no clue as to why

noideaman commented 2 years ago

Also i am begingin to think this is more of how the hdhomerun gives the stream out. having the issue with just running ffmpeg out side of go-transocde

noideaman commented 2 years ago

been testing some more have had more luck getting less errors with these flags over the hls muxer


 -segment_list v760.m3u8 \
 -segment_list_type hls \
 -segment_wrap 4 \
 -segment_list_size 4 \
 -segment_list_flags +live \
 -segment_time 2 v760-%03d.ts
noideaman commented 2 years ago

been messing around more. get issues even with those, Seems to be how hdhomerun hands off the stream. Only truly stable way is (so far) is to play the video in obs and stream over nginx-rtmp. It is like the hdhomerun is sending some garbage of some sort randomly, and ffmpeg does not notice and fix.

m1k1o commented 2 years ago

I would like to look into it and find cause of the problem. Can you give me access to a test stream? Or at least record some portion of it and upload it please here (zipped, so that github cannot try any retranscoding).