Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-21 Thread Carl Eugen Hoyos
Am Do., 21. Nov. 2019 um 17:13 Uhr schrieb Ted Park :
>
> > You cannot specify a frame size for mpeg video…
>
> Really? Do you mean the decoder ignores any frame format/doesn't use the info?

I think "ignore" is the wrong word, it's just not how video decoding works
for compressed codecs.

Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-21 Thread Ted Park
> You cannot specify a frame size for mpeg video…

Really? Do you mean the decoder ignores any frame format/doesn't use the info? 
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-21 Thread Carl Eugen Hoyos
Am Do., 21. Nov. 2019 um 10:17 Uhr schrieb Ted Park :

> > [AVHWFramesContext @ 0x3a36600] [IMGUTILS @ 0x7ffc3bcc6230] Picture
> > size 0x0 is invalid
> > [mpeg2_cuvid @ 0x3098a40] Error initializing a CUDA frame pool
> > cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
> > [mpeg2_cuvid @ 0x3098a40] ff_get_format failed: -1
>
> It seems you have to specify frame size at the very least.

You cannot specify a frame size for mpeg video...

Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-21 Thread Ted Park
> Error while opening decoder for input stream #0:0 : Operation not permitted


Is 0.0.0.0 is the actual value you used the command? The operation not 
permitted error could be referring to the tcp socket you’re opening… Though 
trying to connect to 0.0.0.0 leads to inconsistent behavior on different 
platforms, so I’m not sure. If that’s the actual address you used, I would 
change that first.

> ffmpeg -threads 1 -vsync 1 -hwaccel cuvid -c:v mpeg2_cuvid -deint 1
> -drop_second_field 1 -i 'http://0.0.0.0:46007’……


Also, you’re still getting the input via http so I would have thought you’d 
have to specify just about all of the codec parameters, but I guess on your 
first one, ffmpeg was able to figure it out through some kind of heuristic 
methods? Or from the http header indicating mpeg ts stream made it easier? What 
is the server, can you post the reply headers you get?

> [AVHWFramesContext @ 0x3a36600] [IMGUTILS @ 0x7ffc3bcc6230] Picture
> size 0x0 is invalid
> [mpeg2_cuvid @ 0x3098a40] Error initializing a CUDA frame pool
> cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
> [mpeg2_cuvid @ 0x3098a40] ff_get_format failed: -1

It seems you have to specify frame size at the very least.

Also, Dennis mentioned threading issues, which reminded me that I needed to 
mess with the number of cuda surfaces based filters I was using, if you’re 
deinterlacing and encoding using nvenc I would try 8 as a starting point.

I don’t think you should have to specify -threads 1, since the decoder doesn’t 
support any threading, it’s not going to make any, but the cuda api might be 
crippled with that option so I would just leave it out and keep it at auto.

