Open Goodwu opened 1 week ago
This seems correct to me. The unit is different in each of those. You requested 4000 Kilobytes and are getting results in Megabits which are a different unit. 4000 Kilobytes is 32 Megabits and you are well within that range based on what you've shown us.
Bits v Bytes
This seems correct to me. The unit is different in each of those. You requested 4000 Kilobytes and are getting results in Megabits which are a different unit. 4000 Kilobytes is 32 Megabits and you are well within that range based on what you've shown us.
Bits v Bytes
This setting is for "max bitrate". So the unit should be kilo bit.
And this setting also appear at ffmpeg command line:
/usr/bin/ffmpeg -hwaccel qsv -hwaccel_output_format qsv -async_depth 4 -threads 1 -i /media/photos/xxx.mp4 -y -c:v h264_qsv -c:a aac -movflags faststart -fps_mode passthrough -map 0:1 -map 0:0 -bf 7 -refs 5 -g 256 -v verbose -vf scale_qsv=-1:720:async_depth=4:mode=hq:format=nv12 -preset 1 -global_quality:v 5 -maxrate 4000k -bufsize 8000k xxx.mp4
The ffmpeg manual also indicate the unit is kilo bit.
I add -b:v 1000k argument to ffmpeg command line and calculate the bitrate of output file, it shows 1000k is 1000kilo bit. It's not reasonable that the unit of -b:v is different from -maxrate in the single command line.
So I request for 4000kilo bits here and immich also treat it as 4000 kilo bits on ffmpeg command line but treat it as 4000 kilo bytes on examing the orinal video file?
There are two things that could be causing this problem:
I have always had problems with NVENC and more complex transcodes and just don't bother. Also, I understand that ffmpeg likes two pass encoding to achieve a desired max bitrate.
I have taken a quick look at some of the documentation and there is no mention of support for ffmpeg filters in QSV but the ffmpeg wiki seems like it should include support for scaling and most of the other filters you are using.
The bug
This is the setting:
This is the output video file:
The original file format is MTS.
And I see the ffmpeg command line, it's just copy the video stream instead of transcoding.
The OS that Immich Server is running on
OMV7
Version of Immich Server
v1.106.4
Version of Immich Mobile App
v1.106.4
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Relevant log output
No response
Additional information
No response