[FFmpeg-trac] #7564(undetermined:new): hwdownload fails when size changes

FFmpeg trac at avcodec.org
Sat Nov 24 09:41:02 EET 2018

#7564: hwdownload fails when size changes
             Reporter:  msiders      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:  cuda         |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0

Comment (by msiders):

 Replying to [comment:1 cehoyos]:
 > Please provide the command line you tested together with the complete,
 uncut console output to make this a valid ticket.


 No error is printed in the log (please, set that "-loglevel error" is
 This is because the error is found only in the output file!

 The input file can be any file. However, I use the "Day Flight.mpg" shared
 as example in the ffmpeg repository: https://samples.ffmpeg.org/MPEG2

 Futhermore, you can check in realtime the result sending the output to the
 network and playing it:
 % ffmpeg -stream_loop -1 -y \
  -loglevel error \
  -hwaccel cuvid \
  -c:v h264_cuvid \
    -i "https://samples.ffmpeg.org/MPEG2/mpegts-klv/Day%20Flight.mpg" \
  -c:v h264 \
  -f mpegts -muxrate 6M "udp://@"

 And then play it in another shell with
 % ffplay udp://@

 And execute in the the first at any time
 <c> Parsed_scale_2 -1 w 200

 Finally, I need to comment that even I use the CUDA hardware, '''the
 problem isn't related to CUDA'''. The problem is related to the
 "hwdownload" filter. In my example I use the CUDA hwaccel as it's the one
 available to me. You can use others, and the result should be the same.
 Check it!

 The problem is because '''the hwdownload doesn't catch size changes'''!

 I put two examples (the first with a "scale_cuda" filter) to demonstrate
 that the "hwupload" works as expected. As when changing the size, the
 "scale_cuda" accepts the new size. The problem appears when using
 "...,scale=400:300,hwupload,hwdownload,...", and the "scale" filter
 changes the resolution.

 This is a bug!

Ticket URL: <https://trac.ffmpeg.org/ticket/7564#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list