Quality issue when encoding with FFMPEG7
Hi there,
First thank you for all the work you do. I can understand how much work it takes to put all of this together.
My current Tdarr setup is a 'set it' and forget it kind of deal, I have pretty much got it all automated where I download then it goes to Tdarr then replaces the source with the encoded file. I'm using Classic Plugins with modified FFMPEG params to better fit my needs. Anyway, I was re-encoding some TV shows that I had because I changed a few FFMPEG params around a few weeks back before FFMPEG7 was available on TDarr. So since the change to FFMPEG7, I just left it alone. Today, after I re-encoded a TV Show with FFMPEG7. I noticed the picture of the show skips like it's a broken record which I thought was odd. I thought it was because I removed 1 Param out which was -temporal_aq and also thought it was the new NVME I just added but I chose not to believe that. So I re-encoded it again and still the same issue. So I gave up within minutes and just put the original encoded TV Show back.
Then later today, I noticed it again when watching a Movie. I just encoded a H264 Remux to HEVC and it was the same issue. The movie picture/frame was skipping. So then I thought, wait a minute, let me go back to FFMPEG6. I then re-encoded the same TV show I mentioned above from the same source and the picture was not skipping this time. Then tried this same movie using the same source with FFMPEG6 and no skipping. Everything seems to be fine since I switched back to FFMPEG6. If this is true and FFMPEG7 is causing these skips. I need to inspect all the video files that Tdarr re-encoded within the last 2 weeks.
I've checked a few videos that Tdarr encoded within the last few weeks and seems like it's not happening to all. I am encoding only H264 Remux (All Quality but 4k), H264 (All Quality but 4k) to HEVC using an Nvidia A2000.
Is this something that you can check? I'm going to stick to FFMPEG6 for now since it's not giving me any issues at all.
Please let me know.
Yup. same. Since Tadarr upgraded to FFMPEG7 anything that is above 30fps will skip and stutter, its getting really annoying and because Tadarr is automated, its killing files left right and centre every day.
@MiTechMess if you set container env variable ffmpegVersion=6 it will use v6
Tdarr uses https://github.com/jellyfin/jellyfin-ffmpeg/releases currently up to date with latest release
With jf-ffmpeg7 try adding -fps_mode passthrough on the output side of the ffmpeg command.
WOW! Thank you for posting this, it was driving me crazy. I'd actually not considered it was due to Tdarr until recently, and this made me try again with the same file and ffmpegVersion=6 in environment vars. Problem "solved" the file works as expected.
Oh damn. Does this affect Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable?
response.preset += <io> -map 0 -dn -c:v libx265 -preset ${inputs.ffmpegPreset}
+ -x265-params crf=${crf}:bframes=${inputs.bframe}:rc-lookahead=32:ref=6:b-intra=1:aq-mode=3
+ ${HDRsupport} ${pixel10Bit} ${hqdn3d} -a53cc 0 -c:a copy -c:s copy -max_muxing_queue_size 9999;
You guys scared me. I checked all the files with fps higher than 30, and none of them seem to have this skipping problem. Checked on plex and vlc.
With jf-ffmpeg7 try adding
-fps_mode passthroughon the output side of the ffmpeg command.
This did not work for me, but downgrading FFMPEG to v6 did work.
For context, I'm using the classic plugin "Migz Transcode Using Nvidia GPU & FFMPEG" (Tdarr_Plugin_MC93_Migz1FFMPEG).
It seems the issue is in full force, for some reason setting the env with "ffmpegVersion=6" was the fix before, but now i seems when you set that nothing happens as tdarrs logs shows:
FFmpeg version: 7.1.2-jellyfin it seems to be an ongoing issue.
U could also download a static build of ffmpeg 8 put that in a shared folder to the container and map it in the node configs, and see if that resolves ur issues.. U can grab one for example from here: (https://github.com/BtbN/FFmpeg-Builds)
U could also download a static build of ffmpeg 8 put that in a shared folder to the container and map it in the node configs, and see if that resolves ur issues.. U can grab one for example from here: (https://github.com/BtbN/FFmpeg-Builds)
Yeah I gave that a go but no luck, even went as far as using a ffmpeg build 6.0 from jellyfin and import that into folder, same issues when file is encoded.
Edit:
After 9 hours of testing with my usual setup of tdarr with migz hevc gpu plugin, what seems to be happening is while converting and in the transcoding folder there is no skipping at all, the file will play without issue. Once the file finalised and moved it then has the weird stutter / skipping issue. Specifically files in 25fps or 50fps (both PAL) the issue happens. All other framerates seem uneffcted.
But after testing this with what feels like 100 test files it ended up always skipping after replacing the old file.
No combinations of ffmpeg builds new or old make a difference. It all comes down to just before the file move from the transcoding folder.
I have managed to fix it using a custom ffmpeg command, the stutter is no longer happening.
So it's seems some weird combination of when the file moves and migz plugin. The custom arguments I'm using to encode to hevc are all transcoding and then moving and have no issues anymore.
Just wanted to update the thread with my findings that maybe this can help anyone else.
@StrayFromGary not sure if you're using the official Tdarr Docker image or not but when setting ffmpegVersion=6 it's working fine for me.
Sure it will show 7 initially (as that's the default that the image is installed with) but then it will download and install 6 and can then verify on the Help tab that it's using 6.