Basically you need to know beforehand what the codec parameters are before, or 
accept there is going to be latency even if you are able to get it to detect 
the format. One last thing, keeping vsync 0 and setting output frame rate is a 
better idea imho.

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-21 Thread Carl Eugen Hoyos
Am Do., 21. Nov. 2019 um 10:01 Uhr schrieb Dennis Mungai :
>
> On Thu, 21 Nov 2019 at 06:34, Andy  wrote:
> >
> > It seems like again I hit the wall. While one mpeg2 source works with
> > the mpeg2_cuvid option, the other gives me troubles.
> >
> > ffmpeg -threads 1 -vsync 1 -hwaccel cuvid -c:v mpeg2_cuvid -deint 1
> > -drop_second_field 1 -i 'http://0.0.0.0:46007' -c:v h264_nvenc -vb
> > 1000k -preset:v medium -c:a aac -ac 2 -ar 48k -ab 96k -map 0:0 -map
> > 0:1 -f flv rtmp://0.0.0.0:1940/live/1
> > ffmpeg version N-95728-g1354c39 Copyright (c) 2000-2019 the FFmpeg 
> > developers
> >   built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
> >   configuration: --enable-cuda --enable-cuvid --enable-nvenc
> > --enable-nonfree --enable-libnpp
> > --extra-cflags=-I/usr/local/cuda/include
> > --extra-ldflags=-L/usr/local/cuda/lib64 --enable-libx264
> > --enable-libfdk-aac --enable-gpl
> >   libavutil  56. 35.101 / 56. 35.101
> >   libavcodec 58. 62.100 / 58. 62.100
> >   libavformat58. 35.100 / 58. 35.100
> >   libavdevice58.  9.100 / 58.  9.100
> >   libavfilter 7. 66.100 /  7. 66.100
> >   libswscale  5.  6.100 /  5.  6.100
> >   libswresample   3.  6.100 /  3.  6.100
> >   libpostproc55.  6.100 / 55.  6.100
> > [mpegts @ 0x3092a40] Could not find codec parameters for stream 0
> > (Video: mpeg2video ([27][0][0][0] / 0x001B), none(tv)): unspecified
> > size
> > Consider increasing the value for the 'analyzeduration' and 'probesize' 
> > options
> > Input #0, mpegts, from 'http://0.0.0.0:46007':
> >   Duration: N/A, start: 67033.565011, bitrate: 192 kb/s
> >   Program 107
> > Metadata:
> >   service_name: NTV
> >   service_provider: NTV BD
> > Stream #0:0[0x327]: Video: mpeg2video ([27][0][0][0] / 0x001B),
> > none(tv), 90k tbr, 90k tbn, 90k tbc
> > Stream #0:1[0x2c3]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
> > stereo, fltp, 192 kb/s
> > [AVHWFramesContext @ 0x3a36600] [IMGUTILS @ 0x7ffc3bcc6230] Picture
> > size 0x0 is invalid
> > [mpeg2_cuvid @ 0x3098a40] Error initializing a CUDA frame pool
> > cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
> > [mpeg2_cuvid @ 0x3098a40] ff_get_format failed: -1
> > Stream mapping:
> >   Stream #0:0 -> #0:0 (mpeg2video (mpeg2_cuvid) -> h264 (h264_nvenc))
> >   Stream #0:1 -> #0:1 (mp2 (native) -> aac (native))
> > Error while opening decoder for input stream #0:0 : Operation not permitted
>
>
> Show us the output of:
>
> ffprobe -i 'http://0.0.0.0:46007'

Don't we already see that above?

Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-21 Thread Dennis Mungai
On Thu, 21 Nov 2019 at 06:34, Andy  wrote:
>
> It seems like again I hit the wall. While one mpeg2 source works with
> the mpeg2_cuvid option, the other gives me troubles.
>
> ffmpeg -threads 1 -vsync 1 -hwaccel cuvid -c:v mpeg2_cuvid -deint 1
> -drop_second_field 1 -i 'http://0.0.0.0:46007' -c:v h264_nvenc -vb
> 1000k -preset:v medium -c:a aac -ac 2 -ar 48k -ab 96k -map 0:0 -map
> 0:1 -f flv rtmp://0.0.0.0:1940/live/1
> ffmpeg version N-95728-g1354c39 Copyright (c) 2000-2019 the FFmpeg developers
>   built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
>   configuration: --enable-cuda --enable-cuvid --enable-nvenc
> --enable-nonfree --enable-libnpp
> --extra-cflags=-I/usr/local/cuda/include
> --extra-ldflags=-L/usr/local/cuda/lib64 --enable-libx264
> --enable-libfdk-aac --enable-gpl
>   libavutil  56. 35.101 / 56. 35.101
>   libavcodec 58. 62.100 / 58. 62.100
>   libavformat58. 35.100 / 58. 35.100
>   libavdevice58.  9.100 / 58.  9.100
>   libavfilter 7. 66.100 /  7. 66.100
>   libswscale  5.  6.100 /  5.  6.100
>   libswresample   3.  6.100 /  3.  6.100
>   libpostproc55.  6.100 / 55.  6.100
> [mpegts @ 0x3092a40] Could not find codec parameters for stream 0
> (Video: mpeg2video ([27][0][0][0] / 0x001B), none(tv)): unspecified
> size
> Consider increasing the value for the 'analyzeduration' and 'probesize' 
> options
> Input #0, mpegts, from 'http://0.0.0.0:46007':
>   Duration: N/A, start: 67033.565011, bitrate: 192 kb/s
>   Program 107
> Metadata:
>   service_name: NTV
>   service_provider: NTV BD
> Stream #0:0[0x327]: Video: mpeg2video ([27][0][0][0] / 0x001B),
> none(tv), 90k tbr, 90k tbn, 90k tbc
> Stream #0:1[0x2c3]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
> stereo, fltp, 192 kb/s
> [AVHWFramesContext @ 0x3a36600] [IMGUTILS @ 0x7ffc3bcc6230] Picture
> size 0x0 is invalid
> [mpeg2_cuvid @ 0x3098a40] Error initializing a CUDA frame pool
> cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
> [mpeg2_cuvid @ 0x3098a40] ff_get_format failed: -1
> Stream mapping:
>   Stream #0:0 -> #0:0 (mpeg2video (mpeg2_cuvid) -> h264 (h264_nvenc))
>   Stream #0:1 -> #0:1 (mp2 (native) -> aac (native))
> Error while opening decoder for input stream #0:0 : Operation not permitted


