#Stream is corrupted somehow and shows green with mangled video in top left corner

1 messages · Page 1 of 1 (latest)

crystal spoke
charred thunder
#

It happens every time? And even if you kill the stream completely and restart it?

Wonder if it’s a Dolby vision thing? I see that the file as Dovi metadata

crystal spoke
#

Its not purely a DV issue but maybe it does contribute, I have a test channel for DV HDR specifically and many of them play fine. So far, it has happened every time with those movies. Stopping the stream or even restarting tunarr does not remedy it.

charred thunder
#

Can you send logs for one that plays ok?

#

so I can compare the metadata ffmpeg sees

charred thunder
#

Definitely strange. The two streams look like their video parts are identical

charred thunder
#

doesnt completely explain why it works one stream but not the other (both inputs are 10-bit), but i'm thinking this must have to do with the conversion from 10-bit to 8-bit

charred thunder
#

trying to find a repro in my own library - looking for similar video streams. haven't gotten a repro in the 2 i've tried that are similar yet.

in the meantime, can you provide some details about your setup? looks like you are running in docker based on the report file paths. what nvidia card are you using? and what is your host OS

crystal spoke
#

Host OS is Debian Bookworm, and my graphics card is a Quadro RTX 5000

crystal spoke
#

Would you want me to continue posting media infos/ffmpeg logs for stream that corrupt during playback like this?

charred thunder
#

Sure, but it’ll be very hard for me to fix without a reproduction on my end. It might be helpful to get a 10 second sample of an original file that exhibits the issue

Also I forget if I asked before but are you running tunarr in docker? And if not which version of ffmpeg have you supplied it

crystal spoke
#

It is running in Docker

crystal spoke
#

I've got the first five minutes cut and I'll PM you a link, do you have a preferred file sharing service?

charred thunder
#

Perfect. Whatever it simplest for you is fine

charred thunder
#

ok with the test file i have reproduced the error. the interesting thing is that with ffmpeg 6.1, the issue does not reproduce. it's only with ffmpeg 7 and above

#

the nvidia docker build comes bundled with 7.1

#

so that explains that

#

it looks like a nvidia decoder issue

charred thunder
#

the simplest command i've reproduced with so far /usr/local/bin/ffmpeg7 -y -nostdin -hide_banner -nostats -loglevel info -fflags +genpts+discardcorrupt+igndts -hwaccel cuda -hwaccel_output_format cuda -readrate 1.0 -readrate_initial_burst 60 -ss 120s -i ~/Downloads/Cars2.mkv -muxdelay 0 -muxpreload 0 -flags cgop -movflags +faststart -t 10s -video_track_timescale 90000 -c:v copy -c:a copy -f mpegts test7.ts

#

the original command that reproduced /usr/bin/ffmpeg -nostdin -hide_banner -nostats -loglevel info -fflags +genpts+discardcorrupt+igndts -hwaccel cuda -c:v hevc_cuvid -hwaccel_output_format cuda -readrate 1.0 -readrate_initial_burst 60 -i ~/Downloads/Cars2.mkv -filter_complex "[0:1]aresample=async=1:first_pts=0,apad=whole_dur=576996ms[a];[0:0]scale_cuda=format=yuv420p[vpf]" -map "[vpf]" -map "[a]" -muxdelay 0 -muxpreload 0 -flags cgop -movflags +faststart -t 10s -video_track_timescale 90000 -b:v 35000k -maxrate:v 35000k -bufsize:v 105000k -c:v hevc_nvenc -b_ref_mode 0 -c:a aac -ac 2 -b:a 320k -maxrate:a 320k -bufsize:a 960k -ar 48k -g 96 -keyint_min 96 -force_key_frames "expr:gte(t,n_forced*4)" -f mpegts test7.ts

#

ok this is weird.... it works if you dont explicitly specify the decoder (unless it's just falling back to sw decoding there, but it doesn't seem like it?)

crystal spoke
#

Thanks for making some progress! I would've had no idea where to even start to try and fix this

charred thunder
#

haha no worries, that's my department

#

long chat over in #dev-chat about it if you're curious about some details

crystal spoke
#

I'll give it a look

charred thunder
#

Hey there - meant to update this thread. The edge build has a potential fix for this

charred thunder
#

whenever you have some time, please LMK if chrisbenincasa/tunarr:edge fixes this for you.

crystal spoke
#

I've pulled it and I'm going through some of my testing movies I've set aside. I'll reply back later today once they've ran through and if there is any green

crystal spoke
#

So far none of my test stream have the green issue anymore, thanks for all the hard work!