[FFmpeg-user] Error:Impossible to convert between the formats supported by the filter..

tasos tasoss at trigonongroup.com
Sun Jul 30 22:02:29 EEST 2017


Hello.
Using resize and removing scale_npp was the right way.
Thanks again :)


On 7/30/2017 2:28 AM, James Girotti wrote:
>
>
> On Jul 29, 2017 3:50 PM, "tasos" <tasoss at trigonongroup.com 
> <mailto:tasoss at trigonongroup.com>> wrote:
>
>     Hello.
>     I'm using git latest version of ffmpeg.
>     First of all i don't want to change pixel format.
>     I was just reading that inserting it is better.I should find the
>     source.
>
>
>     Well hwupload_cuda with scale_npp can be found on different sites
>     on the Internet.
>     I suppose they were using an older version or something.
>     Moreover i can understand that the patch that i was talking about
>     was inserted in ffmpeg and there is no need to talk about it.
>
>
> If you're using the latest git version of ffmpeg, then resizing should 
> be included in the h264_cuvid decoder. So you don't have to use 
> scale-npp. The decoder also includes cropping (awesome!).
>
> Check the output for -h decoder=h264_cuvid for parameters.
>
>
>     So
>     a) How do you propose to deinterlace,because as i have said
>     deinterlacing is my main problem right now!
>
>
> Let me clarify, I frequently use deinterlacing with mpeg2_cuvid. I 
> have found that bob is better than adaptive. Some video sources 
> require me to include -vf "fps=fps=30000/1001" to look right. 
> Specifically if I get a lot of messages about frames having too long 
> of a duration.
>
>
>     b) Moreover i think i should use
>
>             -vf 
>         "scale_npp=w=1280:h=-1:format=yuv420p:interp_algo=lanczos,hwdownload"
>
>
>     Right?
>
>
> Latest git version: forget about scale-npp. Use the decoder to resize, 
> GPU performance is better with resizing in the decoder than scale-npp. 
> And no bothersome hwdownload/upload_cuda, whatever. I don't know if 
> you can use the "ih" keyword with the decoder though. You might give 
> it a try.
>
> Try something like:
>
> ffmpeg -hwaccel cuvid -c:v h264_cuvid -deint bob -resize 1280x800 -i 
> foo -c:v h264_nvenc -c:a aac ./bar
>
> If the video looks jumpy, then try specifying the frame rate (whatever 
> your frame rate is, mine is usually 29.97fps):
>
> ffmpeg -hwaccel cuvid -c:v h264_cuvid -deint bob -resize 1280x800 -i 
> foo -c:v h264_nvenc -vf "fps=fps=30000/1001" -c:a aac ./bar
>
> If that isn't acceptable, you can try the other deinterlacers: 
> adaptive or weave. If those aren't good, you might have to leave it 
> interlaced or use a software deinterlacer. Software deinterlacing is 
> significantly slower and much more resource intense.
>
> I cannot give any advice on software deinterlacing, still a little 
> confusing to me what works best. Maybe someone else on the list could 
> help with that.
>
> Hope that helps!
> -J
>
>
>     Thanks again!
>
>
>
>     On 7/30/2017 1:32 AM, James Girotti wrote:
>
>         On Jul 29, 2017 1:04 PM, "tasos" <tasoss at trigonongroup.com
>         <mailto:tasoss at trigonongroup.com>> wrote:
>
>         Hello again Sir!
>         I was avoiding to disturb you but i can't find a solution on
>         my problem
>         again!
>
>
>         Please email the list and not me directly. I would like for
>         the whole
>         community to be involved.
>
>         First of all,my sources are interlaced so i want to
>         deinterlace them.
>         Every time i use
>         time ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -deint 1 or -deint 2
>         the resulted video stalls/freezes then continues and this goes
>         on and on.
>
>
>         I have not done deinterlacing with cuda h264 decoder. I have
>         not had good
>         results from the adaptive deinterlacing and mixed results with
>         bob if the
>         source isn't >75% interlaced.
>
>         That part of your command looks fine, but I usually use words
>         for the
>         -deint argument instead of numbers, shouldn't be a problem though.
>
>
>         So i have 2 questions.
>         1)How can i perform proper deinterlacing , i suppose using
>         cuda/hardware.
>         2) Every time i run the following
>
>
>           time ffmpeg -y -hwaccel cuvid -c:v h264_cuvid  \
>              -i http://85.196.57.134:8001/1:0:1:1:0:0:0:0:0:0
>         <http://85.196.57.134:8001/1:0:1:1:0:0:0:0:0:0>: \
>             -strict experimental  \
>             -vf  "hwupload_cuda,scale_npp=w=1280:h=-1:format=yuv420p:
>         interp_algo=lanczos,hwdownload,format=yuv420p" \
>             -c:v h264_nvenc \
>             -zerolatency true \
>             -preset ll \
>             -r 25 -g 50 -qmin 1 -qmax 50 \
>             -b:v 1M -maxrate 1M -bufsize 2M \
>             -codec:a aac -b:a 64k   \
>             -f flv rtmp://foobar
>
>         i get again the same old error!
>
>
>         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
>
>
>         Your filter order is mixed-up. Scale-npp filter uses cuda
>         context. So you
>         don't have to hwdownload or hwupload_cuda for just scale-npp.
>
>         Sorry, I'm away from my computer, does scale-npp have an
>         option for format?
>         Also, unless you are changing format, I don't think you have
>         to include
>         that as your source is yuv420p. Anyway, you have the same
>         problem as
>         before. The last format statement in your filter parameters
>         would be a
>         software filter, see my last email if you really want to
>         change pixel
>         format.
>
>
>         Of course if i remove hwupload_cuda then everything works fine.
>         I have used scale_npp because i wanted to scale on hardware
>         and now i can't
>         use it(or at least hwupload_cuda is not accepted).
>         What am i doing wrong?
>
>
>         Thank you very much and if you want me to post this email on
>         the mailing
>         list please let me know(so people will know that you have
>         answered my
>         question again).
>
>         ps:I was reading
>         http://developer.download.nvidia.com/compute/redist/
>         <http://developer.download.nvidia.com/compute/redist/>
>         ffmpeg/1511-patch/FFMPEG-with-NVIDIA-Acceleration-on-Ubuntu_UG_v01.pdf
>         and there is a patch for ffmpeg http://developer.download.
>         nvidia.com/compute/redist/ffmpeg/1511-patch/ffmpeg_
>         <http://nvidia.com/compute/redist/ffmpeg/1511-patch/ffmpeg_>
>         NVIDIA_gpu_acceleration.patch
>         in order to enable the  --enable-nvresize option. Of course
>         this patch is
>         for a specific git commit(2015).I was wondering about nvresize
>         and if you
>         know something more.
>
>
>          From what I've read nvresize is the same as scale-npp or it
>         was depricated.
>         It certainly is in newest ffmpeg version.
>
>         That said:
>
>         I'm way ahead of myself. I should have asked in the beginning
>         which version
>         of ffmpeg you're using. My answers will depend on your
>         version. Also, send
>         the output of:
>
>         ffmpeg -h decoder=h264_cuvid
>
>         And
>
>         ffmpeg -h filter=scale_npp
>
>         -J
>
>         On 7/25/2017 1:24 AM, James Girotti wrote:
>
>
>
>         On Mon, Jul 24, 2017 at 2:57 PM, tasos
>         <tasoss at trigonongroup.com <mailto:tasoss at trigonongroup.com>>
>         wrote:
>
>             Hello and thanks for replying.
>             Your information is very useful and i thank you!
>
>         You're welcome!
>
>         My colleague uses an older version of ffmpeg and the specific
>         combination
>
>             (including pix_fmt)
>
>                 ffmpeg -y -hwaccel cuvid    -c:v h264_cuvid
>
>             works without any errors.That was my question.I thought i
>             was doing
>             something wrong or whatever.So i suppose that something
>             has changed
>             from his version until mine(git latest).
>             So i have removed -pix_fmt yuv420p and everything works fine.
>             I also would like to search about the hwdownload option
>             you have entered.
>
>         This is important if you want to use any software video filters.
>
>
>             I don't want to change the pixel format(i don't know why
>             you have thought
>             about it).
>
>         Just in case you were trying to change pixel format, I
>         couldn't tell from
>         your initial email.
>
>
>             Is this the correct way to go?
>
>                 ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -deint 1
>                 -vsync 1 -timeout
>                 999999 -i foo \
>                 -map 0:v -c:v h264_nvenc -preset slow -profile:v high
>                 -b:v 1300k  -map
>                 0:a:0 -c:a libfdk_aac -ac 2 -b:a 64k -strict
>                 experimental  \
>                 -f flv bar
>
>         It looks fine as far as full hardware transcoding. I did get
>         an error that
>         there is no such option '-timeout', so you might also
>         encounter that. And
>         of course you can tweak the other parameters to your use-case,
>         i.e. bitrate
>
>
>             Thanks again for your reply it was very useful and
>             answered my question :)
>
>         Good luck! I'll try to help if you have any more problems.
>
>         -J
>         _______________________________________________
>         ffmpeg-user mailing list
>         ffmpeg-user at ffmpeg.org <mailto:ffmpeg-user at ffmpeg.org>
>         http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>         <http://ffmpeg.org/mailman/listinfo/ffmpeg-user>
>
>         To unsubscribe, visit link above, or email
>         ffmpeg-user-request at ffmpeg.org
>         <mailto:ffmpeg-user-request at ffmpeg.org> with subject
>         "unsubscribe".
>
>
>
>



More information about the ffmpeg-user mailing list