Unable to decode & encode a file with cuvid & nvenc

Hi, I’m trying to use the hwaccel feature of GPU.
But, faced some troubles.

It works well in most cases. But today i faced this error.

ffmpeg -hide_banner -hwaccel cuvid -c:v h264_cuvid -resize 1024x720 -i ./waterfall.mp4 -c:a copy -c:v h264_nvenc 123.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘./waterfall.mp4’:
major_brand : mp42
minor_version : 1
compatible_brands: mp41mp42isom
creation_time : 2017-06-28T01:08:40.000000Z
Duration: 00:00:06.20, start: 0.000000, bitrate: 2675 kb/s
Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 720x404, 2592 kb/s, 29.84 fps, 30 tbr, 600 tbn, 1200 tbc (default)
rotate : 90
creation_time : 2017-06-28T01:08:40.000000Z
handler_name : Core Media Video
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s (default)
creation_time : 2017-06-28T01:08:40.000000Z
handler_name : Core Media Audio
File ‘123.mp4’ already exists. Overwrite ? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> h264 (h264_nvenc))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter ‘graph 0 input from stream 0:0’ and the filter ‘auto_scaler_0’
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
Conversion failed!

Do you guys know what is wrong with the file or the command?
You can view or download that video file from here => https://drive.google.com/file/d/1IE9opN-5CjwX7kp0zIcvyu6SyFBrmsMP/view

Please enjoy this error.

The rotation of input file is the problem. But i dont know how to fix it.
Does anyone know how to solve it?

I face the same problem. Did you solve this issue?

You can pass “-autorotate 0” to stop FFmpeg from trying to rotate the video (which it cannot perform if you use a full cuvid pipeline), but of course if thats required, it might still be a problem.