Show us the output of:

ffprobe -i 'http://0.0.0.0:46007'

Secondly, are you on a Turing (TU10x-) series GPU, the RTX series?
If that's the case, then use -deint 2 in place of -deint 1.
Turing explicitly disabled interlaced encoding *but* this might not be
the case here as we don't see the nvenc encoder quit on you.

Another observation: In your ffmpeg build options, I see
--enable-cuda. If you can, rebuild that package and pass
--enable-cuda-nvcc, that previous option is deprecated. The other
option --enable-cuda-llvm can be used if you don't need scale_npp, but
it requires a working installation of clang.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-21 Thread Carl Eugen Hoyos
Am Do., 21. Nov. 2019 um 04:34 Uhr schrieb Andy :
>
> It seems like again I hit the wall. While one mpeg2 source works with
> the mpeg2_cuvid option, the other gives me troubles.
>
> ffmpeg -threads 1 -vsync 1 -hwaccel cuvid -c:v mpeg2_cuvid -deint 1
> -drop_second_field 1 -i 'http://0.0.0.0:46007' -c:v h264_nvenc -vb
> 1000k -preset:v medium -c:a aac -ac 2 -ar 48k -ab 96k -map 0:0 -map
> 0:1 -f flv rtmp://0.0.0.0:1940/live/1
> ffmpeg version N-95728-g1354c39 Copyright (c) 2000-2019 the FFmpeg developers
>   built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
>   configuration: --enable-cuda --enable-cuvid --enable-nvenc
> --enable-nonfree --enable-libnpp
> --extra-cflags=-I/usr/local/cuda/include
> --extra-ldflags=-L/usr/local/cuda/lib64 --enable-libx264
> --enable-libfdk-aac --enable-gpl
>   libavutil  56. 35.101 / 56. 35.101
>   libavcodec 58. 62.100 / 58. 62.100
>   libavformat58. 35.100 / 58. 35.100
>   libavdevice58.  9.100 / 58.  9.100
>   libavfilter 7. 66.100 /  7. 66.100
>   libswscale  5.  6.100 /  5.  6.100
>   libswresample   3.  6.100 /  3.  6.100
>   libpostproc55.  6.100 / 55.  6.100
> [mpegts @ 0x3092a40] Could not find codec parameters for stream 0
> (Video: mpeg2video ([27][0][0][0] / 0x001B), none(tv)): unspecified
> size
> Consider increasing the value for the 'analyzeduration' and 'probesize' 
> options
> Input #0, mpegts, from 'http://0.0.0.0:46007':
>   Duration: N/A, start: 67033.565011, bitrate: 192 kb/s
>   Program 107
> Metadata:
>   service_name: NTV
>   service_provider: NTV BD
> Stream #0:0[0x327]: Video: mpeg2video ([27][0][0][0] / 0x001B),
> none(tv), 90k tbr, 90k tbn, 90k tbc

Feel free to record such a sample with wget, curl or tcpdump and provide
it if it allows to reproduce the issue.

Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-20 Thread Andy
It seems like again I hit the wall. While one mpeg2 source works with
the mpeg2_cuvid option, the other gives me troubles.

ffmpeg -threads 1 -vsync 1 -hwaccel cuvid -c:v mpeg2_cuvid -deint 1
-drop_second_field 1 -i 'http://0.0.0.0:46007' -c:v h264_nvenc -vb
1000k -preset:v medium -c:a aac -ac 2 -ar 48k -ab 96k -map 0:0 -map
0:1 -f flv rtmp://0.0.0.0:1940/live/1
ffmpeg version N-95728-g1354c39 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
  configuration: --enable-cuda --enable-cuvid --enable-nvenc
--enable-nonfree --enable-libnpp
--extra-cflags=-I/usr/local/cuda/include
--extra-ldflags=-L/usr/local/cuda/lib64 --enable-libx264
--enable-libfdk-aac --enable-gpl
  libavutil  56. 35.101 / 56. 35.101
  libavcodec 58. 62.100 / 58. 62.100
  libavformat58. 35.100 / 58. 35.100
  libavdevice58.  9.100 / 58.  9.100
  libavfilter 7. 66.100 /  7. 66.100
  libswscale  5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc55.  6.100 / 55.  6.100
[mpegts @ 0x3092a40] Could not find codec parameters for stream 0
(Video: mpeg2video ([27][0][0][0] / 0x001B), none(tv)): unspecified
size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'http://0.0.0.0:46007':
  Duration: N/A, start: 67033.565011, bitrate: 192 kb/s
  Program 107
Metadata:
  service_name: NTV
  service_provider: NTV BD
Stream #0:0[0x327]: Video: mpeg2video ([27][0][0][0] / 0x001B),
none(tv), 90k tbr, 90k tbn, 90k tbc
Stream #0:1[0x2c3]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, fltp, 192 kb/s
[AVHWFramesContext @ 0x3a36600] [IMGUTILS @ 0x7ffc3bcc6230] Picture
size 0x0 is invalid
[mpeg2_cuvid @ 0x3098a40] Error initializing a CUDA frame pool
cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
[mpeg2_cuvid @ 0x3098a40] ff_get_format failed: -1
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (mpeg2_cuvid) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (mp2 (native) -> aac (native))
Error while opening decoder for input stream #0:0 : Operation not permitted
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-19 Thread Philippe Sudre-Rouffaux
Thanks

Le mar. 19 nov. 2019 à 04:07, Andy  a écrit :

> On Mon, Nov 18, 2019 at 12:35 PM Ted Park  wrote:
> >
> > I just noticed this but it some examples it seems you are specifying h264
> decoder for an input that (apparently) is mpeg? I’m not sure which is
> which, but I think cuvid and nvdec differ in the way they map or copy to
> graphics memory thought maybe that might be the difference between the logs
> (hw decoder into gpu you probably need to specify format, especially when
> its input is http, I don’t know if in ffmpeg the protocol takes mime type
> into account.) For the compilation issues, check that you have cuda nvenc
> ffnv… etc where they can be found by configure script, clean before make.
> > ___
> > ffmpeg-user mailing list
> > ffmpeg-user@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
> You are right, and all the inputs that are giving me troubles are indeed SD
> MPEG2 video mpegts format. I tried searching on how to specify input for
> hwaccel but can't find anything for mpegts
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-18 Thread Andy
This finally fixed it:

-hwaccel cuvid -c:v mpeg2_cuvid

Indeed, you need to specify the input type before transcoding!

Thank you


On Mon, Nov 18, 2019 at 12:35 PM Ted Park  wrote:
>
> I just noticed this but it some examples it seems you are specifying h264 
> decoder for an input that (apparently) is mpeg? I’m not sure which is which, 
> but I think cuvid and nvdec differ in the way they map or copy to graphics 
> memory thought maybe that might be the difference between the logs (hw 
> decoder into gpu you probably need to specify format, especially when its 
> input is http, I don’t know if in ffmpeg the protocol takes mime type into 
> account.) For the compilation issues, check that you have cuda nvenc ffnv… 
> etc where they can be found by configure script, clean before make.
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-18 Thread Andy
Unfortunately lowering threads did not help and resulted in the same error.
I noticed that all inputs that im having issues with are mpegts...

On Sun, Nov 17, 2019 at 12:33 AM Dennis Mungai  wrote:

> Hey there,
>
> Lower your decoder threads and retest:
>
> ffmpeg -threads 1 -vsync 1 -hwaccel cuvid -c:v h264_cuvid -deint 1
> -drop_second_field 1 -i 'http://0.0.0.0:4603' -c:v h264_nvenc -vb
> 1000k -preset:v medium -c:a aac -ac 2 -ar 48k -ab 96k test.mp4
>
> Now with the yadif_cuda filter:
>
> ffmpeg -threads 1 -vsync 1 -hwaccel nvdec -hwaccel_output_format cuda -i
> 'http://0.0.0.0:4603' -vf "yadif_cuda" -c:v h264_nvenc -vb 1000k
> -preset:v medium -c:a
> aac -ac 2 -ar 48k -ab 96k test.mp4
>
> For usage see:
>
> ffmpeg -h filter=yadif_cuda
>
> For what to expect, see
>
> https://stackoverflow.com/questions/55687189/how-to-use-gpu-to-accelerate-the-processing-speed-of-ffmpeg-filter/55747785#55747785
>
> Running the nvdec & cuvid decoders with multiple threads is the
> fastest way to land in hot water.
> Infact, the decoder will warn you if threads (either in auto mode or
> manually set) exceed 16. These hwaccels do not implement threading.
>
> You can confirm that by running:
>
> ffmpeg -h decoder=h264_cuvid
>
> And see that threading is not a reported capability.
>
> I also changed your commands to -vsync 1 as the MP4 muxer
> implelentation in libav supports CFR only, and NALU HRD stuffing isn't
> supported.
> Even if you're using libx264, do not use
>
> -x264-params "nal-hrd=cbr"
>
> When generating (f)mp4 content as you'll generate invalid output, with
> audio predominantly out of sync.
> If you truly require VFR output as part of your workflow, then stick
> to either mpegts (also supported in chunks via HLS or segment muxer)
> OR matroska (mkv).
>
> Cheers,
>
> Dennis M.
>
> On Sat, 16 Nov 2019 at 20:37, Ted Park  wrote:
> >
> > How is the stream being served over http? Does it make any difference if
> you save a file wget for example first?
> > ___
> > ffmpeg-user mailing list
> > ffmpeg-user@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-18 Thread Andy
On Mon, Nov 18, 2019 at 12:35 PM Ted Park  wrote:
>
> I just noticed this but it some examples it seems you are specifying h264
decoder for an input that (apparently) is mpeg? I’m not sure which is
which, but I think cuvid and nvdec differ in the way they map or copy to
graphics memory thought maybe that might be the difference between the logs
(hw decoder into gpu you probably need to specify format, especially when
its input is http, I don’t know if in ffmpeg the protocol takes mime type
into account.) For the compilation issues, check that you have cuda nvenc
ffnv… etc where they can be found by configure script, clean before make.
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

You are right, and all the inputs that are giving me troubles are indeed SD
MPEG2 video mpegts format. I tried searching on how to specify input for
hwaccel but can't find anything for mpegts
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-18 Thread Ted Park
I just noticed this but it some examples it seems you are specifying h264 
decoder for an input that (apparently) is mpeg? I’m not sure which is which, 
but I think cuvid and nvdec differ in the way they map or copy to graphics 
memory thought maybe that might be the difference between the logs (hw decoder 
into gpu you probably need to specify format, especially when its input is 
http, I don’t know if in ffmpeg the protocol takes mime type into account.) For 
the compilation issues, check that you have cuda nvenc ffnv… etc where they can 
be found by configure script, clean before make.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-16 Thread Andy
On Sun, Nov 17, 2019 at 12:33 AM Dennis Mungai  wrote:
>
> Hey there,
>
> Lower your decoder threads and retest:
>
> ffmpeg -threads 1 -vsync 1 -hwaccel cuvid -c:v h264_cuvid -deint 1
> -drop_second_field 1 -i 'http://0.0.0.0:4603' -c:v h264_nvenc -vb
> 1000k -preset:v medium -c:a aac -ac 2 -ar 48k -ab 96k test.mp4
>
> Now with the yadif_cuda filter:
>
> ffmpeg -threads 1 -vsync 1 -hwaccel nvdec -hwaccel_output_format cuda -i
> 'http://0.0.0.0:4603' -vf "yadif_cuda" -c:v h264_nvenc -vb 1000k
> -preset:v medium -c:a
> aac -ac 2 -ar 48k -ab 96k test.mp4
>
> For usage see:
>
> ffmpeg -h filter=yadif_cuda
>
> For what to expect, see
> https://stackoverflow.com/questions/55687189/how-to-use-gpu-to-accelerate-the-processing-speed-of-ffmpeg-filter/55747785#55747785
>
> Running the nvdec & cuvid decoders with multiple threads is the
> fastest way to land in hot water.
> Infact, the decoder will warn you if threads (either in auto mode or
> manually set) exceed 16. These hwaccels do not implement threading.
>
> You can confirm that by running:
>
> ffmpeg -h decoder=h264_cuvid
>
> And see that threading is not a reported capability.
>
> I also changed your commands to -vsync 1 as the MP4 muxer
> implelentation in libav supports CFR only, and NALU HRD stuffing isn't
> supported.
> Even if you're using libx264, do not use
>
> -x264-params "nal-hrd=cbr"
>
> When generating (f)mp4 content as you'll generate invalid output, with
> audio predominantly out of sync.
> If you truly require VFR output as part of your workflow, then stick
> to either mpegts (also supported in chunks via HLS or segment muxer)
> OR matroska (mkv).
>
> Cheers,
>
> Dennis M.
>
> On Sat, 16 Nov 2019 at 20:37, Ted Park  wrote:
> >
> > How is the stream being served over http? Does it make any difference if 
> > you save a file wget for example first?
> > ___
> > ffmpeg-user mailing list
> > ffmpeg-user@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Unfortunately, the first command results in the same error(i tried mkv
and flv) and second command gives me a No such filter: 'yadif_cuda'
error/ I am trying to figure out how to recompile ffmpeg with this
filter but to no avail.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-16 Thread Dennis Mungai
Hey there,

Lower your decoder threads and retest:

ffmpeg -threads 1 -vsync 1 -hwaccel cuvid -c:v h264_cuvid -deint 1
-drop_second_field 1 -i 'http://0.0.0.0:4603' -c:v h264_nvenc -vb
1000k -preset:v medium -c:a aac -ac 2 -ar 48k -ab 96k test.mp4

Now with the yadif_cuda filter:

ffmpeg -threads 1 -vsync 1 -hwaccel nvdec -hwaccel_output_format cuda -i
'http://0.0.0.0:4603' -vf "yadif_cuda" -c:v h264_nvenc -vb 1000k
-preset:v medium -c:a
aac -ac 2 -ar 48k -ab 96k test.mp4

For usage see:

ffmpeg -h filter=yadif_cuda

For what to expect, see
https://stackoverflow.com/questions/55687189/how-to-use-gpu-to-accelerate-the-processing-speed-of-ffmpeg-filter/55747785#55747785

Running the nvdec & cuvid decoders with multiple threads is the
fastest way to land in hot water.
Infact, the decoder will warn you if threads (either in auto mode or
manually set) exceed 16. These hwaccels do not implement threading.

You can confirm that by running:

ffmpeg -h decoder=h264_cuvid

And see that threading is not a reported capability.

I also changed your commands to -vsync 1 as the MP4 muxer
implelentation in libav supports CFR only, and NALU HRD stuffing isn't
supported.
Even if you're using libx264, do not use

-x264-params "nal-hrd=cbr"

When generating (f)mp4 content as you'll generate invalid output, with
audio predominantly out of sync.
If you truly require VFR output as part of your workflow, then stick
to either mpegts (also supported in chunks via HLS or segment muxer)
OR matroska (mkv).

Cheers,

Dennis M.

On Sat, 16 Nov 2019 at 20:37, Ted Park  wrote:
>
> How is the stream being served over http? Does it make any difference if you 
> save a file wget for example first?
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-16 Thread Ted Park
How is the stream being served over http? Does it make any difference if you 
save a file wget for example first?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-14 Thread Andy
No luck with -vf yadif_cuda=0:-1:0
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-14 Thread Ted Park
Try using yadif_cuda to deinterlace instead
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".