Re: [FFmpeg-user] Initialising hardware device fails with error -17

2024-04-22 Thread Dennis Mungai
On Mon, 22 Apr 2024, 18:25 Martin Stenzel via ffmpeg-user, <
ffmpeg-user@ffmpeg.org> wrote:

>
> Hi,
>
> yes, I did so, but it did not help, see here
>
> vainfo
> Trying display: wayland
> Trying display: x11
> libva info: VA-API version 1.20.0
> libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
> libva info: Found init function __vaDriverInit_1_20
> libva info: va_openDriver() returns 0
> vainfo: VA-API version: 1.20 (libva 2.20.1)
> vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics -
> 24.1.3 ()
> vainfo: Supported profile and entrypoints
> ...
>
> I again receive this error.
>
> [AVHWDeviceContext @ 0x55be64a65600] libva: VA-API version 1.20.0
> [AVHWDeviceContext @ 0x55be64a65600] libva: User requested driver 'iHD'
> [AVHWDeviceContext @ 0x55be64a65600] libva: Trying to open
> /usr/lib64/dri/iHD_drv_video.so
> [AVHWDeviceContext @ 0x55be64a65600] libva: Found init function
> __vaDriverInit_1_20
> [AVHWDeviceContext @ 0x55be64a65600] libva: va_openDriver() returns 0
> [AVHWDeviceContext @ 0x55be64a65600] Initialised VAAPI connection: version
> 1.20
> [AVHWDeviceContext @ 0x55be64a65600] VAAPI driver: Intel iHD driver for
> Intel(R) Gen Graphics - 24.1.3 ().
> [AVHWDeviceContext @ 0x55be64a65600] Driver not found in known nonstandard
> list, using standard behaviour.
> [AVHWDeviceContext @ 0x55be64a65140] Use Intel(R) oneVPL to create MFX
> session, API version is 2.10, the required implementation version is 1.3
> [AVHWDeviceContext @ 0x55be64a65140] Initialize MFX session:
> implementation version is 1.35
> [AVHWDeviceContext @ 0x55be64a65140] Error setting child device handle: -17
> Device creation failed: -1313558101.
> Failed to set value 'qsv:hw,child_device=/dev/dri/renderD128' for option
> 'init_hw_device': Unknown error occurred
> Error parsing global options: Unknown error occurred
>
>
> Martin.
>
>
>
>
>
> On Monday, 22 April, 2024 14:51 CEST, "Xiang, Haihao" <
> haihao.xiang-at-intel@ffmpeg.org> wrote:
>
> [...]
> [AVHWDeviceContext @ 0x560662049440] libva: VA-API version 1.20.0
> [AVHWDeviceContext @ 0x560662049440] libva: User requested driver 'iHD'
> [AVHWDeviceContext @ 0x560662049440] libva: Trying to open
> /usr/lib64/dri/iHD_drv_video.so
> [AVHWDeviceContext @ 0x560662049440] libva: Found init function
> __vaDriverInit_1_15
> [AVHWDeviceContext @ 0x560662049440] libva: va_openDriver() returns 0
> [AVHWDeviceContext @ 0x560662049440] Initialised VAAPI connection: version
> 1.20
> [AVHWDeviceContext @ 0x560662049440] VAAPI driver: Intel iHD driver for
> Intel(R) Gen Graphics - 24.1.3 ().
>
> VA-API version is 1.20 however your driver was built against 1.15, could
> you rebuild your driver against vaapi 1.20 ?
>
> BRs
> Haihao
>
>
> ___
> 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".
>
> --
> Martin Stenzel · er/ihm · he/him
> m.sten...@mail.xy-space.de
>
> An der Drehscheibe 9
> D-50733 Köln · Cologne
> Deutschland · Germany
>


Install the runtime components and retest:


sudo zypper install -y \
  intel-level-zero-gpu level-zero  \
  intel-media-driver libigfxcmrt7 libvpl2 libvpl-tools libmfxgen1 libmfx1

>
___
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] QUESTION ABOUT VIDEO CODECS : LIBX264 vs LIBX265

2024-03-31 Thread Dennis Mungai
On Sun, 31 Mar 2024 at 19:15, Hervé ANSELME <
hervea95-at-hotmail@ffmpeg.org> wrote:

> Hi all,
>
> I have a question about re-encoding a source video having libx264 video
> codec.
>
> Is there any advantage(s) to re-encode with the libx265, which is supposed
> to give better result than libx264 ?
>
> In other words, re-encoding with the x265 codec for the final video : can
> it improve the final video quality, compared to the source video, when the
> source video is encoded with x264 ?
>
> Thanks for your answers.
>
> Regards,
> HA
>

Quick answers:

Is there any advantage(s) to re-encode with libx265, which is supposed to
give better results than libx264 ?

Yes, *if* the target bitrate(s) are expected to be lower to fit within
specific constraints, such as live streaming and archival, and with an
acceptable trade off in quality for saved bandwidth & storage.
Even then, the target encoder(s) must be tuned specifically for the
workload(s) in question.

In other words, re-encoding with the x265 codec for the final video : can
it improve the final video quality, compared to the source video, when the
source video is encoded with x264 ?

No, video quality will actually degrade. Both are lossy codecs by design.
___
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] How to use libplacebo with FFmpeg?

2024-03-26 Thread Dennis Mungai
On Wed, 27 Mar 2024 at 01:49, Hartman Tam  wrote:

> On 26/03/2024 22:19, Dennis Mungai wrote:
> > You can start with
> >
> > ffmpeg -h filter=libplacebo
> >
> > Google's first result on a usable example demonstrating upscaling with
> this
> > filter:https://stackoverflow.com/a/76793322/4675388
> > ___
> > 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".
>
> Tried. Nope.
>
> `
> $ ffmpeg -h filter=libplacebo
> ffmpeg version 6.1-1build2~22.04 Copyright (c) 2000-2023 the FFmpeg
> developers
>built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
>configuration: --prefix=/usr --extra-version='1build2~22.04'
> --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
> --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl
> --disable-stripping --disable-librav1e --enable-gnutls --enable-ladspa
> --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b
> --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d
> --enable-libflite --enable-libfontconfig --enable-libfreetype
> --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm
> --enable-libjack --enable-libmp3lame --enable-libmysofa
> --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse
> --enable-librabbitmq --enable-librist --enable-librubberband
> --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex
> --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame
> --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp
> --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
> --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal
> --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio
> --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libvpl
> --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883
> --enable-chromaprint --enable-frei0r --enable-libsvtav1 --enable-libx264
> --enable-libplacebo --disable-librav1e --enable-shared
>WARNING: library configuration mismatch
>avcodec configuration: --prefix=/usr
> --extra-version='1build2~22.04' --toolchain=hardened
> --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu
> --arch=amd64 --enable-gpl --disable-stripping --disable-librav1e
> --enable-gnutls --enable-ladspa --enable-libaom --enable-libass
> --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio
> --enable-libcodec2 --enable-libdav1d --enable-libflite
> --enable-libfontconfig --enable-libfreetype --enable-libfribidi
> --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack
> --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg
> --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq
> --enable-librist --enable-librubberband --enable-libshine
> --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt
> --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab
> --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265
> --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq
> --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl
> --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl
> --enable-pocketsphinx --enable-librsvg --enable-libvpl --disable-libmfx
> --enable-libdc1394 --enable-libdrm --enable-libiec61883
> --enable-chromaprint --enable-frei0r --enable-libsvtav1 --enable-libx264
> --enable-libplacebo --disable-librav1e --enable-shared --enable-version3
> --disable-doc --disable-programs --disable-static --enable-libaribb24
> --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract
> --enable-libvo_amrwbenc --enable-libsmbclient
>libavutil  58. 29.100 / 58. 29.100
>libavcodec 60. 31.102 / 60. 31.102
>libavformat60. 16.100 / 60. 16.100
>libavdevice60.  3.100 / 60.  3.100
>libavfilter 9. 12.100 /  9. 12.100
>libswscale  7.  5.100 /  7.  5.100
>libswresample   4. 12.100 /  4. 12.100
>libpostproc57.  3.100 / 57.  3.100
> Unknown filter 'libplacebo'.
>
> `
>
> Despite the `--enable-libplacebo` is in the config flag, it can't find
> the libplacebo filter. Neither with `ffmpeg -filter` either
>
> `
> $ ffmpeg -filters | grep placebo
> ffmpeg version 6.1-1build2~22.04 Copyright (c) 2000-2023 the FFmpeg
> developers
>built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
>configuration: --

Re: [FFmpeg-user] How to use libplacebo with FFmpeg?

2024-03-26 Thread Dennis Mungai
On Wed, 27 Mar 2024 at 01:07, Hartman Tam  wrote:

> Hello all,
>
> As subject. I found out libplacebo is enabled on FFmpeg but I couldn't
> find any documentation associated with it. Can anyone guide me on how to
> use it? I want to upscale some old video I got using GLSL shaders.
>
> Thanks,
> Hartman
>

You can start with

ffmpeg -h filter=libplacebo

Google's first result on a usable example demonstrating upscaling with this
filter: https://stackoverflow.com/a/76793322/4675388
___
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] ISSUE WITH LIBX265 CODEC

2024-02-27 Thread Dennis Mungai
On Tue, 27 Feb 2024 at 21:08, Hervé ANSELME <
hervea95-at-hotmail@ffmpeg.org> wrote:

> Hello,
>
> I have an issue using ffmpeg, release 6.1, running on OS windows 11
> family, with the libx265 codec : in the final film ( the re-encoded one )
> there is sound but no image, no video.
>
> As I'm a basic user of ffmpeg, can an advanced user help me to solve this
> issue ?
>
> To do that, what would be the useful infos ( about the ffmpeg command line
> I use to re-encode ; about my OS ; about anything else ) which would help
> to solve the issue ?
>
> And how can I get these infos ?
>
> Thanks for your help.
>
> Regards,
> HA
>


Provide the complete, uncut ffmpeg command(s) used and the console output
for the same.
___
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-devel] FFmpeg's HLS muxer's deprecation of the hls_wrap option

2024-01-22 Thread Dennis Mungai
On Mon, 22 Jan 2024 at 13:10, Steven Liu  wrote:

> Dennis Mungai  于2024年1月21日周日 00:42写道:
>
> > >
> > Perfect, and thanks for considering a revert of this deprecated feature.
>
> Hi Dennis,
>
> Need more talk, Why don't try to use hls_flags
> +delete_segments+append_list. ?
>
>
> Thanks
> Steven
>

As stated earlier, even with these flags, we cannot replicate the advantage
of the deprecated -hls_wrap whereby the segment names remain constant.
append_list only omits the #EXT-EXT-ENDLIST tag.
___
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-devel] FFmpeg's HLS muxer's deprecation of the hls_wrap option

2024-01-20 Thread Dennis Mungai
On Sat, 20 Jan 2024 at 18:42, Steven Liu  wrote:

> Dennis Mungai 于2024年1月20日 周六23:15写道:
>
> > On Sat, 20 Jan 2024, 6:09 pm Steven Liu, 
> wrote:
> >
> > > Dennis Mungai 于2024年1月20日 周六21:02写道:
> > >
> > > > Hello,
> > > >
> > > > Is there a valid technical reason as to why FFmpeg's HLS muxer
> dropped
> > > the
> > > > hls_wrap option?
> > >
> > >
> > > eg. three player playing the list and every fragment less or equal 1
> > second
> > > ,
> > > 1. Player 1 from fragment1, fragment2
> > > 2. Now Player 2 from fragment 1, fragment 2,
> > > 3. Now Player 3 from fragment 1, Fragment2 and Player 1 playing
> fragment
> > 3
> > > 4. Network transport with player 3 get loss packet
> > > 5. Player 1 playing new fragment 1, new fragment 2
> > > 6. Player 2 playing fragment 3
> > > 7. Player 3 blocking always because the fragments are flashing too
> fast.
> > >
> > > So the commit message said it is not friendly to downstream users.
> > >
> > > I have no more better way to fix it with ffmpeg, but I think that
> commit
> > > can be revert if you want use hls_wrap.
> > >
> > >
> > > > There are many cases where the hls_wrap option remains critical so as
> > to
> > > > preserve the set of output file names without increments. This
> > > deprecation
> > > > breaks that.
> > > >
> > > > For now, this behavior can be worked around by switching to the
> segment
> > > > muxer and then setting the -segment_wrap option therein, but its' not
> > an
> > > > ideal solution.
> > > >
> > > > Kindly review this deprecation, with an appeal to revert the
> patchwork
> > > that
> > > > removed the hls_wrap option.
> > > >
> > > > Warm regards,
> > > >
> > > > Dennis.
> > >
> >
> > Steven,
> >
> > The option should've been left intact, *but* with a warning on its
> > implications on usage.
>
> Dennis,
>
> agreed with you, let me think about that.
>
> > Multiple ffmpeg flags have similar edge case impacts
> > when used improperly, eg -copyts and non monotonous timestamps, but
> they're
> > not deprecated; they're still in place.
> >
> > >
>
>
> Thanks
> Steven
>
>
>
Perfect, and thanks for considering a revert of this deprecated feature.
___
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-devel] FFmpeg's HLS muxer's deprecation of the hls_wrap option

2024-01-20 Thread Dennis Mungai
On Sat, 20 Jan 2024, 6:09 pm Steven Liu,  wrote:

> Dennis Mungai 于2024年1月20日 周六21:02写道:
>
> > Hello,
> >
> > Is there a valid technical reason as to why FFmpeg's HLS muxer dropped
> the
> > hls_wrap option?
>
>
> eg. three player playing the list and every fragment less or equal 1 second
> ,
> 1. Player 1 from fragment1, fragment2
> 2. Now Player 2 from fragment 1, fragment 2,
> 3. Now Player 3 from fragment 1, Fragment2 and Player 1 playing fragment 3
> 4. Network transport with player 3 get loss packet
> 5. Player 1 playing new fragment 1, new fragment 2
> 6. Player 2 playing fragment 3
> 7. Player 3 blocking always because the fragments are flashing too fast.
>
> So the commit message said it is not friendly to downstream users.
>
> I have no more better way to fix it with ffmpeg, but I think that commit
> can be revert if you want use hls_wrap.
>
>
> > There are many cases where the hls_wrap option remains critical so as to
> > preserve the set of output file names without increments. This
> deprecation
> > breaks that.
> >
> > For now, this behavior can be worked around by switching to the segment
> > muxer and then setting the -segment_wrap option therein, but its' not an
> > ideal solution.
> >
> > Kindly review this deprecation, with an appeal to revert the patchwork
> that
> > removed the hls_wrap option.
> >
> > Warm regards,
> >
> > Dennis.
>


Steven,

The option should've been left intact, *but* with a warning on its
implications on usage. Multiple ffmpeg flags have similar edge case impacts
when used improperly, eg -copyts and non monotonous timestamps, but they're
not deprecated; they're still in place.

>
___
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] FFmpeg's HLS muxer's deprecation of the hls_wrap option

2024-01-20 Thread Dennis Mungai
Hello,

Is there a valid technical reason as to why FFmpeg's HLS muxer dropped the
hls_wrap option?
There are many cases where the hls_wrap option remains critical so as to
preserve the set of output file names without increments. This deprecation
breaks that.

For now, this behavior can be worked around by switching to the segment
muxer and then setting the -segment_wrap option therein, but its' not an
ideal solution.

Kindly review this deprecation, with an appeal to revert the patchwork that
removed the hls_wrap option.

Warm regards,

Dennis.
___
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] Intel QSV and xstack_qsv: Error while filtering: Internal bug, should not have happened

2023-12-27 Thread Dennis Mungai
On Thu, 28 Dec 2023, 05:15 Xiang, Haihao, <
haihao.xiang-at-intel@ffmpeg.org> wrote:

>
> > I have created a bug and linked a sample video that changes resolutions
> on the
> > fly:
> >
> > https://trac.ffmpeg.org/ticket/10762
> >
> > Get back to me if you need anything else I can help with.
> > ____________
> > From: ffmpeg-user  on behalf of Dennis
> Mungai
> > 
> > Sent: Wednesday, December 27, 2023 11:38 AM
> > To: FFmpeg user questions 
> > Cc: Haihao ;
> > artem.ga...@gmail.com ;
> > fei.w.w...@intel.com 
> > Subject: Re: [FFmpeg-user] Intel QSV and xstack_qsv: Error while
> filtering:
> > Internal bug, should not have happened
> >
> > [You don't often get email from dmng...@gmail.com. Learn why this is
> important
> > at https://aka.ms/LearnAboutSenderIdentification ]
> >
> > This email originated from outside Innovative Systems. Do not click
> links or
> > open attachments unless you recognize the sender and know the content is
> safe.
> >
> >
> > On Wed, 27 Dec 2023 at 18:40, Shane Warren  wrote:
> >
> > >
> > > I'm testing out an Intel Flex 140 card and I am attempting to
> transcode 4
> > > inputs to 1 output using the xstack_qsv filter.  My command takes in 4
> udp
> > > multicast ts files (h264 encoded) and outputs one h264_qsv encoded udp
> > > transport stream. My command looks like so:
> > >
> > > /tmp/ffmpeg_g  -nostats -loglevel verbose -init_hw_device
> > > qsv=card1:/dev/dri/card1 -hwaccel_device card1 -filter_hw_device card1
>
> Please use a render node instead, and you should use the key of
> child_device if
> you want to use a non-default render node:
>
> qsv=card1,child_device=/dev/dri/renderD129 -hwaccel_device card1 -
> filter_hw_device card1
>
>
> > > -fflags discardcorrupt  -fflags +genpts -fflags discardcorrupt  \
> > > -hwaccel qsv -hwaccel_output_format qsv -thread_queue_size 4096
> > > -async_depth 1 -i "udp://@
> > >
> 225.105.0.1:10102?fifo_size=214688_size=851968=80
> > > _nonfatal=1"
> > > \
> > > -hwaccel qsv -hwaccel_output_format qsv -thread_queue_size 4096
> > > -async_depth 1 -i "udp://@
> > >
> 225.105.0.14:10102?fifo_size=214688_size=851968=80
> > > n_nonfatal=1"
> > > \
> > > -hwaccel qsv -hwaccel_output_format qsv -thread_queue_size 4096
> > > -async_depth 1 -i "udp://@
> > >
> 225.105.0.5:10102?fifo_size=214688_size=851968=80
> > > _nonfatal=1"
> > > \
> > > -hwaccel qsv -hwaccel_output_format qsv -thread_queue_size 4096
> > > -async_depth 1 -i "udp://@
> > >
> 225.105.0.4:10102?fifo_size=214688_size=851968=80
> > > _nonfatal=1"
> > > \
> > > -noautoscale -filter_complex "\
> > > [0:v]vpp_qsv=deinterlace=2:w=720:h=480:framerate=3/1001[v1]; \
> > > [1:v]vpp_qsv=deinterlace=2:w=720:h=480:framerate=3/1001[v2]; \
> > > [2:v]vpp_qsv=deinterlace=2:w=720:h=480:framerate=3/1001[v3]; \
> > > [3:v]vpp_qsv=deinterlace=2:w=720:h=480:framerate=3/1001[v4]; \
> > > [v1][v2][v3][v4]
> xstack_qsv=inputs=4:layout=0_0|0_h0|w0_0|w0_h0[mosiac]; \
> > > [mosiac]vpp_qsv=w=1920:h=1080,hwdownload,format=nv12,pad=1920:1080:(ow-
> > > iw)/2:(oh-ih)/2,hwupload=extra_hw_frames=64,format=qsv[v]"
>
> -c:v h264_qsv encoder can accept data in system memory, you may remove
> 'hwupload=extra_hw_frames=64,format=qsv' from the filtergraph.
>
> If you want to use hwupload filter to upload data from system memory to
> video
> memory before -c:v h264_qsv encoder, could you try with
> https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=10318 which
> added the
> support for dynamic frame pool in qsv (Note a newer version of
> oneVPL-intel-gpu
> is required, you may download oneVPL-intel-gpu from
> https://github.com/oneapi-src/oneVPL-intel-gpu/tags , and should not use
> extra_hw_frame=64 anymore )
>
> Thanks
> Haihao
>
>
> > > \
> > > -map "[v]" -map 0:a:0 -map 1:a:0 -map 2:a:0 -map 3:a:0 \
> > > -c:v h264_qsv -noautoscale -async_depth 1 -scenario livestreaming -r:v
> > > 3/1001 -b:v 6000k -minrate:v 6000k -maxrate:v 6000k -bufsize:v
> 12000k
> > > -threads 1 -profile:v high -bf:v 0 -g:v 15 \
> > > -filter:a "aresample=async=1" -c:a aac -ac:a 2 -ar:a 48000 -b:a 192k
> > > -fps_mode auto \
> > > -f mpegts -muxrate 7450599 -pes_payload_size 1528 "udp://@
> > >
&

Re: [FFmpeg-user] Intel QSV and xstack_qsv: Error while filtering: Internal bug, should not have happened

2023-12-27 Thread Dennis Mungai
On Wed, 27 Dec 2023 at 18:40, Shane Warren  wrote:

>
> I'm testing out an Intel Flex 140 card and I am attempting to transcode 4
> inputs to 1 output using the xstack_qsv filter.  My command takes in 4 udp
> multicast ts files (h264 encoded) and outputs one h264_qsv encoded udp
> transport stream. My command looks like so:
>
> /tmp/ffmpeg_g  -nostats -loglevel verbose -init_hw_device
> qsv=card1:/dev/dri/card1 -hwaccel_device card1 -filter_hw_device card1
> -fflags discardcorrupt  -fflags +genpts -fflags discardcorrupt  \
> -hwaccel qsv -hwaccel_output_format qsv -thread_queue_size 4096
> -async_depth 1 -i "udp://@
> 225.105.0.1:10102?fifo_size=214688_size=851968=80_nonfatal=1"
> \
> -hwaccel qsv -hwaccel_output_format qsv -thread_queue_size 4096
> -async_depth 1 -i "udp://@
> 225.105.0.14:10102?fifo_size=214688_size=851968=80_nonfatal=1"
> \
> -hwaccel qsv -hwaccel_output_format qsv -thread_queue_size 4096
> -async_depth 1 -i "udp://@
> 225.105.0.5:10102?fifo_size=214688_size=851968=80_nonfatal=1"
> \
> -hwaccel qsv -hwaccel_output_format qsv -thread_queue_size 4096
> -async_depth 1 -i "udp://@
> 225.105.0.4:10102?fifo_size=214688_size=851968=80_nonfatal=1"
> \
> -noautoscale -filter_complex "\
> [0:v]vpp_qsv=deinterlace=2:w=720:h=480:framerate=3/1001[v1]; \
> [1:v]vpp_qsv=deinterlace=2:w=720:h=480:framerate=3/1001[v2]; \
> [2:v]vpp_qsv=deinterlace=2:w=720:h=480:framerate=3/1001[v3]; \
> [3:v]vpp_qsv=deinterlace=2:w=720:h=480:framerate=3/1001[v4]; \
> [v1][v2][v3][v4] xstack_qsv=inputs=4:layout=0_0|0_h0|w0_0|w0_h0[mosiac]; \
> [mosiac]vpp_qsv=w=1920:h=1080,hwdownload,format=nv12,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,hwupload=extra_hw_frames=64,format=qsv[v]"
> \
> -map "[v]" -map 0:a:0 -map 1:a:0 -map 2:a:0 -map 3:a:0 \
> -c:v h264_qsv -noautoscale -async_depth 1 -scenario livestreaming -r:v
> 3/1001 -b:v 6000k -minrate:v 6000k -maxrate:v 6000k -bufsize:v 12000k
> -threads 1 -profile:v high -bf:v 0 -g:v 15 \
> -filter:a "aresample=async=1" -c:a aac -ac:a 2 -ar:a 48000 -b:a 192k
> -fps_mode auto \
> -f mpegts -muxrate 7450599 -pes_payload_size 1528 "udp://@
> 229.100.100.44:10102?pkt_size=1316_size=9=7450599_bits=10528
> "
>
> The issue is eventually stream 1 changes resolution from 1280x720
> (progressive) to 1920x1080 (interlaced). The stream dies with the following
> logs coming out:
>
> [h264_qsv @ 0x55a240e68000] Error submitting the frame for encoding.
> [vost#0:0/h264_qsv @ 0x55a240e30780] Error submitting video frame to the
> encoder
> Error while filtering: Internal bug, should not have happened
>
> I can transcode the single stream that changes resolution on its own and
> it can survive a resolution change using this command:
>
> /tmp/ffmpeg_g  -nostats -loglevel verbose -init_hw_device
> qsv=card1:/dev/dri/card1 -hwaccel_device card1 -filter_hw_device card1
> -fflags discardcorrupt  -fflags +genpts -fflags discardcorrupt  -hwaccel
> qsv -hwaccel_output_format qsv -async_depth 1 -i "udp://@
> 225.105.0.1:10102?fifo_size=214688_size=851968=80_nonfatal=1"
> -vf "vpp_qsv=deinterlace=2:w=1920:h=1080:framerate=3/1001" -map "0:v"
> -map 0:a:0 -c:v h264_qsv -noautoscale  -async_depth 1 -scenario
> livestreaming -r:v 3/1001 -b:v 5000k -minrate:v 5000k -maxrate:v 5000k
> -bufsize:v 1k -a53cc 1 -forced_idr 1 -threads 1 -profile:v high -bf:v 0
> -g:v 15 -filter:a "aresample=async=1" -c:a aac -ac:a 2 -ar:a 48000 -b:a
> 192k -fps_mode auto -f mpegts -muxrate 6450599 -pes_payload_size 1528
> "udp://@
> 229.100.100.44:10102?pkt_size=1316_size=9=6450599_bits=10528
> "
>
> When that stream changes resolution I see these come out in the log, and
> the stream carries on without dying:
>
> [h264_qsv @ 0x561bc472f8c0] Video parameter change
> [AVHWDeviceContext @ 0x7f313000d1c0] VAAPI driver: Intel iHD driver for
> Intel(R) Gen Graphics - 23.2.4 ().
> [AVHWDeviceContext @ 0x7f313000d1c0] Driver not found in known nonstandard
> list, using standard behaviour.
> [h264_qsv @ 0x561bc472f8c0] Decoder: output is video memory surface
>
> My quesiton is why does the stream die when using xstack_qsv but works
> fine on its own.
>

This is definitely a bug, something to do with frame pool setting(s) in
that filter chain. You may want to open a ticket for this on ffmpeg trac.
The xstack_qsv may need a dynamic frame pool workaround to address this
anomaly on video parameter changes.
Adding in the Intel guys on this one.
___
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's H264 and HEVC QSV encoder wrappers not obeying the set GOP size parameter value via -g:v

2023-12-17 Thread Dennis Mungai
On Mon, 18 Dec 2023 at 02:23, Dennis Mungai  wrote:

> On Mon, 18 Dec 2023 at 00:55, Dennis Mungai  wrote:
>
>> Hello there,
>>
>> As tested with FFmpeg 6.1 and git tip master, FFmpeg's H.264 and HEVC QSV
>> encoder wrappers, ie h264_qsv and hevc_qsv are not accepting the configured
>> GOP size(s) set via the generic option -g:v.
>>
>> A trivial command such as the one shows below demonstrates the failure:
>>
>> ffmpeg -thread_queue_size 5120 -nostdin -y -fflags +genpts -y \
>> -init_hw_device vaapi=va:/dev/dri/renderD129 \
>> -init_hw_device qsv=qs@va \
>> -filter_hw_device qs \
>> -extra_hw_frames 64 \
>> -threads:v 2 -async 1 \
>> -probesize 10M -analyzeduration 10M \
>> -f mpegts -fix_teletext_pts 1 -scan_all_pmts 1 -merge_pmt_versions 1 \
>> -i "input.ts" \
>> -vf 
>> 'hwmap=derive_device=qsv,format=qsv,vpp_qsv=deinterlace=2:scale_mode=0:async_depth=4'
>>  \
>> -sc_threshold 0 -strict -1 -bitrate_limit:v 0 -g:v 50 -async_depth:v 4 
>> -look_ahead_depth:v 40 \
>> -preset:v medium -refs:v 5 -extbrc:v 1 -bf:v 0 -low_power:v 1 -r:v 25 \
>> -b:v 4500k -minrate:v 4500k -maxrate:v 4500k -bufsize:v 9000k 
>> -rc_init_occupancy:v 4500k -c:v h264_qsv \
>> -c:a aac -ac 2 -b:a 128k \
>> -flags -global_header+cgop -max_muxing_queue_size 2048 -max_interleave_delta 
>> 0 -flush_packets 0 -fps_mode cfr -f mpegts \
>> -y "out.ts"
>>
>>
>> And when the output is analyzed with ffprobe via:
>>
>> ffprobe -select_streams v -show_entries frame=pict_type,pts_time -of csv=p=0 
>> -skip_frame nokey -i filter.ts > Iframes.txt
>>
>>
>> The GOP distance is clearly set to 10, instead of the specified value of
>> 2:
>>
>> less Iframes.txt
>> 2.981333,I
>> 13.221333,I
>> 23.461333,I
>> 33.701333,I
>> 43.941333,I
>> 54.181333,I
>> 64.421333,I
>> 74.661333,I
>> 84.901333,I
>> 95.141333,I
>> 105.381333,I
>> 115.621333,I
>> 125.861333,I
>> 136.101333,I
>> 146.341333,I
>> 156.581333,I
>> 166.821333,I
>>
>>
>> I'll attach the sample file below demonstrating the anomalous GOP size
>> issue after encoding.
>> Copying in Xiang and Artem.
>>
>> Warm regards,
>>
>> Dennis.
>>
>

Hello there,

I fixed it. The root cause of this anomaly is due to the external bit rate
control mode in use (-extbrc 1) which also enables mini-GOPs and scenecut
detection.
Both of these options can be disabled by passing  -adaptive_i 0 -adaptive_b
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's H264 and HEVC QSV encoder wrappers not obeying the set GOP size parameter value via -g:v

2023-12-17 Thread Dennis Mungai
On Mon, 18 Dec 2023 at 00:55, Dennis Mungai  wrote:

> Hello there,
>
> As tested with FFmpeg 6.1 and git tip master, FFmpeg's H.264 and HEVC QSV
> encoder wrappers, ie h264_qsv and hevc_qsv are not accepting the configured
> GOP size(s) set via the generic option -g:v.
>
> A trivial command such as the one shows below demonstrates the failure:
>
> ffmpeg -thread_queue_size 5120 -nostdin -y -fflags +genpts -y \
> -init_hw_device vaapi=va:/dev/dri/renderD129 \
> -init_hw_device qsv=qs@va \
> -filter_hw_device qs \
> -extra_hw_frames 64 \
> -threads:v 2 -async 1 \
> -probesize 10M -analyzeduration 10M \
> -f mpegts -fix_teletext_pts 1 -scan_all_pmts 1 -merge_pmt_versions 1 \
> -i "input.ts" \
> -vf 
> 'hwmap=derive_device=qsv,format=qsv,vpp_qsv=deinterlace=2:scale_mode=0:async_depth=4'
>  \
> -sc_threshold 0 -strict -1 -bitrate_limit:v 0 -g:v 50 -async_depth:v 4 
> -look_ahead_depth:v 40 \
> -preset:v medium -refs:v 5 -extbrc:v 1 -bf:v 0 -low_power:v 1 -r:v 25 \
> -b:v 4500k -minrate:v 4500k -maxrate:v 4500k -bufsize:v 9000k 
> -rc_init_occupancy:v 4500k -c:v h264_qsv \
> -c:a aac -ac 2 -b:a 128k \
> -flags -global_header+cgop -max_muxing_queue_size 2048 -max_interleave_delta 
> 0 -flush_packets 0 -fps_mode cfr -f mpegts \
> -y "out.ts"
>
>
> And when the output is analyzed with ffprobe via:
>
> ffprobe -select_streams v -show_entries frame=pict_type,pts_time -of csv=p=0 
> -skip_frame nokey -i filter.ts > Iframes.txt
>
>
> The GOP distance is clearly set to 10, instead of the specified value of 2:
>
> less Iframes.txt
> 2.981333,I
> 13.221333,I
> 23.461333,I
> 33.701333,I
> 43.941333,I
> 54.181333,I
> 64.421333,I
> 74.661333,I
> 84.901333,I
> 95.141333,I
> 105.381333,I
> 115.621333,I
> 125.861333,I
> 136.101333,I
> 146.341333,I
> 156.581333,I
> 166.821333,I
>
>
> I'll attach the sample file below demonstrating the anomalous GOP size
> issue after encoding.
> Copying in Xiang and Artem.
>
> Warm regards,
>
> Dennis.
>


Hello there,

I fixed it. The root cause of this anomaly is due to the external bit rate
control mode in use (-extbrc 1) which also enables mini-GOPs and scenecut
detection.
Both of these options can be disabled by passing  -adaptive_i 1 -adaptive_b
1
___
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] On pic_timing SEI timecodes in ffmpeg's libx264

2023-11-10 Thread Dennis Mungai
Hello there,

Does libx264 in ffmpeg implement embedding pic_timing SEI timecodes?
Following up on a query on StackOverflow related to AWS MediaLive not
picking up on the timecodes on output when libx264 is used.
https://stackoverflow.com/questions/56167298/how-to-embed-pic-timing-sei-wallclock-timecodes-in-rtmp-streaming
___
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] question about opencl use in decoders/encoders

2023-11-07 Thread Dennis Mungai
On Tue, 7 Nov 2023 at 00:55, Andrew Randrianasulu 
wrote:

> FFmpeg today support some opencl filters (but I was unable to use them
> freely in Cinelerra-gg probably because they require not just
> initialization of hw device but also manual up and download of data ...)
>
> but I wonder if same opencl infra can be used in decoders and encoders too?
>
>
> https://cml.news/g/cml-raw-log-hdr/topic/braw_codec_analysis/25749037?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,25749037
>
> apparently those big player codecs use it, so it should be possible
> technically, just at some dev time cost ...
>
> there is also some prores gpu accelerated decoder (closed source, win)
>
> https://mogurenko.com/2020/11/15/cuda-optimized-prores-decoder/
>
> and of course old standby mjpeg:
>
> https://github.com/nctu-pp/mjpeg-encoder
>
> (opencl part does not seems to work for me, but may be it basically
> artefact of running in 32bit x86 mode , I filled mesa bug about it
>


Hello Andrew,

I hope this email finds you well.
In FFmpeg, OpenCL is primarily utilized in specific filters, a list of them
which you can verify in your build(s) with OpenCL enabled via :

ffmpeg -filters | grep opencl

On the encoding side, to the best of my knowledge, the libx264 encoder
wrapper implements lookahead (LA) bits that can be offloaded to an OpenCL
capable GPU.
Some users have reported potential performance gains in production, even
upstream where there's still consensus on whether this feature should be
deprecated.
See this merge request's comments on the same:
https://code.videolan.org/videolan/x264/-/merge_requests/66

Separate from FFmpeg:

1. There are also implementations of VP9 encoders utilizing OpenCL-based
offloading, such as the VP9 encoder by Ittiam systems:
https://www.ittiam.com/resource/ittiam-enables-opencl-based-vp9-encode-for-mobile-and-consumer-applications/,
whose code can be viewed here https://github.com/ittiamvpx/libvpx
2. A VP8 OpenCL-based encoder: https://github.com/Aazmp/vp8oclenc
3. And other derivatives of (1) above:
https://github.com/awatry/libvpx.opencl

I had also posted on this mailing list earlier regarding OpenCL somewhere
in ~2018, may require verification for correctness:
https://ffmpeg.org/pipermail/ffmpeg-user/2018-April/039610.html

Hope that helps :-)
___
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] s12m timestamps support in libx264

2023-10-26 Thread Dennis Mungai
Hello there,

A quick glance at FFmpeg's main landing page https://www.ffmpeg.org/
confirms that S12M timecode decoding in h264is implemented, and that to
some extent, the NVENC encoder wrappers support it.

Is the same currently supported/implemented in libx264?

-Dennis.
___
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] HDR bt.2020 to SDR bt.709 conversion

2023-10-22 Thread Dennis Mungai
On Sun, 22 Oct 2023, 13:02 pehache,  wrote:

>
> Le 22/10/2023 à 01:20, Dennis Mungai a écrit :
>
> > Please provide a sample of the input file and uncut output of the ffmpeg
> > command line in use.
> >
>
> Here is a 60 sec. piece of the input video, extracted with
> ffmpeg -ss 75 -i in0.mkv -map 0:0 -c copy in1.mkv
>
> http://pehache.free.fr/TEMP/in1.mkv
>
> Here is what it looks like in VLC (this is a macOS screenshot, not from
> the VLC capture tool):
> http://pehache.free.fr/TEMP/vlc.png
>
> And what it should look like (natural colors and much more detailed
> shadows):
> http://pehache.free.fr/TEMP/web.png
>
> My main problem is the color shift. Playing with the luminosity is not
> that difficult (even simply with the curve filter if needed).
>
>
> About the ffmpeg text output, I've just cut the irrelevant parts
> (information about audio and subtitle tracks, and about chapters)
>


Looking into it.

>
___
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] HDR bt.2020 to SDR bt.709 conversion

2023-10-21 Thread Dennis Mungai
On Sun, 22 Oct 2023 at 00:39, pehache  wrote:

>
> Hello,
>
> I have trouble converting a 4K HDR video into a HD SDR one. Basically it
> plays much too dark and reddish in VLC (on macOS). The ffprobe output is
> this video is at the bottom of the post
>
> I first tried applying a curve filter to boost the dark tones. I works
> not too bad, but the reddish shift is still, if not amplified.
>
> Then I browsed the web and found a filter set that looks popular (I mean
> copied/pasted on many different pages):
>
> -vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709, \
> tonemap=tonemap=hable,zscale=t=bt709:m=bt709:r=tvformat=yuv420p
>
> But, well, it doesn't solve anything... Using "gamma" instead of "hable"
> gives a higher luminosity, but there's still a strong red shift.
>
> I tried many different things with the zscale filter, but the problem is
> that I don't fully understand the effect of the different parameters,
> although I'm not completly unfamiliar with the color profiles. It seems
> to me that all of this deals mainly the luminosity, and little with the
> chrominance.
>
> I have also found a page that describes how to convert from the bt.2020
> to bt709 profile, with a link to download a LUT file.
> https://www.binarytides.com/color-grading-hlg-videos-with-ffmpeg/
> https://nopixels.net/articles/hlg-to-rec709/
>
> So I tried the filter lut3d=nopixels_net_hlg2020_to_rec709.cube, with
> various combinations of the zscale filter, but could not obtain anything
> correct at the end. I always have reddish, or very reddish, or pinkish,
> color shifts...
>
>
> I'm a bit lost, now... Any help appreciated !
>
>
>
> ===
> *$ ffprobe in0.mkv
> ffprobe version 4.4.4 Copyright (c) 2007-2023 the FFmpeg developers
>built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
>configuration: --prefix=/opt/local --cc=/usr/bin/clang
> --mandir=/opt/local/share/man --enable-audiotoolbox --disable-indev=jack
> --disable-libjack --disable-libopencore-amrnb
> --disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm
> --disable-libxcb-xfixes --enable-opencl --disable-outdev=xv
> --enable-sdl2 --disable-securetransport --enable-videotoolbox
> --enable-avfilter --enable-avresample --enable-fontconfig
> --enable-gnutls --enable-libass --enable-libbluray --enable-libdav1d
> --enable-libfreetype --enable-libfribidi --enable-libmodplug
> --enable-libmp3lame --enable-libopenjpeg --enable-libopus
> --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora
> --enable-libvorbis --enable-libvpx --enable-libzimg --enable-libzvbi
> --enable-lzma --enable-pthreads --enable-shared --enable-swscale
> --enable-zlib --enable-libaom --enable-libsvtav1 --arch=x86_64
> --enable-x86asm --enable-gpl --enable-libvidstab --enable-libx264
> --enable-libx265 --enable-libxvid --enable-postproc
>libavutil  56. 70.100 / 56. 70.100
>libavcodec 58.134.100 / 58.134.100
>libavformat58. 76.100 / 58. 76.100
>libavdevice58. 13.100 / 58. 13.100
>libavfilter 7.110.100 /  7.110.100
>libavresample   4.  0.  0 /  4.  0.  0
>libswscale  5.  9.100 /  5.  9.100
>libswresample   3.  9.100 /  3.  9.100
>libpostproc55.  9.100 / 55.  9.100
> Input #0, matroska,webm, from 'in0.mkv':
>Metadata:
>  encoder : libebml v1.4.0 + libmatroska v1.6.2
>  creation_time   : 2021-03-09T20:53:48.00Z
>  Writing frontend: StaxRip v1.7.0.3
>Duration: 00:49:10.18, start: 0.00, bitrate: 4963 kb/s
>Chapters:
> [...]
>Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv,
> bt2020nc/bt2020/smpte2084), 3840x2160, SAR 1:1 DAR 16:9, 23.98 fps,
> 23.98 tbr, 1k tbn, 23.98 tbc (default)
>  Metadata:
>BPS-eng : 4003363
>DURATION-eng: 00:49:09.19700
>NUMBER_OF_FRAMES-eng: 70710
>NUMBER_OF_BYTES-eng: 1475838552
>_STATISTICS_WRITING_APP-eng: mkvmerge v50.0.0 ('Awakenings') 64-bit
>_STATISTICS_WRITING_DATE_UTC-eng: 2021-03-09 20:53:48
>_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> [...]
>
>
>
Please provide a sample of the input file and uncut output of the ffmpeg
command line in use.
___
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] Converting BT2020 HVEC Videos to H.264 without Color Washout

2023-10-21 Thread Dennis Mungai
On Sat, 21 Oct 2023 at 22:34, pehache  wrote:

> Le 26/03/2021 à 00:55, Craig L. a écrit :
> > Sorry. I don't think I responded to this correctly before.
> >
> >
> > I think I tried exactly that based upon this stackoverflow question:
> >
> >
> https://stackoverflow.com/questions/64981984/ffmpeg-transcode-uhd-h265-to-sdr-h264-without-color-loss
> >
> >
> > The example in that post uses this command:
> >
> > |ffmpeg -i 4K.ts -vf
> >
> zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p
>
> > -c:v h264 -crf 19 -preset ultrafast output.mp4 |
> >
> > Which I thought might be my solution but when I tried it, it ended up
> > making the video too red.
> >
>
> Same here, much too red output in the shadows.
>
> (I'm leaving the rest the rest of the discussion below, as it is an old
> one)
>
>
>
>
>
> >
> > On 3/25/21 4:09 PM, Pavel Koshevoy wrote:
> >> On Thu, Mar 25, 2021 at 9:27 AM Craig L. 
> wrote:
> >>
> >>> I recently started finding certain videos were washing out upon H.264
> >>> conversion.
> >>>
> >>>
> >>> After doing some research I found that if I added -color_primaries
> >>> bt2020 to the command, the color would come out correctly, but ONLY if
> >>> the video was played in Quicktime.  When played in Chrome, it would
> look
> >>> washed out.
> >>>
> >>> Here is a link to a screengrab showing the video in quicktime on the
> >>> left and in Chrome on the right.  Same video.
> >>>
> >>>
> >>> *https://snipboard.io/N8nYv0.jpg* 
> >>>
> >>>
> >>>
> >>>
> >>> After much research I can't figure out how to handle this?
> >>>
> >>> What is the correct way to convert these videos that I suppose are 10
> >>> bit HDR  into H.264 so that they will play correctly in Chrome, etc.
> >>>
> >>>
> >>>
> >>> This is my current command:
> >>>
> >>> /usr/local/bin/ffmpeg  -i "156237-Video2.mov"   -filter_complex
> >>> "scale=480:270"  -color_trc smpte2084 -color_primaries bt2020 -c:v
> >>> libx264 -profile:v high -pix_fmt yuv420p -level 5.1 -preset ultrafast
> >>> -movflags faststart   -vsync 2  -c:a aac -b:a 128k -y
> >>> 156237-Video2.mov-16-9-1616621202.mp4
> >>>
> >>>
> >>>
> >>>
> >>>
> >> For best possible player compatibility you really need to convert from
> >> HDR10 to SDR (bt709).
> >>
> >> To do that you need to use either colorspace or zscale ffmpeg filter.
> >> The
> >> colorspace filter didn't support HLG the last time I checked, but that
> >> wouldn't matter if your source is HDR10, not HLG.
> >> Since you'd be converting from high dynamic range to standard dynamic
> >> range
> >> you would also need to use the tonemap filter.
> >>
> >> There is probably a LUT file somewhere that implements HDR10 -> BT709
> >> color
> >> space conversion and tone mapping in one step, skipping
> >> zscale/tonemap.  If
> >> you had such LUT you could use it with lut3d filter.
> >>
> >> Pavel.
>
>
Hey there,

Could you share a sample of the file with the mailing list?
___
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] How to extend this page about screen recording

2023-10-16 Thread Dennis Mungai
On Mon, 16 Oct 2023, 14:53 Ulf Zibis,  wrote:

>
> Am 12.10.23 um 11:51 schrieb Cecil Westerhof via ffmpeg-user:
> > I just found this:
> >  https://trac.ffmpeg.org/wiki/Capture/Desktop
> >
> > Very interesting indeed.
> >
> > I have two monitors. I could write something about how to use this
> > with two monitors (or more). Would that be appreciated? If yes, how to
> > get my contribution into that page?
>
> If you understand German or are able to translate, here are some
> interesting hints from experience:
> https://wiki.ubuntuusers.de/Screencasts/#FFmpeg
>
> -Ulf
>


This would also be a good place to mention the ddagrab filter, with
examples.

>
___
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] How do you keep all video metadata when transcoding using ffmpeg?

2023-10-13 Thread Dennis Mungai
On Thu, 12 Oct 2023, 22:18 William C Bonner,  wrote:

> In my experience, adding a -map 0 option makes copying all the extra stuff
> more likely.  This was my command to compress a DVD I'd ripped to an MKV
> file, converting the video to h.264 but copying all of the other tracks and
> details.
>
> C:\WINDOWS\ffmpeg.exe -i
> "J:\DVD\_BARB_AND_STAR_GOTO_VISTA_DEL_MAR_88C3\Barb and Star Go to Vista
> Del Mar (2021)_t00.mkv" -c:v libx264 -crf 17 -preset veryfast -c:a copy
> -c:s copy -map 0 -movflags +faststart -n
> "J:\DVD\_BARB_AND_STAR_GOTO_VISTA_DEL_MAR_88C3\Barb and Star Go to Vista
> Del Mar (2021)_t00.x264.mkv"
>


You'll need to add -map_metadata 0 after -map 0.

If you're dealing with mp4 input and outputs, you'll additionally need to
add -movflags use_metadata_tags right before the mp4 muxer.

>
___
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] av1_vaapi encoding testing

2023-09-22 Thread Dennis Mungai
On Fri, 22 Sept 2023, 19:26 Patrick M.,  wrote:

> On Fri, 22 Sep 2023 16:12:14 +0300
> Dennis Mungai  wrote:
> >
> >
> > Is your Libva version up to date?
> >
> > >
> > ___
> > 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".
>
> that was the issue it seems. Not sure why as I had 2.19.0 before but
> remerged it and ffmepg once more and now it shows
> "VD av1_vaapiAV1 (VAAPI) (codec av1)"
>
> Thanks a lot.
>


That's good to hear. You may also want to ensure that the likes of OneVPL
are up to date if you're using any of its encoder wrappers. It was formerly
called (and implemented as) QuickSync (QSV).

>
___
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] av1_vaapi encoding testing

2023-09-22 Thread Dennis Mungai
On Fri, 22 Sept 2023, 15:28 Patrick Münch,  wrote:

> Hi,
>
> I wanted to test av1 vaapi encoding. If i am not mistaken this series
> should be in git and cover that
> (https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=9672).
>
> I have build from git yesterday and don't get av1_vaapi listed on encoders.
> It was build with --enable-vaapi -enable-libdav1d--enable-librav1e and
> --enable-libsvtav1.
> Would be great if one has a hint what i have overlooked or if this should
> be rather on the devel list?
>
> Full details:
> ffmpeg -encoders | grep vaap
> ffmpeg version N-112136-g33b2646d61 Copyright (c) 2000-2023 the FFmpeg
> developers
>   built with gcc 12 (Gentoo Hardened 12.3.1_p20230526 p2)
>   configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
> --docdir=/usr/share/doc/ffmpeg-/html --mandir=/usr/share/man
> --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++
> --ar=x86_64-pc-linux-gnu-ar --nm=x86_64-pc-linux-gnu-nm
> --strip=x86_64-pc-linux-gnu-strip --ranlib=x86_64-pc-linux-gnu-ranlib
> --pkg-config=x86_64-pc-linux-gnu-pkg-config --optflags='-march=native -O2
> -pipe -w' --disable-static --enable-avfilter --disable-stripping
> --disable-optimizations --disable-libcelt --enable-nonfree
> --enable-version3 --disable-indev=v4l2 --disable-outdev=v4l2
> --disable-indev=oss --disable-indev=jack --disable-indev=sndio
> --disable-outdev=oss --disable-outdev=sndio --enable-nonfree --enable-bzlib
> --disable-runtime-cpudetect --disable-debug --disable-gcrypt
> --enable-gnutls --disable-gmp --enable-gpl --disable-hardcoded-tables
> --enable-iconv --disable-libxml2 --disable-lzma --enable-network
> --disable-opencl --enable-openssl --enable-postproc
> --enable-libsmbclient --enable-ffplay --enable-sdl2 --enable-vaapi
> --enable-vdpau --enable-vulkan --enable-xlib --enable-libxcb
> --enable-libxcb-shm --enable-libxcb-xfixes --enable-zlib --disable-libcdio
> --disable-libiec61883 --disable-libdc1394 --disable-libcaca
> --disable-openal --enable-opengl --disable-libv4l2 --disable-libpulse
> --disable-libdrm --disable-libjack --disable-libopencore-amrwb
> --disable-libopencore-amrnb --disable-libcodec2 --enable-libdav1d
> --enable-libfdk-aac --enable-libopenjpeg --disable-libjxl
> --disable-libbluray --disable-libgme --disable-libgsm --disable-libaribb24
> --disable-mmal --disable-libmodplug --enable-libopus --enable-libvpl
> --disable-libilbc --disable-librtmp --disable-libssh --disable-libspeex
> --disable-libsrt --enable-librsvg --disable-ffnvcodec --enable-libvorbis
> --enable-libvpx --disable-libzvbi --disable-appkit --disable-libbs2b
> --disable-chromaprint --disable-cuda-llvm --disable-libflite
> --disable-frei0r --disable-libvmaf --disable-libfribidi
> --disable-fontconfig --disable-ladspa --enable-lcms2 --disable-libass
> --disable-libplacebo --disable-libtesseract --disable-lv2
> --enable-libfreetype --disable-libvidstab --disable-librubberband
> --disable-libzmq --disable-libzimg --disable-libsoxr --enable-pthreads
> --disable-amf --disable-libvo-amrwbenc --disable-libkvazaar --enable-libaom
> --enable-libmp3lame --disable-libopenh264 --enable-librav1e
> --disable-libsnappy --enable-libsvtav1 --enable-libtheora
> --disable-libtwolame --disable-libwebp --enable-libx264 --enable-libx265
> --enable-libxvid --disable-gnutls --enable-version3 --disable-armv5te
> --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp
> --disable-vfpv3 --disable-armv8 --disable-mipsdsp --disable-mipsdspr2
> --disable-mipsfpu --disable-altivec --disable-vsx --disable-power8
> --disable-amd3dnow --disable-amd3dnowext --disable-fma4 --disable-xop
> --enable-pic --cpu=host --disable-doc --disable-htmlpages --enable-manpages
> libavutil  58. 25.100 / 58. 25.100 libavcodec
> 60. 26.100 / 60. 26.100 libavformat60. 13.100 / 60. 13.100
>   libavdevice60.  2.101 / 60.  2.101
>   libavfilter 9. 11.100 /  9. 11.100
>   libswscale  7.  3.100 /  7.  3.100
>   libswresample   4. 11.100 /  4. 11.100
>   libpostproc57.  2.100 / 57.  2.100
>  VD h264_vaapi   H.264/AVC (VAAPI) (codec h264)
>  VD hevc_vaapi   H.265/HEVC (VAAPI) (codec hevc)
>  VD mjpeg_vaapi  MJPEG (VAAPI) (codec mjpeg)
>  VD mpeg2_vaapi  MPEG-2 (VAAPI) (codec mpeg2video)
>  VD vp8_vaapiVP8 (VAAPI) (codec vp8)
>  VD vp9_vaapiVP9 (VAAPI) (codec vp9)
>
> Hardware support should be there as well:
> vainfo --display drm --device /dev/dri/renderD129 | grep -i av1
> libva info: VA-API version 1.19.0
> libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
> libva info: Found init function __vaDriverInit_1_19
> libva info: va_openDriver() returns 0
>   VAProfileAV1Profile0: VAEntrypointVLD
>   VAProfileAV1Profile0: VAEntrypointEncSliceLP
>
> Thanks a lot
>


Is your Libva version up to date?

>
___
ffmpeg-user mailing list

Re: [FFmpeg-user] Error while compiling cuda enabled ffmpeg in Ubuntu 22.04

2023-03-13 Thread Dennis Mungai
On Mon, 13 Mar 2023, 15:22 Ravi Joshi via ffmpeg-user, <
ffmpeg-user@ffmpeg.org> wrote:

> Thanks a lot.
>
> It worked like a charm!
>
> -
> Thanks
>
>
> On Monday, 13 March, 2023 at 12:38:42 am GMT+9, Dennis Mungai <
> dmng...@gmail.com> wrote:
>
>
>
>
>
> On Sun, 12 Mar 2023 at 17:58, Ravi Joshi via ffmpeg-user <
> ffmpeg-user@ffmpeg.org> wrote:
>
> > Hello everyone,
> >
> > Thank you for allowing me to join this mailing list and post here. I am
> > compiling cuda support for ffmpeg in Ubuntu 22.04 OS. Unfortunately, it
> > throws the following error:
> >
> > ravi@asus:~/tools/ffmpeg$ ./configure --enable-nonfree
> --enable-cuda-nvcc
> > --enable-libnpp --extra-cflags=-I/usr/local/cuda/include
> > --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared
> > ERROR: failed checking for nvcc.
> >
> >
> > I am following the documetional provided by Nvidia at
> >
> https://docs.nvidia.com/video-technologies/video-codec-sdk/ffmpeg-with-nvidia-gpu/index.html
> >
> >
> > Below is the necessary information:
> > OS: Ubuntu 22.04.2 LTS
> > CUDA Version: 11.7
> > GCC Version: 11.3.0
> > Kernel Version: 5.19.0-35-generic
> >
> > In the log file "ffbuild/config.log", I found following doubtful entry:
> >
> > g++ -D_ISOC99_SOURCE -I/usr/local/cuda/include -D__STDC_CONSTANT_MACROS
> > -std=c++11 -c -o /tmp/ffconf.z2qxBKmX/test.o
> /tmp/ffconf.z2qxBKmX/test.cpp
> > test_cflags_cc -std=c11 ctype.h __STDC_VERSION__ >= 201112L
> > test_cc -std=c11
> > BEGIN /tmp/ffconf.z2qxBKmX/test.c
> >1#include 
> >2#if !(__STDC_VERSION__ >= 201112L)
> >3#error "unsatisfied condition: __STDC_VERSION__ >= 201112L"
> >4#endif
> > END /tmp/ffconf.z2qxBKmX/test.c
> >
> >
> > Please see the attached log file for better understanding the issue. I am
> > also sharing it via Pastbin (https://pastebin.com/9Z6Puzxp). There is a
> > total of 17836 lines in the log file. Unfortunately, Pastebin marked the
> > log file as "Pending Moderation" while composing this email. I apologize
> > for the inconvenience.
> >
> >
> > How to enable cuda support for ffmpeg in Ubuntu 22.04?
> >
> > -
> > Thanks
> > Ravi
> >
>
>
> Hey there,
>
> nvcc isn't in your system's path.
> If you run which nvcc , yiu'll get a blank output.
> How was CUDA installed on your system?
>
> Fix that and you'll be able to build with CUDA
>


You're welcome

>
___
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] Error while compiling cuda enabled ffmpeg in Ubuntu 22.04

2023-03-12 Thread Dennis Mungai
On Sun, 12 Mar 2023 at 17:58, Ravi Joshi via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

> Hello everyone,
>
> Thank you for allowing me to join this mailing list and post here. I am
> compiling cuda support for ffmpeg in Ubuntu 22.04 OS. Unfortunately, it
> throws the following error:
>
> ravi@asus:~/tools/ffmpeg$ ./configure --enable-nonfree --enable-cuda-nvcc
> --enable-libnpp --extra-cflags=-I/usr/local/cuda/include
> --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared
> ERROR: failed checking for nvcc.
>
>
> I am following the documetional provided by Nvidia at
> https://docs.nvidia.com/video-technologies/video-codec-sdk/ffmpeg-with-nvidia-gpu/index.html
>
>
> Below is the necessary information:
> OS: Ubuntu 22.04.2 LTS
> CUDA Version: 11.7
> GCC Version: 11.3.0
> Kernel Version: 5.19.0-35-generic
>
> In the log file "ffbuild/config.log", I found following doubtful entry:
>
> g++ -D_ISOC99_SOURCE -I/usr/local/cuda/include -D__STDC_CONSTANT_MACROS
> -std=c++11 -c -o /tmp/ffconf.z2qxBKmX/test.o /tmp/ffconf.z2qxBKmX/test.cpp
> test_cflags_cc -std=c11 ctype.h __STDC_VERSION__ >= 201112L
> test_cc -std=c11
> BEGIN /tmp/ffconf.z2qxBKmX/test.c
> 1#include 
> 2#if !(__STDC_VERSION__ >= 201112L)
> 3#error "unsatisfied condition: __STDC_VERSION__ >= 201112L"
> 4#endif
> END /tmp/ffconf.z2qxBKmX/test.c
>
>
> Please see the attached log file for better understanding the issue. I am
> also sharing it via Pastbin (https://pastebin.com/9Z6Puzxp). There is a
> total of 17836 lines in the log file. Unfortunately, Pastebin marked the
> log file as "Pending Moderation" while composing this email. I apologize
> for the inconvenience.
>
>
> How to enable cuda support for ffmpeg in Ubuntu 22.04?
>
> -
> Thanks
> Ravi
>


Hey there,

nvcc isn't in your system's path.
If you run which nvcc , yiu'll get a blank output.
How was CUDA installed on your system?

Fix that and you'll be able to build with CUDA support.
___
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] Error: Impossible to convert between the formats...(Nvidia codecs)

2023-02-26 Thread Dennis Mungai
On Mon, 27 Feb 2023 at 03:48, Dennis Mungai  wrote:

> On Sun, 10 Jul 2022 at 10:28, Ben Parham  wrote:
>
>> Hi Dennis,
>> Now I am streaming with two cameras but I have a small problem, the audio
>> stream is not synced with the video stream, and there is a small delay of
>> around 0.2 seconds.
>> How can I fix it? I would appreciate your help.
>> Regards,
>> Ben.
>>
>
> This somehow slipped through my email filters, seeing this now.
>
> Try this variant and report back:
>
> ffmpeg -y -fps_mode passthrough -hwaccel cuda -hwaccel_output_format cuda
> -extra_hw_frames 3
> rtsp_transport tcp -i "rtsp://admin:Pass1@192.168.1.1" -flags
> +genpts -vf scale_cuda=1920:1080  -vcodec hevc_nvenc -delay 0  -preset p2
> -bf:v 0 -tune hq -rc vbr -vb 700k -maxrate  800k -minrate
> 200k -bufsize 800k -g 25 -acodec copy -strict -2 -flags +global_header
> -f rtsp "rtsp://localhost:8000/stream"
>
> See the changes I made:
>
> 1. Completely disabled B-frames. B-frames add to encoder latency.
> 2. See the new option -fps_mode, which replaces the now-deprecated -vsync
> parameter.
> 3. I also removed the +low_delay flag, as its' known to be very broken on
> any input with B-frames.
> 4. To nvenc, I added the -delay parameter, set to 0.
>
> The latency is propagated by the “delay” parameter (internally referred to
> as async_depth) passed to FFmpeg for nvenc. The code in FFmpeg’s nvenc.c waits
> until this number of extra frames have been buffered
> <https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/nvenc.c#L981>
> before emitting any frames and is intended to support parallel and 1:N
> encoding scenarios.
>
> The assigned default value is INT_MAX which later gets reduced down to the
> number of NVENC surfaces initialized minus one, which itself has an initial
> value of 4 when unset/by default.
>
> This can be overriden by setting -delay:v 0 to fix the output latency.
>
>
> Retest and report back.
>
>
>

You can also add

-max_interleave_delta 0

To the output options, like this to the command line above:

ffmpeg -y -fps_mode passthrough -hwaccel cuda -hwaccel_output_format cuda
-extra_hw_frames 3
rtsp_transport tcp -i "rtsp://admin:Pass1@192.168.1.1" -flags
+genpts -vf scale_cuda=1920:1080  -vcodec hevc_nvenc -delay 0  -preset p2
-bf:v 0 -tune hq -rc vbr -vb 700k -maxrate  800k -minrate
200k -bufsize 800k -g 25 -acodec copy -strict -2 -flags +global_header
-max_interleave_delta 0 -f rtsp "rtsp://localhost:8000/stream"

And report back on the results.
___
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] Error: Impossible to convert between the formats...(Nvidia codecs)

2023-02-26 Thread Dennis Mungai
On Sun, 10 Jul 2022 at 10:28, Ben Parham  wrote:

> Hi Dennis,
> Now I am streaming with two cameras but I have a small problem, the audio
> stream is not synced with the video stream, and there is a small delay of
> around 0.2 seconds.
> How can I fix it? I would appreciate your help.
> Regards,
> Ben.
>

This somehow slipped through my email filters, seeing this now.

Try this variant and report back:

ffmpeg -y -fps_mode passthrough -hwaccel cuda -hwaccel_output_format cuda
-extra_hw_frames 3
rtsp_transport tcp -i "rtsp://admin:Pass1@192.168.1.1" -flags
+genpts -vf scale_cuda=1920:1080  -vcodec hevc_nvenc -delay 0  -preset p2
-bf:v 0 -tune hq -rc vbr -vb 700k -maxrate  800k -minrate
200k -bufsize 800k -g 25 -acodec copy -strict -2 -flags +global_header
-f rtsp "rtsp://localhost:8000/stream"

See the changes I made:

1. Completely disabled B-frames. B-frames add to encoder latency.
2. See the new option -fps_mode, which replaces the now-deprecated -vsync
parameter.
3. I also removed the +low_delay flag, as its' known to be very broken on
any input with B-frames.
4. To nvenc, I added the -delay parameter, set to 0.

The latency is propagated by the “delay” parameter (internally referred to
as async_depth) passed to FFmpeg for nvenc. The code in FFmpeg’s nvenc.c waits
until this number of extra frames have been buffered

before emitting any frames and is intended to support parallel and 1:N
encoding scenarios.

The assigned default value is INT_MAX which later gets reduced down to the
number of NVENC surfaces initialized minus one, which itself has an initial
value of 4 when unset/by default.

This can be overriden by setting -delay:v 0 to fix the output latency.


Retest and report back.
___
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] Change commands during runtime when the stream is being piped into stdin

2023-01-13 Thread Dennis Mungai
On Fri, 13 Jan 2023 at 18:46, Joao Pedro Borges Martins 
wrote:

> I want to send a command to change the audio filters on an already running
> FFmpeg process using the process stdin but the audio data is being passed
> in the stdin itself, I tried prefixing the command with `#` but had no
> success. The program just considers my command as a malformed packet and
> lags the stream for a bit.
>
> Using node js ChildProcess to handle the FFMpeg:
>
> *> Initial args:* `-i - pipe:1 -analyzeduration 0 -loglevel 0 -f s16le -ar
> 48000 -ac 2`
> *> Command sent into stdin*: `af=bass=g=20:f=110:w=0.3\n` (Tried # and
> encoding in binary)
>
>
It *might* be possible, applicable to filters that can accept commands if
ffmpeg is linked to libzmq.
See the docs: https://ffmpeg.org/ffmpeg-filters.html#zmq_002c-azmq
___
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] Trouble selecting a pixel format/colorspace while trying to encode a video using ffmpeg and HW accelerated vaapi or qsv interfaces

2022-12-09 Thread Dennis Mungai
On Fri, 9 Dec 2022 at 09:16, Chen, Wenbin <
wenbin.chen-at-intel@ffmpeg.org> wrote:

> > > Output of 'ffmpeg -h filter=vpp_qsv' is bellow
> > >
> > > 
> > > Filter vpp_qsv
> > >   Quick Sync Video VPP.
> > > Inputs:
> > >#0: default (video)
> > > Outputs:
> > >#0: default (video)
> > > vpp_qsv AVOptions:
> > >deinterlace   ..FV... deinterlace mode: 0=off,
> 1=bob,
> > > 2=advanced (from 0 to 2) (default 0)
> > >  bob 1..FV... Bob deinterlace mode.
> > >  advanced2..FV... Advanced deinterlace
> mode.
> > >denoise   ..FV... denoise level [0, 100]
> (from 0
> > > to 100) (default 0)
> > >detail..FV... enhancement level [0,
> 100] (from
> > > 0 to 100) (default 0)
> > >framerate..FV... output framerate (from 0
> to
> > > DBL_MAX) (default 0/1)
> > >procamp   ..FV... Enable ProcAmp (from 0
> to 1)
> > > (default 0)
> > >hue ..FV... ProcAmp hue (from -180
> to 180)
> > > (default 0)
> > >saturation  ..FV... ProcAmp saturation (from
> 0 to
> > > 10) (default 1)
> > >contrast..FV... ProcAmp contrast (from 0
> to 10)
> > > (default 1)
> > >brightness  ..FV... ProcAmp brightness (from
> -100 to
> > > 100) (default 0)
> > >transpose ..FV... set transpose direction
> (from -1
> > > to 6) (default -1)
> > >  cclock_hflip0..FV... rotate counter-clockwise
> with
> > > horizontal flip
> > >  clock   1..FV... rotate clockwise
> > >  cclock  2..FV... rotate counter-clockwise
> > >  clock_hflip 3..FV... rotate clockwise with
> horizontal
> > > flip
> > >  reversal4..FV... rotate by half-turn
> > >  hflip   5..FV... flip horizontally
> > >  vflip   6..FV... flip vertically
> > >cw ..FV... set the width crop area
> > > expression (default "iw")
> > >ch ..FV... set the height crop area
> > > expression (default "ih")
> > >cx ..FV... set the x crop area
> expression
> > > (default "(in_w-out_w)/2")
> > >cy ..FV... set the y crop area
> expression
> > > (default "(in_h-out_h)/2")
> > >w  ..FV... Output video width
> (default
> > > "cw")
> > >width  ..FV... Output video width
> (default
> > > "cw")
> > >h  ..FV... Output video height
> (default
> > > "w*ch/cw")
> > >height ..FV... Output video height
> (default
> > > "w*ch/cw")
> > >format ..FV... Output pixel format
> (default
> > > "same")
> > >async_depth   ..FV... Internal parallelization
> depth,
> > > the higher the value the higher the latency. (from 0 to INT_MAX)
> (default 0)
> > >scale_mode..FV... scale mode: 0=auto,
> 1=low power,
> > > 2=high quality (from 0 to 2) (default 0)
> > > 
> > >
> > > I tried the following command with vpp_qsv filter but pixel
> > format/colorspace
> > > of the output is the same:
> > >
> > > 
> > > ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -v verbose -f
> x11grab
> > > -draw_mouse 0 -framerate 20 -probesize 42M -video_size 1920x1200
> > > -thread_queue_size 1000 -vcodec rawvideo -i ":0.0" -an -vf
> > > 'hwupload=extra_hw_frames=64,vpp_qsv=format=bgra' -c:v hevc_qsv -
> > preset
> > > veryslow -global_quality 17 -look_ahead 1 -y /tmp/output.mkv
> > > 
> > >
> > > The ffprobe result for the above command is:
> > >
> > > 
> > > Input #0, matroska,webm, from '/tmp/output.mkv':
> > >   Metadata:
> > > ENCODER : Lavf59.27.100
> > >   Duration: 00:00:04.85, start: 0.00, bitrate: 50 kb/s
> > >   Str

Re: [FFmpeg-user] Trouble selecting a pixel format/colorspace while trying to encode a video using ffmpeg and HW accelerated vaapi or qsv interfaces

2022-12-08 Thread Dennis Mungai
On Thu, 8 Dec 2022 at 22:32,  wrote:

> I'm having trouble selecting a pixel format/colorspace while trying to
> encode a video using ffmpeg and HW accelerated vaapi or qsv interfaces. I
> have an i7-1165G7 with integrated graphics and I'm using ffmpeg 5.1.1 with
> ubuntu
>
> I'm able to select the pixel format/colorspace with the SW encoder, for
> instance, if I use the following command:
>
> 
> ffmpeg -f x11grab -draw_mouse 0 -framerate 20 -probesize 42M -video_size
> 1920x1200 -thread_queue_size 1000 -vcodec rawvideo -i ":0.0" -an -c:v hevc
> -preset veryslow -global_quality 17 -look_ahead 1 -y /tmp/output.mkv
> 
>
> I get the correct pixel format and with ffprobe I have the following:
>
> 
> Input #0, matroska,webm, from '/tmp/output.mkv':
>   Metadata:
> ENCODER : Lavf59.27.100
>   Duration: 00:00:02.90, start: 0.00, bitrate: 92 kb/s
>   Stream #0:0: Video: hevc (Rext), gbrp(pc, gbr/unknown/unknown,
> progressive), 1920x1200, 20 fps, 20 tbr, 1k tbn
> Metadata:
>   ENCODER : Lavc59.37.100 libx265
>   DURATION: 00:00:02.9
> 
>
> The video from the above example is correctly encoded and colors are
> exactly what I need them to be.
>
> On the other hand, when I try to use the HW encoder, the pixel format is
> wrong. For instance:
>
> 
> ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -v verbose -f x11grab
> -draw_mouse 0 -framerate 20 -probesize 42M -video_size 1920x1200
> -thread_queue_size 1000 -vcodec rawvideo -i ":0.0" -an -vf
> 'hwupload=extra_hw_frames=64,scale_qsv=format=bgra' -c:v hevc_qsv -preset
> veryslow -global_quality 17 -look_ahead 1 -y /tmp/output.mkv
> 
>
> ffprobe generates:
>
> 
> Input #0, matroska,webm, from '/tmp/output.mkv':
>   Metadata:
> ENCODER : Lavf59.27.100
>   Duration: 00:00:04.40, start: 0.00, bitrate: 55 kb/s
>   Stream #0:0: Video: hevc (Main), yuvj420p(pc, gbr/unknown/unknown,
> progressive), 1920x1200 [SAR 1:1 DAR 8:5], 20 fps, 20 tbr, 1k tbn
> Metadata:
>   ENCODER : Lavc59.37.100 hevc_qsv
>   DURATION: 00:00:04.4
> 
>
> As you can see, in the first example, libx265 SW encoder based, the output
> is generated with the "gbrp" colorspace while in the second example,
> hevc_qsv HW encoder based, the output is generated with the "yuvj420p"
> pixel format.
>
> QUESTION: How can I properly control the pixel format/colorspace of the
> generated output using the HW based encoders such as QSV or VAAPI with
> my i7-1165G7 integrated graphics card ? I would like a format that is 24 or
> 32bits instead of the 12bits I'm getting
>
>
Hey there,

I'd recommend using the vpp_qsv filter instead.

Please provide the output of:

ffmpeg -h filter=vpp_qsv

And I'll generate a command line you can use to test and report back.
___
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] lavfi-preview

2022-10-31 Thread Dennis Mungai
On Mon, 31 Oct 2022 at 12:35, Paul B Mahol  wrote:

> On 4/24/22, Bang He  wrote:
> > hwo to run it
> >
>
> There are now binaries auto build for Windows and Linux and are ready
> for download.
> All for 64bit.
>
> > On Wed, Mar 30, 2022 at 7:53 PM Paul B Mahol  wrote:
> >
> >> Hello,
> >>
> >> I would like to inform you about the new tool, located here:
> >>
> >> https://github.com/richardpl/lavfi-preview
> >>
> >> It is GUI filtergraph editor and foremost ffmpeg's libavfilter
> >> filtergraph
> >> preview tool.
> >>
> >> It is in early stage, but already functional.
> >>
> >> Regards
>

Good stuff, will check it out!
___
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] streaming to Youtube - error message after some time

2022-08-05 Thread Dennis Mungai
On Fri, 5 Aug 2022 at 13:55, Christian  wrote:

> Hello,
>
> sorry, I wasn't specific enough with my last mails. I try again and be
> more specific:
>
> I like to stream to Youtube. The source is my Outdoor-Camera which is
> connected via an antenna to my Router. The camera sends an h.264 encoded
> RTSP-Stream. FFmpeg v4.1.9 runs on a Raspberry Pi4 with Raspbian, which
> receives the stream and converts it to rtmp for Youtube. Here is the
> ffmpeg command for doing so:
>
> ffmpeg -f lavfi -fflags +genpts -i anullsrc -rtsp_transport udp -i
> "rtsp://user:password@192.168.1.124:554/Streaming/Channels/101" -bufsize
> 5M -tune zerolatency -vcodec copy -pix_fmt + -strict experimental
> -flvflags no_duration_filesize -f flv rtmp://a.rtmp.youtube.com/live2/
>
> Randomly after some/many hours/days I get the following error message:
>
> ...
> frame=961817 fps= 25 q=-1.0 size=33431623k8 time=10:41:17.90
> bitrate=7117.6kbits
> frame=961830 fps= 25 q=-1.0 size=33432111k8 time=10:11:18.40
> bitrate=7117.7kbits
> frame=961843 fps= 25 q=-1.0 size=33432385k8 time=10:41:18.92
> bitrate=7117.6kbits
> av_interleaved_write_frame(): Connection timed out
> Error writing trailer of rtmp://a.rtmp.youtube.com/live2/ :
> Connection timed out
> frame=961849 fps= 24 q=-1.0 Lsize=33432752kB time=10:41:19.20
> bitrate=7117.6kbit s/s speed=0.975x video:33376660kB audio: 9817kB
> subtitle: 0kB other streams: 0kB global headers: 0kB muxing overhead:
> 0.138601% [aac @ 0x20ae080] Qavg: 65536.000 Conversion failed!
>
> Googling "av_interleaved_write_frame(): Connection timed out" I couldn't
> find something. What does that mean? Does it mean that ffmpeg has no
> connection to the camera anymore?
>
> Thanks in advance.
> Chris
>
> Am 03.08.22 um 22:44 schrieb Christian:
> > Ups. The Link was not intended... -.-
> > Anyway, I would be grateful for an explanation. Thanks in advance.
> > Chris
> >
> > Am 03.08.22 um 21:11 schrieb Christian:
> >> Hello,
> >>
> >> after a while streaming to youtube I randomly get the following error
> >> message from ffmpeg:
> >>
> >> "...
> >> av_interleaved_write_frame(): Connection timed out
> >> Error writing trailer of rtmp://a.rtmp.youtube.com/live2/
> >> ---
> >> 0: Connection timed out
> >> ..."
> >> abort
> >>
> >> Could anybody explain me what that means, please? Does it mean the
> >> camera is not accessible?
> >>
> >> Thanks in advance.
> >> Chris
>

Hey there,

Please add these flags for the flv muxer:  "-flvflags +*no_sequence_end*
+no_metadata+no_duration_filesize

In your example, test with:

ffmpeg -f lavfi -fflags +genpts -i anullsrc -rtsp_transport udp -i
"rtsp://user:password@192.168.1.124:554/Streaming/Channels/101" -bufsize
5M -tune zerolatency -vcodec copy -bsf:v dump_extra
-flvflags  +*no_sequence_end*+no_metadata+no_duration_filesize -f flv
"rtmp://$URL"

And report back.

___
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] libatomic support for mips32

2022-07-27 Thread Dennis Mungai
On Tue, 26 Jul 2022 at 10:02, Aravinth Kathiravan <
aravinth.kathira...@vvdntech.in> wrote:

> Hi ffmpeg user,
> We are cross compiling ffmpeg with mips32 architecture but our toolchain
> does not support libatomic and is facing the following error.
> "Undefined reference to __sync_fetch_and_add_8"
> Please provide us with support.
>
>
> --
> *With best regards,*
> ARAVINTH K
> VVDN Technologies Pvt Ltd
> Cell: +91 8754832799
> Web : www.vvdntech.com
>

Hello there,

Your query is compiler related, and is not specific to ffmpeg.
You'll need to fix your toolchain first.

Generally, you'll need to have GCC built without libatomic to build the
target cross-compiler with libatomic enabled.
The intermediary compiler will serve to build your Compiler Runtime AND
libatomic, so that the target compiler can use these missing features.
See this recipe for an example:
https://github.com/malaterre/OpenELEC.tv/blob/70dbe25c1647f01eb83c108939c470437a2db259/packages/lang/gcc/package.mk
You may also be interested in replicating the same with crosstool-ng:
https://crosstool-ng.github.io/docs/configuration/

Warm regards,

Dennis.
___
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] hls playlist got wiped out when ffmpeg runs as systemd child process

2022-07-10 Thread Dennis Mungai
On Sun, 10 Jul 2022, 20:25 Jonathan Baecker,  wrote:

> Am 10.07.22 um 19:12 schrieb Jonathan Baecker:
> > Am 08.07.22 um 22:30 schrieb Reindl Harald:
> >>
> >>
> >> Am 08.07.22 um 18:16 schrieb Greg Oliver:
> >>> On Fri, Jul 8, 2022 at 5:25 AM jb  wrote:
> >>>
>  Hello everybody,
> 
>  I have a control program which running as a systemd service. This
>  program spawns ffmpeg and that is writing to a HLS playlist. I use
>  this
>  flags:
> 
>   -hls_flags
>  append_list+delete_segments+omit_endlist+program_date_time
> 
>  The interesting thing is, when I stop the systemd process my HLS
>  playlist got wiped out and when I start the service again ffmpeg will
>  not continue the playlist, instead it writes a new one.
> 
>  When I run my control program directly from shell, I don't have this
>  behavior. I can stop the program and start it again and the HLS
>  playlist
>  will continue.
> 
>  Does anybody notice this different behaviors? And has an idea why this
>  is happen and what I can do here?
> 
> >>>
> >>> systemd is not stateful - unless you create stateful files with your
> >>> exec{pre,post,start} stanzas, it will get overwritten every time
> >>
> >> "systemd is not stateful" means nothing on it's own
> >> stateful *for what*
> >>
> >> even "PrivateTmp" is *not* default enabled, but when you enable it
> >> and your application trie sto re-use files in /tmp they are gone
> >
> > Thank you for your suggestions! PrivateTmp=no was not working, but I
> > did some more tests and figure out: the problem is related to the way
> > systemd stops child processes. When I run ffmpeg directly with systemd
> > the content from the m3u8 playlist survive, but when I start ffmpeg
> > from a bash script, or my control program, the content got deleted.
>
> Sorry that I reply to my self, but I have it now. KillMode=mixed did the
> trick.
>


Fascinating find, I'm glad it worked out

>
___
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] Error: Impossible to convert between the formats...(Nvidia codecs)

2022-07-09 Thread Dennis Mungai
On Sat, 9 Jul 2022, 15:05 Ben Parham,  wrote:

> Hi again,
> Sure, I will do it based on that. Thank you for your help. If I face an
> issue I'll contact you again.
> I appreciate it.
>
> On Sat, Jul 9, 2022 at 7:55 PM Dennis Mungai  wrote:
>
> > On Sat, 9 Jul 2022 at 14:40, Ben Parham  wrote:
> >
> > > Thank you, Dennis. It works with 6 in-preset p4. Now I am running one
> > > stream, but I will run 5 streams in RTX A2000. Does it support this
> > number
> > > in all streams?
> > >
> >
> > Hello there,
> > That GPU has no limitations on the simultaneous number of NVENC sessions
> it
> > can handle.
> > However, throughput will be significantly impacted by its' low power
> > profile limit (70W?) as you add more transcode jobs.
> > This is an issue I've observed in production with a similar GPU profile,
> > the Tesla T4.
> > You may consider tuning these encoder presets to compensate for
> throughput
> > drops with multiple simultaneous transcode sessions, if real time
> encoding
> > is a priority to you.
> > And on NVDEC: VRAM usage can also be quite steep with multiple sessions.
> > Monitor that carefully via nvidia-smi as you add more transcode jobs.
>


Sure thing, no worries.

>
___
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] Error: Impossible to convert between the formats...(Nvidia codecs)

2022-07-09 Thread Dennis Mungai
On Sat, 9 Jul 2022 at 14:40, Ben Parham  wrote:

> Thank you, Dennis. It works with 6 in-preset p4. Now I am running one
> stream, but I will run 5 streams in RTX A2000. Does it support this number
> in all streams?
>

Hello there,
That GPU has no limitations on the simultaneous number of NVENC sessions it
can handle.
However, throughput will be significantly impacted by its' low power
profile limit (70W?) as you add more transcode jobs.
This is an issue I've observed in production with a similar GPU profile,
the Tesla T4.
You may consider tuning these encoder presets to compensate for throughput
drops with multiple simultaneous transcode sessions, if real time encoding
is a priority to you.
And on NVDEC: VRAM usage can also be quite steep with multiple sessions.
Monitor that carefully via nvidia-smi as you add more transcode jobs.
___
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] Error: Impossible to convert between the formats...(Nvidia codecs)

2022-07-09 Thread Dennis Mungai
On Sat, 9 Jul 2022 at 14:25, Ben Parham  wrote:

> Thanks, Dennis. I added it in -preset p4 and the same error appeared:
>
> hevc @ 01ac32f034c0] hardware accelerator failed to decode picture
> Error while decoding stream #0:0: Generic error in an external library
> [hevc @ 01ac41cd1180] Could not find ref with POC 5
> [hevc @ 01ac41d82640] No decoder surfaces left38 bitrate=N/A
> speed=2.09x
> [hevc @ 01ac41d82640]
> decoder->cvdl->cuvidDecodePicture(decoder->decoder, >pic_params)
> failed -> CUDA_ERROR_INVALID_VALUE: invalid argument
>
>
>
How many encoder sessions are you running simultaneously?
Try bumping up the number of extra_hw_frames, say 6 to 10, and retest.
___
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] Error: Impossible to convert between the formats...(Nvidia codecs)

2022-07-09 Thread Dennis Mungai
On Sat, 9 Jul 2022 at 14:01, Ben Parham  wrote:

> Thank you, Dennis. By removing _pix_fmt the issue was solved.
> But when I change the preset from p2 to p3 or p4, I face this error:
>
> [hevc @ 01ebb41bdc40] hardware accelerator failed to decode picture
> [hevc @ 01ebb41bb440] Could not find ref with POC 24
> [rtsp @ 01ebb42500c0] Invalid DTS: 126000 PTS: 118800 in output stream
> 0:0, replacing by guess
> Error while decoding stream #0:0: Generic error in an external library
> [hevc @ 01ebb41bbc40] No decoder surfaces left
> [hevc @ 01ebb41bbc40]
> decoder->cvdl->cuvidDecodePicture(decoder->decoder, >pic_params)
> failed -> CUDA_ERROR_INVALID_VALUE: invalid argument
>
> Could you help me to fix this error please?
>

Sure, I can.

By design, ffmpeg's NVDEC implementation is required to allocate surfaces
to handle bitstreams with advanced features such as B-frames, interlaced
content, etc.
However, the pre-allocated surfaces may not be enough in some cases, and
that can be fixed by setting the -extra_hw_frames {n} option, with n > 2.
See this ticket for more details: https://trac.ffmpeg.org/ticket/7562

Try this out:

ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda
-extra_hw_frames 3
rtsp_transport tcp -i "rtsp://admin:Pass1@192.168.1.1" -flags
+low_delay -vcodec hevc_nvenc -vf scale_cuda=1920:1080 -preset p2
-pix_fmt yuv420p -tune hq -rc vbr -vb 700k -maxrate  800k -minrate
200k -bufsize 800k -g 25 -acodec copy -strict -2 -flags +global_header
-f rtsp "rtsp://localhost:8000/stream"

And report back.
___
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] Error: Impossible to convert between the formats...(Nvidia codecs)

2022-07-09 Thread Dennis Mungai
On Sat, 9 Jul 2022 at 12:45, DEF  wrote:

> On Sat, 9 Jul 2022 at 08:25, Ben Parham  wrote:
> >
> > Hello,
> >
> > I try to use Nvidia codecs in live transcoding. The input stream is from
> an
> > IP camera (Hikvision) and its color format is "*yuvj420p*". My command
> is:
> >
> > ffmpeg.exe -y -hwaccel cuda -hwaccel_output_format cuda -rtsp_transport
> tcp
> > -i "rtsp://admin:Pass1@192.168.1.1" -flags +low_delay -vcodec hevc_nvenc
> > -s 1920x1080 -preset p2 -pix_fmt yuv420p -tune hq -rc vbr -vb 700k
> -maxrate
> > 800k -minrate 200k -bufsize 800k -g 25 -acodec copy -strict -2 -flags
> > +global_header -f rtsp "rtsp://localhost:8000/stream"
>
> Check out documenation at
>
> https://docs.nvidia.com/video-technologies/video-codec-sdk/ffmpeg-with-nvidia-gpu/
>
> Use -vsync 0 option with decode to prevent FFmpeg from creating output
> YUV with duplicate and extra frames.
> This seems to be the commonest runtime issue.
>
> Try
> ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda
> rtsp_transport tcp -i "rtsp://admin:Pass1@192.168.1.1" -flags
> +low_delay -vcodec hevc_nvenc -vf scale_cuda=1920:1080 -preset p2
> -pix_fmt yuv420p -tune hq -rc vbr -vb 700k -maxrate  800k -minrate
> 200k -bufsize 800k -g 25 -acodec copy -strict -2 -flags +global_header
> -f rtsp "rtsp://localhost:8000/stream"
>
>
> Def
>

The error may have to do with the specified pixel format filter in the
command line, specifically  " -pix_fmt yuv420p".
Remove that and retest with a command such as this one:

ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda
rtsp_transport tcp -i "rtsp://admin:Pass1@192.168.1.1" -flags
+low_delay -vcodec hevc_nvenc -vf scale_cuda=1920:1080 -preset p2
-tune hq -rc vbr -vb 700k -maxrate  800k -minrate
200k -bufsize 800k -g 25 -acodec copy -strict -2 -flags +global_header
-f rtsp "rtsp://localhost:8000/stream"

With CUDA/NVDEC hwaccel, the default pixel format will be CUDA. Inserting a
request for another format via "-pix_fmt yuv420p" as is would fail, as it
introduces the need for hwdownload and format conversion which isn't
automatic.
Please retest and report back.
___
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] Error: Impossible to convert between the formats...(Nvidia codecs)

2022-07-09 Thread Dennis Mungai
On Sat, 9 Jul 2022 at 10:25, Ben Parham  wrote:

> Hello,
>
> I try to use Nvidia codecs in live transcoding. The input stream is from an
> IP camera (Hikvision) and its color format is "*yuvj420p*". My command is:
>
> ffmpeg.exe -y -hwaccel cuda -hwaccel_output_format cuda -rtsp_transport tcp
> -i "rtsp://admin:Pass1@192.168.1.1" -flags +low_delay -vcodec hevc_nvenc
> -s 1920x1080 -preset p2 -pix_fmt yuv420p -tune hq -rc vbr -vb 700k -maxrate
> 800k -minrate 200k -bufsize 800k -g 25 -acodec copy -strict -2 -flags
> +global_header -f rtsp "rtsp://localhost:8000/stream"
>
>
> but I am faced with this error:
> Impossible to convert between the formats supported by the filter
> 'Parsed_null_0' and the filter 'auto_scale_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!
>
> if I remove  "-hwaccel_output_format cuda", the transcoding starts, but the
> decoded stream is sent to system memory. I prefer to keep it in GPU
> memory to decrease the latency.
> What should I do to fix this?
> I would appreciate any help.
>
> Regards,
> Ben.



Remove -s 1920x1080 and test

>
___
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] Hardware encoding with AV1 and FFmpeg

2022-07-05 Thread Dennis Mungai
On Tue, 5 Jul 2022, 11:37 Wang, Fei W, 
wrote:

> On Tue, 2022-07-05 at 11:15 +0300, Dennis Mungai wrote:
> > On Tue, 5 Jul 2022 at 11:03, Benjamin Parham 
> > wrote:
> >
> > > Hello.
> > >
> > > Recently Intel released the new GPU series “Intel Arc” which
> > > supports
> > > hardware encoding of AV1. They claim its speed is 50 times faster
> > > than
> > > software encoding. I’d like to know if it is available on FFmpeg?
> > > If yes,
> > > how can we use it?
> > > I would appreciate your answer.
> > >
> > > Regards,
> > > Ben.
> > >
> > >
> > Hello there,
> >
> > At the moment, what's available upstream, via libva 2.14+ is an
> > encode
> > interface for AV1 targeting  capable GPUs such as Intel's Arctic
> > Sound M
> > series.
> > See the release notes for libva 2.14 here
> > https://github.com/intel/libva/releases/tag/2.14.0
> > So far (to the best of my knowledge), no encoder wrapper for either
> > VAAPI
> > or QSV exists for AV1 encoding yet.
> > You can expect these to follow shortly after the Arctic Sound M
> > series GPUs
> > are launched, as Intel contributes heavily to these projects.
> >
> > Warm regards,
> >
> > Dennis.
>
> Hi
>
> Please take a look at this repo:
>
> https://github.com/intel-media-ci/cartwheel-ffmpeg
>
> It support QSV and VAAPI av1e both. Upstream process would be soon.
>
> Thanks
> Fei
>

>
Thanks, I'll check it out.
___
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] Hardware encoding with AV1 and FFmpeg

2022-07-05 Thread Dennis Mungai
On Tue, 5 Jul 2022 at 11:03, Benjamin Parham  wrote:

> Hello.
>
> Recently Intel released the new GPU series “Intel Arc” which supports
> hardware encoding of AV1. They claim its speed is 50 times faster than
> software encoding. I’d like to know if it is available on FFmpeg? If yes,
> how can we use it?
> I would appreciate your answer.
>
> Regards,
> Ben.
>
>
Hello there,

At the moment, what's available upstream, via libva 2.14+ is an encode
interface for AV1 targeting  capable GPUs such as Intel's Arctic Sound M
series.
See the release notes for libva 2.14 here
https://github.com/intel/libva/releases/tag/2.14.0
So far (to the best of my knowledge), no encoder wrapper for either VAAPI
or QSV exists for AV1 encoding yet.
You can expect these to follow shortly after the Arctic Sound M series GPUs
are launched, as Intel contributes heavily to these projects.

Warm regards,

Dennis.
___
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] vf_lut3d supports type 3 ?

2022-05-09 Thread Dennis Mungai
On Sun, 8 May 2022 at 22:28, Mahesh Pittala 
wrote:

> Hello,
>
> I am trying to convert HLG to SDR using 3D LUT cubes freely distributed by
> NBCUniversal. (3-NBCU_HLG2SDR_DL_v1.1.cube
> <
> https://github.com/digitaltvguy/NBCU-HDR-SDR-Single-Stream_Workflow_Recommendation/blob/main/LUTS_for_Hardware_Devices/3-NBCU_HLG2SDR_DL_v1.1.cube
> >
> )
>
> https://github.com/digitaltvguy/NBCU-HDR-SDR-Single-Stream_Workflow_Recommendation/tree/main/LUTS_for_Hardware_Devices
>
> It seems the LUT conversion appears to be a modified “Type 1” which is
> mapping absolute signal peak to narrow range (10bit code value 940).  This
> value should allow code values all the way up to 1019
>
> Does ffmpeg's lut3d implementation support type 3 ?
>
> My CLI:
> ./ffmpeg  -i Input_hlg_422_10bit.mov -vcodec v210  -vf
> "lut3d=interp=tetrahedral:file= 3-NBCU_HLG2SDR_DL_v1.1.cube
> <
> https://github.com/digitaltvguy/NBCU-HDR-SDR-Single-Stream_Workflow_Recommendation/blob/main/LUTS_for_Hardware_Devices/3-NBCU_HLG2SDR_DL_v1.1.cube
> >
> " -an  output_SDR_422.mov
>
> Thanks,
> Mahesh
>
>
Hello Mahesh,

Have you tried out the libplacebo filter in ffmpeg? It's documented to have
custom 3D LUT support and loading shaders too.
This should work on any Vulkan-capable GPU. Grab a Windows build with
Vulkan and filters enabled from https://www.gyan.dev/ffmpeg/builds/ and
test.
See the docs
https://git.ffmpeg.org/gitweb/ffmpeg.git/blobdiff/23c92e14f5fdb0c2928b44bb94d4c0711439e1c7..234c824820d4c17612c9745e74ef6c934679d138:/doc/filters.texi
___
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 opencl hwaccel, opencl tonemap, vulcan hw accel for record desktop/streaming

2022-05-04 Thread Dennis Mungai
On Wed, 4 May 2022 at 18:54, KoreanFanOfficial 
wrote:

> sry i dont understand your english
>
> ср, 4 мая 2022 г. в 11:23, Carl Zwanzig :
>
> > On 5/4/2022 7:58 AM, KoreanFanOfficial wrote:
> >
> > > output:
> > [...]
> >
> > That was not the _complete_ and uncut output. And it was top-posted,
> which
> > is not allowed on this mailing list. Do the first and not the second.
> >
> > z!



You really need to stop top-posting. See
http://catb.org/jargon/html/T/top-post.html

Secondly, complete and uncut console output is what allows us to see HOW
the ffmpeg binary was built, including the version (release or git tip
master, etc) and any spurious errors emitted regarding the command run on
your terminal.

>
___
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] Hardware acceleration for converting PNGs into VP9

2022-04-20 Thread Dennis Mungai
On Wed, 20 Apr 2022 at 14:22, Klimek, Denis <
dkli...@stadtwerke-norderstedt.de> wrote:

> Hi there,
>
> I’ve got an question regarding conversation from multiple PNGs into a VP9
> movie. Currently we are doing this job with our CPU and this is quite slow…
> about 2.5fps in average and we have multiple movies to create every hour.
> My idea was to accelerate it via an dedicated graphic card which can be
> installed into our server to speed this things up.
>
> Which graphic card can handle this work for me and which parameters or
> additional software pieces are required? (Vendor, Model)
>
> My current system is an Ubuntu 22.04 LTS 64bit and this is our current
> command line which converts the PNGs to an VP9:
> ffmpeg -y -r 4.86 -pattern_type glob -i $DIR'/*.png' -c:v libvpx-vp9 -b:v
> 0 -crf 30 -row-mt 1 -pix_fmt yuva420p -threads 8 -slices 16 -f webm
> $WORKINGDIR'/'$DIR'.webm.tmp'
> (Codeline is snipped from a bash script which fills the variables with the
> necessary values)
>
> Thanks for advance for any help 
>
> Mit freundlichem Gruß
> wilhelm.tel GmbH
>
> Denis Klimek
> Carrier Manager & Professional Network Engineer
> IP-Systemtechnik
> Tel:+49 (0) 40 / 521 04 – 1049 -> Work From Home
> Mobil: +49 (0) 151 / 652 219 06
>
> dkli...@stadtwerke-norderstedt.de
> www.wilhelm-tel.de
>
> __
>
> [cid:image005.png@01D854B9.A6B5E0D0]
>
> Postanschrift:
> wilhelm.tel GmbH
> Heidbergstraße 101-111
> 22846 Norderstedt
>
> Geschäftsführer: Jens Seedorff, Theo Weirich
> Vorsitzender des Aufsichtsrats: Christoph Mendel
> Handelsregister: HRB 4216 NO, Amtsgericht Kiel
> Umsatzsteuer ID: DE 81 299 7663
>
> [ig][fb]<
> https://www.facebook.com/wilhelmtel.norderstedt/>
>
>
>
Hello there,

The closest you can get would be with either:

1. Intel's VP9 encoder wrappers for VAAPI and QuickSync (with IceLake IGPs
and above), and this is only supported on Linux (at the moment).
The QSV encoder wrapper for VP9 isn't yet functional on Windows on any
tested hardware. VAAPI is also only available on Linux.
For the VP9 QSV encoder wrapper usage, see
https://superuser.com/a/1644371/473795 for a good starting point with known
limitations.
For the VP9 VAAPI encoder wrapper usage, see
https://stackoverflow.com/a/55036502/4675388 , and there are some known
limitations with that encoder too.
I'll retest this and report back as soon as I have access to Intel's
(release or engineering sample silicon's) Xe and Arc GPU products, in (both
discrete and) integrated where available.
Expect a transition towards OneVPL (from QuickSync) for these workloads as
from Intel's CometLake (10th Generation) and newer, and Intel Atom X moving
forward. See
https://www.intel.com/content/www/us/en/developer/articles/technical/onevpl-codecs-for-intel-hardware.html
for more details.

*Special notes:* 7th Generation KBL (Kabylake) GPUs have support for VP9
encoding wired up and available via VAAPI and *unofficially* via the
media-driver package patched with the approriate hybrid encode mode
enabled, see
https://github.com/sreerenjb/media-driver/tree/vp9-enc-gen9-vme-pak
However, this comes with multiple caveats, as noted on these PRs and issues:
(a). https://github.com/intel/intel-vaapi-driver/pull/209
(b). https://github.com/intel/intel-vaapi-driver/issues/87
Which resulted in this decision not to wire up the functionality (by
default) in the media-driver package:
https://github.com/intel/media-driver/issues/630#issuecomment-495498209

2. On Mac OSX:

There is potential for VP9 hardware-accelerated encoding via videotoolbox
in future(?) M-series chips, considering that we now have H/W accelerated
decoding for the same, see
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/a41a2efc85f8c88caec10040ee437562f9d0b947
.
Wouldn't bet too much on this (for now), but its' very feasible that Apple
will eventually enable this function on their chips at some point.

Warm regards,

Dennis.

Warm regards,

Dennis.
___
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] Packages needed to enable nvenc (NVIDIA)

2022-01-05 Thread Dennis Mungai
On Wed, 5 Jan 2022 at 12:11, Def Etienne  wrote:

>
> Greetings,
>
> I just noticed from another thread that almost all development packages
> could be installed like below:
> “sudo apt-get -y install \
>  yasm libx264-dev libx265-dev libnuma-dev libvpx-dev \
>  libfdk-aac-dev libmp3lame-dev libopus-dev”
>
> What development package(s) do I need and what —enable-* do I add if I
> would like to use the c:v h264_nvenc option?
>
> Thanks for any help
>
> Def
>
> Sent from my iPhone
>
>
You'll need the nv-codec-headers package, which you can build and install
from https://github.com/FFmpeg/nv-codec-headers
Your Linux distro may also package the same (albeit an older build, pinned
to a specific release) by the name ffnvcodec , ffnvcodec-headers, etc.
___
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] OVERLAY_CUDA and PGS Subtitle burn

2021-11-23 Thread Dennis Mungai
On Tue, 23 Nov 2021 at 13:46, Dennis Mungai  wrote:

> On Thu, 1 Oct 2020 at 03:57, Panda Sing Cool 
> wrote:
>
>> Hi Community,
>>
>> Updated to the  Cuda 11.1 (latest) and NVD drivers 455.23.04 (latest
>> beta),
>> FFmpeg Git and nv-codec-headers from today. Same result. no subtitles.
>> So i will take a break on this option, maybe some bugs somewhere , which
>> will have to wait until a dev has a look on this :)
>>
>> Is it something I can highlight on the Dev FFmpeg list, or the dev list is
>> only reserved/exclusive for the dev ?
>>
>> So, i'm using now the traditional overlay filter, which give me the result
>> i'm looking for:
>>
>> /ffmpeg -y -init_hw_device cuda=cuda -hwaccel cuda -i input.mkv
>> -filter_complex
>> "[0:v][0:s]overlay[vid];[vid]hwupload,scale_cuda=w=-1:h=720[vid]" -map
>> "[vid]" -c:v h264_nvenc test.mkv
>>
>> i'm running around 400 fps (x16) on this command on my gear. Not sure if
>> this is considered slow or fast, but for my own requirements it's nice
>> already.
>>
>> Question related to this part only:
>>-filter_complex
>> "[0:v][0:s]overlay[vid];[vid]hwupload,scale_cuda=w=-1:h=720[vid]" :
>>
>>  - based on this simple command, any tips/tricks to increase the FPS or
>> it's considered already optimal.
>>
>>
>> Many thanks.
>>
>>
>>
>> On Wed, 23 Sep 2020 at 08:08, Panda Sing Cool 
>> wrote:
>>
>> > Hi Dennis,
>> >
>> > thanks for the link. I have rebuild ffmpeg with all the latest version
>> of
>> > any source i can find, update to the latest cuda 11 patch 3 and NV
>> > headers...
>> > Also included the latest vulkan sdk and support for ffmpeg.
>> >
>> > overlay_cuda and overlay_opencl, same issue: video appear but not
>> subtitle.
>> > overlay_vulkan -> direct crash dump from ffmpeg.
>> >
>> > :(
>> >
>> > Any change from your side ?
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Fri, 18 Sep 2020 at 22:46, Dennis Mungai  wrote:
>> >
>> >> On Thu, 17 Sep 2020 at 03:29, Panda Sing Cool > >
>> >> wrote:
>> >>
>> >> > Hi,
>> >> >
>> >> > Changed the input format:
>> >> > Video -> yuv420p
>> >> > Sub -> yuv*a*420p (to include Alpha Channel)
>> >> >
>> >> > Now the video is showing, but still no subtitles.
>> >> > Still get the error message:
>> >> > *Error while add the frame to buffer source(Internal bug, should not
>> >> have
>> >> > happened).*
>> >> >
>> >> >
>> >> > ./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags
>> +genpts-fastseek
>> >> \
>> >> >-ss 00:00:00 -t 00:00:15 \
>> >> >-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1
>> >> > -filter_complex_threads 1 \
>> >> >-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda
>> >> > -hwaccel_output_format cuda \
>> >> >-i input.mkv \
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > *   -filter_complex \
>> >> > "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=yuv420p[vid]; \
>> >> >[0:s]format=yuva420p,hwupload[sub]; \
>> >>  [vid][sub]overlay_cuda[v]"
>> >> > \*-map "[v]" -map 0:a \
>> >> >-force_key_frames "expr:gte(t,n_forced*5)" \
>> >> >-c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \
>> >> >-rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v
>> >> 2000K
>> >> > -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac
>> >> > -b_ref_mode:v middle \
>> >> >-c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \
>> >> >output.mkv
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > On Thu, 17 Sep 2020 at 07:08, Panda Sing Cool <
>> pandacools...@gmail.com>
>> >> > wrote:
>> >> >
>> >> > > Hi everyone,
>> >> > >
>> >> > > i'm trying to use the OVERLAY_CUDA function to burn PGS titles
>> over a
>> >> > > video and the re

Re: [FFmpeg-user] OVERLAY_CUDA and PGS Subtitle burn

2021-11-23 Thread Dennis Mungai
On Thu, 1 Oct 2020 at 03:57, Panda Sing Cool 
wrote:

> Hi Community,
>
> Updated to the  Cuda 11.1 (latest) and NVD drivers 455.23.04 (latest beta),
> FFmpeg Git and nv-codec-headers from today. Same result. no subtitles.
> So i will take a break on this option, maybe some bugs somewhere , which
> will have to wait until a dev has a look on this :)
>
> Is it something I can highlight on the Dev FFmpeg list, or the dev list is
> only reserved/exclusive for the dev ?
>
> So, i'm using now the traditional overlay filter, which give me the result
> i'm looking for:
>
> /ffmpeg -y -init_hw_device cuda=cuda -hwaccel cuda -i input.mkv
> -filter_complex
> "[0:v][0:s]overlay[vid];[vid]hwupload,scale_cuda=w=-1:h=720[vid]" -map
> "[vid]" -c:v h264_nvenc test.mkv
>
> i'm running around 400 fps (x16) on this command on my gear. Not sure if
> this is considered slow or fast, but for my own requirements it's nice
> already.
>
> Question related to this part only:
>-filter_complex
> "[0:v][0:s]overlay[vid];[vid]hwupload,scale_cuda=w=-1:h=720[vid]" :
>
>  - based on this simple command, any tips/tricks to increase the FPS or
> it's considered already optimal.
>
>
> Many thanks.
>
>
>
> On Wed, 23 Sep 2020 at 08:08, Panda Sing Cool 
> wrote:
>
> > Hi Dennis,
> >
> > thanks for the link. I have rebuild ffmpeg with all the latest version of
> > any source i can find, update to the latest cuda 11 patch 3 and NV
> > headers...
> > Also included the latest vulkan sdk and support for ffmpeg.
> >
> > overlay_cuda and overlay_opencl, same issue: video appear but not
> subtitle.
> > overlay_vulkan -> direct crash dump from ffmpeg.
> >
> > :(
> >
> > Any change from your side ?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Fri, 18 Sep 2020 at 22:46, Dennis Mungai  wrote:
> >
> >> On Thu, 17 Sep 2020 at 03:29, Panda Sing Cool 
> >> wrote:
> >>
> >> > Hi,
> >> >
> >> > Changed the input format:
> >> > Video -> yuv420p
> >> > Sub -> yuv*a*420p (to include Alpha Channel)
> >> >
> >> > Now the video is showing, but still no subtitles.
> >> > Still get the error message:
> >> > *Error while add the frame to buffer source(Internal bug, should not
> >> have
> >> > happened).*
> >> >
> >> >
> >> > ./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags
> +genpts-fastseek
> >> \
> >> >-ss 00:00:00 -t 00:00:15 \
> >> >-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1
> >> > -filter_complex_threads 1 \
> >> >-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda
> >> > -hwaccel_output_format cuda \
> >> >-i input.mkv \
> >> >
> >> >
> >> >
> >> >
> >> > *   -filter_complex \
> >> > "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=yuv420p[vid]; \
> >> >[0:s]format=yuva420p,hwupload[sub]; \
> >>  [vid][sub]overlay_cuda[v]"
> >> > \*-map "[v]" -map 0:a \
> >> >-force_key_frames "expr:gte(t,n_forced*5)" \
> >> >-c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \
> >> >-rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v
> >> 2000K
> >> > -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac
> >> > -b_ref_mode:v middle \
> >> >-c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \
> >> >output.mkv
> >> >
> >> >
> >> >
> >> >
> >> > On Thu, 17 Sep 2020 at 07:08, Panda Sing Cool <
> pandacools...@gmail.com>
> >> > wrote:
> >> >
> >> > > Hi everyone,
> >> > >
> >> > > i'm trying to use the OVERLAY_CUDA function to burn PGS titles over
> a
> >> > > video and the result is not working.
> >> > > i might  misunderstand the usage of this function, so some help is
> >> > welcome.
> >> > >
> >> > > The result of this command is a black screen with audio, using
> >> 'standard'
> >> > > overlay filter is working fine, but slow ...
> >> > >
> >> > > Notice this message at the end of the log file (ffmpeg version
> >> > > N-99194-g142ae27b1d ( compiled myself from git) ):
> >> > > *Error

Re: [FFmpeg-user] ffmpeg binary audio error

2021-11-15 Thread Dennis Mungai
On Mon, 15 Nov 2021, 23:12 Mahmoud Elgohary, <
mahmoud.elgoh...@teqnia-tech.com> wrote:

> Hi every one,
>
>
>
>
>
> I'm try to use ffmpeg binary to record video from webcam and audio with
> this command
>
> ffmpeg -f alsa -ac 2 -i default -itsoffset '00:00:00.5' -f video4linux2 -s
> 320x240 -r 25 -i /dev/video0 'temp.mp4'"
>
>
>
> but get this error
>
> ALSA lib ../../src/conf.c:3725:(snd_config_hooks_call) Cannot open shared
> library libasound_module_conf_pulse.so
> (/usr/lib/alsa-lib/libasound_module_conf_pulse.so: cannot open shared
> object file: No such file or directory) ALSA lib
> ../../../src/pcm/pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
> [alsa @ 0x6342e00] cannot open audio device default (No such file or
> directory) default: Input/output error
>
> also I user ffmpeg to run it and run , any advice
>
>
>
> Mahmoud Elgohary
>
> CEO, Founder Of Teqnia tech
>
> Teqnia-Tech
>
>
> Mobile:+2 0100 6395 340
>
> Email : mailto:mahmoud.elgoh...@edusofteg.com
>
> Website :
>
> Address:  57A Intersection of 10 St with Demashk St El Maadi, Cairo
> Governorate, Egypt
> ___
> 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".
>



See this https://trac.ffmpeg.org/wiki/Capture/ALSA

>
___
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 cpu loading

2021-11-12 Thread Dennis Mungai
On Fri, 12 Nov 2021 at 18:01, LianCheng  wrote:

> Hi,
>
> I tried to run several ffmpeg processes with different input mp4 files and
> to different outputs within my PC (having Intel Core i7). The mp4 video
> resolution is full HD format.
>
> ffmpeg -re -stream_loop -1 -i 1.mp4 -c:v libx264 -preset ultrafast -tune
> zerolatency -maxrate 2M -bufsize 2M -r 20 -g 60 -an -c:a copy -f rtsp
> rtsp://:1935/cam-1
> ffmpeg -re -stream_loop -1 -i 2.mp4 -c:v libx264 -preset ultrafast -tune
> zerolatency -maxrate 2M -bufsize 2M -r 20 -g 60 -an -c:a copy -f rtsp
> rtsp://:1935/cam-2
> ffmpeg -re -stream_loop -1 -i 3.mp4 -c:v libx264 -preset ultrafast -tune
> zerolatency -maxrate 2M -bufsize 2M -r 20 -g 60 -an -c:a copy -f rtsp
> rtsp://:1935/cam-3
>   :
>   :
> ffmpeg -re -stream_loop -1 -i N.mp4 -c:v libx264 -preset ultrafast -tune
> zerolatency -maxrate 2M -bufsize 2M -r 20 -g 60 -an -c:a copy -f rtsp
> rtsp://:1935/cam-N
>
> If I run 6 of the above ffmpeg processes, the CPU hits 100%.
>
> Are the parameters used optimized? I need to keep the CPU below 80%.
>
> Will having GPU (like nvidia)  help to increase the number of ffmpeg
> processes that can be run?
>
>
Hello there,

You  could try to reduce threads (set via threads  -n, where n is lower
than the number of total CPUs on your system).
I'd typically recommend a thread setting of no more than 4, especially for
hardware-based encoders such as Intel's QSV & VAAPI, and NVIDIA's NVENC.

A GPU-based encoder wrapper (depending on the platform you're on and the
implementation in use) *can* somewhat overcome that limitation, with
caveats:

1. NVIDIA's NVENC consumer GPUs are limited to 2 encode sessions per GPU.
This can be somewhat overcome with Keylase's patcher, see
https://github.com/keylase/nvidia-patch
2. Only very  specific codecs (and codec features) may be supported by the
hardware-accelerated encoder wrapper in use, and as such, outpuit may not
always be directly comparable to a software-based implementation.
Please see FFmpeg's HWAccel wiki on the same:
https://trac.ffmpeg.org/wiki/HWAccelIntro

Warm regards,

Dennis.
___
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] HW Acceleration 101? 2-Up Streaming from RTSP-->ffmpeg-->YouTube

2021-11-08 Thread Dennis Mungai
On Mon, 8 Nov 2021 at 20:44, andrei ka  wrote:

> you could simply plug a recent low profile nvidia (e.g. 1030) into pcie
> slot of your hpe micro and nvenc would do 2 fhd h264 encodes like a charm
> 
>
> On Sun, Nov 7, 2021 at 11:40 PM Steven Kan  wrote:
>
> > > On Jan 18, 2021, at 10:42 PM, Carl Eugen Hoyos 
> > wrote:
> > >
> > > Am Mo., 18. Jan. 2021 um 23:34 Uhr schrieb Steven Kan  >:
> > >>
> > >>> On Jan 18, 2021, at 12:50 PM, Michael Koch <
> > astroelectro...@t-online.de> wrote:
> > >
> >  C:\Program Files\ffmpeg\bin> .\ffmpeg.exe -re -thread_queue_size
> 1024
> > -i rtsp://anonymous:password@192.168.1.47:554 -i rtsp://
> > anonymous:password@192.168.1.50:554 -vcodec h264_amf -acodec copy -t
> > 01:47:02 -filter_complex hstack=inputs=2 -f flv out.flv
> > 
> >  [snip
> > >>
> >  Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554':
> >  Metadata:
> >    title   : Media Server
> >  Duration: N/A, start: 0.08, bitrate: N/A
> >    Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive),
> > 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
> >  Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554':
> >  Metadata:
> >    title   : Media Server
> >  Duration: N/A, start: 0.10, bitrate: N/A
> >    Stream #1:0: Video: h264 (Main), yuv420p(progressive), 1920x1080,
> > 100 tbr, 90k tbn, 180k tbc
> > >>>
> > >>> I see that the two streams have different pixel formats yuvj420p and
> > yuv420p. You could try to bring them to the same pixel format before
> using
> > hstack.
> > >>> [0]format=yuv420p[a];[a][1]hstack
> > >>>
> > >>> It's only a wild guess, I'm not sure.
> > >>
> > >> Do I put this into the filter_complex argument, e.g. -filter_complex
> > "[0]format=yuv420p[a];[a][1] hstack=inputs=2”
> > >>
> > >> That still results in the "Conversion failed!” error.
> > >
> > > There is a "scale" missing behind format iirc but for performance
> > reasons you
> > > want to overwrite the pix_fmt instead, not sure if this is possible.
> >
> > Some progress, here. I’m now attempting this on an M1-powered Mac mini:
> >
> > ./ffmpeg -thread_queue_size 1024 -hwaccel videotoolbox -i rtsp://
> > anonymous:password@192.168.1.47:554 -hwaccel videotoolbox -i rtsp://
> > anonymous:password@192.168.1.50:554 -vcodec h264_videotoolbox -acodec
> > copy -t 01:00:00 -filter_complex hstack=inputs=2 -f flv "rtmp://
> > a.rtmp.youtube.com/live2/ >
> > which results in:
> >
> > ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
> >   built with Apple clang version 12.0.0 (clang-1200.0.32.27)
> >   configuration: --prefix=/Volumes/tempdisk/sw
> > --extra-cflags=-fno-stack-check --arch=arm64 --cc=/usr/bin/clang
> > --enable-gpl --enable-videotoolbox --enable-libopenjpeg --enable-libopus
> > --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx
> > --enable-libwebp --enable-libass --enable-libfreetype --enable-libtheora
> > --enable-libvorbis --enable-libsnappy --enable-libaom --enable-libvidstab
> > --enable-libzimg --enable-libsvtav1 --enable-version3
> > --pkg-config-flags=--static --disable-ffplay --enable-postproc
> > --enable-nonfree --enable-neon --enable-runtime-cpudetect
> > --disable-indev=qtkit --disable-indev=x11grab_xcb
> >   libavutil  56. 70.100 / 56. 70.100
> >   libavcodec 58.134.100 / 58.134.100
> >   libavformat58. 76.100 / 58. 76.100
> >   libavdevice58. 13.100 / 58. 13.100
> >   libavfilter 7.110.100 /  7.110.100
> >   libswscale  5.  9.100 /  5.  9.100
> >   libswresample   3.  9.100 /  3.  9.100
> >   libpostproc55.  9.100 / 55.  9.100
> > Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554':
> >   Metadata:
> > title   : Media Server
> >   Duration: N/A, start: 0.08, bitrate: N/A
> >   Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive),
> > 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
> > Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554':
> >   Metadata:
> > title   : Media Server
> >   Duration: N/A, start: 0.06, bitrate: N/A
> >   Stream #1:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 100
> > tbr, 90k tbn, 180k tbc
> >   Stream #1:1: Audio: aac (LC), 8000 Hz, mono, fltp
> > Stream mapping:
> >   Stream #0:0 (h264) -> hstack:input0
> >   Stream #1:0 (h264) -> hstack:input1
> >   hstack -> Stream #0:0 (h264_videotoolbox)
> >   Stream #1:1 -> #0:1 (copy)
> > Press [q] to stop, [?] for help
> > [rtsp @ 0x14a00ca00] max delay reached. need to consume packet
> > [rtsp @ 0x14a00ca00] RTP: missed 146 packets
> > [rtsp @ 0x139013a00] Thread message queue blocking; consider raising the
> > thread_queue_size option (current value: 8)
> > [rtsp @ 0x14a00ca00] max delay reached. need to consume packet
> > [rtsp @ 0x14a00ca00] RTP: missed 80 packets
> > Output #0, flv, to 'rtmp://
> > a.rtmp.youtube.com/live2/q9rg-sqaq-f0mg-yj1c-e42f':
> >   Metadata:
> > title   : 

Re: [FFmpeg-user] Information about using FFmpeg's vbr_hq (VBR High Quality)

2021-11-07 Thread Dennis Mungai
On Sun, 7 Nov 2021 at 15:52, Fabrizio Negro  wrote:

> Hello!
> I recently started using FFmpeg to convert files.
> Specifically I am trying to encode with FFmpeg in H264 - NVENC trying to
> get the same export quality as Davinci Resolve that uses the NVIDIA
> encoder.
> Unfortunately I'm not succeeding and I think it's because FFmpeg doesn't
> accept -rc: v vbr_hq (VBR High Quality) but only -rc: v vbr (VBR).
> I don't understand why since -rc: v vbr_hq falls under the H264 - NVENC
> options of FFmpeg.
> Can someone help me?
> Thanks!
> (I am a Windows user)
>
>
> ffmpeg -c:v h264_nvenc -preset:v p7 -tune:v ull -profile:v high -rc:v vbr
> -cq:v 1 -b:v 25000k -maxrate:v 25000k -bufsize:v 13000k
>
>
Can you provide:

1. The ffmpeg version you're running? ffmpeg -builldconf should print that
out, and
2. The nvenc encoder wrapper options available to your build? Run ffmpeg -h
encoder=h264_nvenc and attach that to this thread.

>From there, you can be assisted.
___
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] Ryujinx FFMpeg crash upon decoding h264

2021-10-19 Thread Dennis Mungai
On Tue, 19 Oct 2021 at 09:10, Auron Hines 
wrote:

> When any game requests for h264 decoding, we use ffmpeg for this, however,
> AMD users seem to be getting an error upon decoding.
>
> Ryujinx.NvdecProcessor Application : Unhandled exception caught:
> System.ArgumentNullException: Value cannot be null. (Parameter 'ptr')
>at
> System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(IntPtr
> ptr, Type t)
>at
> System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer[TDelegate](IntPtr
> ptr)
>at Ryujinx.Graphics.Nvdec.FFmpeg.FFmpegContext..ctor(AVCodecID codecId)
>at Ryujinx.Graphics.Nvdec.FFmpeg.H264.Decoder..ctor()
>at Ryujinx.Graphics.Nvdec.NvdecDecoderContext.GetH264Decoder()
>at Ryujinx.Graphics.Nvdec.H264Decoder.Decode(NvdecDecoderContext
> context, ResourceManager rm, NvdecRegisters& state)
>at Ryujinx.Graphics.Nvdec.NvdecDevice.Decode(CodecId codecId)
>at Ryujinx.Common.AsyncWorkQueue`1.DoWork()
>at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
>at System.Threading.ExecutionContext.RunInternal(ExecutionContext
> executionContext, ContextCallback callback, Object state)
> --- End of stack trace from previous location ---
>at System.Threading.ExecutionContext.RunInternal(ExecutionContext
> executionContext, ContextCallback callback, Object state)
>at System.Threading.ThreadHelper.ThreadStart()
>
> Code with error:
> https://github.com/Ryujinx/Ryujinx/blob/master/Ryujinx.Graphics.Nvdec.FFmpeg/FFmpegContext.cs#L27
> [
> https://opengraph.githubassets.com/fa03eb0f8870608392d3c7c7742748921a08c9159e27c3086c4f28a47c9a7c57/Ryujinx/Ryujinx
> ]<
> https://github.com/Ryujinx/Ryujinx/blob/master/Ryujinx.Graphics.Nvdec.FFmpeg/FFmpegContext.cs#L27
> >
> Ryujinx/FFmpegContext.cs at master · Ryujinx/Ryujinx<
> https://github.com/Ryujinx/Ryujinx/blob/master/Ryujinx.Graphics.Nvdec.FFmpeg/FFmpegContext.cs#L27
> >
> Experimental Nintendo Switch Emulator written in C# -
> Ryujinx/FFmpegContext.cs at master · Ryujinx/Ryujinx
> github.com
> System info: https://pastebin.com/jYFBSt0F
>
>
>
And why are you using NVDEC on an AMD GPU for hwaccel decode?
___
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 DASH Optional Adaptation Set

2021-07-15 Thread Dennis Mungai
On Thu, 15 Jul 2021 at 16:52, Mar Andrés López  wrote:

> Dear All,
>
>
> I am using the following FFmpeg command for dash generation,
>
>
> ffmpeg -i video.mpeg -preset superfast -r 30 -vcodec libx264 -acodec aac
> -b:a 128k -ac 1 -ar 44100 -map v:0 -b:v:0 150 -s:v:0 768x432 -map v:0
> -b:v:1 75 -s:v:1 640x360 -map v:0 -b:v:2 50 -s:v:2 512x288 -map
> 0:a? -f dash -adaptation_sets "id=0,streams=v id=1,streams=a"
> -utc_timing_url manifest-mpd.
>
>
> Currently the manifest is creating an empty adaptation set for videos
> which do not contain audio:
>
>
>  segmentAlignment="true" bitstreamSwitching="true">
>
>
> I thougth that by using -map 0:a? i would make it optional but it is not
> the case. As you see above the adaptation set is still created.
>
>
>
What version of FFmpeg are you using?

>
>
___
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] fragmented mp4 and playing while converting

2021-05-05 Thread Dennis Mungai
On Sun, 2 May 2021 at 04:54, Julien Dotsev  wrote:

> Hi, I'm looking for a possibility to play the output file during the
> conversion. I tried with fragmented mp4 and this command:
> ffmpeg -i input.avi -movflags
> +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov output.mp4
>
> The problem I have is that when I play the output it plays until the
> momentary time duration of the video. For example If I hit play and I have
> 2 min converted video at that moment it will play just the 2 minutes and it
> will not play more even if at the end of that 2 minutes all the video is
> converted.
>
> Is there any way to let the video play all the way during its conversion?
> Maybe some way  to insert the real time duration of the video? or maybe
> another video format? Anything that can let me play the video in an html
>  tag during its conversion.
>
> Thank you.


Try this:

ffmpeg -re -i input.avi -movflags
+faststart  output.mp4

That will encode the file in real time, allowing for real time playback.

The other movfpags are useless unless you’re writing fragmented content,
such as fmp4 for HLS or DASH. The faststart movflag is sufficient.
___
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] [FPGA HEVC Encode Plugin] Tutorial and Performance Review

2021-03-19 Thread Dennis Mungai
On Fri, 19 Mar 2021, 10:56 tai truong,  wrote:

> Hi every one,
>
>   Sorry for my first naive question. As googling, I found some talk about
> fpga hevc encode plugin for ffmpeg from Xilinx. Is there anyone have work
> on it? Some result/benchmark on performance either for suggestions and
> views. Thank you very much.
>
> Best regards,
> Tai Truong
> _
>

Hello Tai,

You're most likely referring to the NGCodec FPGA product on AWS, correct?

To the best of my knowledge, it's only accessible on AWS. I'll investigate
further and report back on performance , etc.

The possibility of that being in a commercial product outside AWS is quite
low, so I wouldn't put too much hope into seeing it integrated into
workflows outside AWS.

I've also been looking at Broadcom's VKIL ("Valkyrie"), a PCIe based
offload accelerator for video transcoding currently in use at Facebook and
elsewhere. You may find patchwork on this mailing list from one or more
Broadcom employees on the same. From the look of things, this hardware nah
soon be available to the general public and data center integrators for
video transcode offload accelerators, in a fashion similar to Intel's (now
deprecated) Visual Compute Accelerator.

>
___
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] 4K RGB->YUV realtime conversion.

2021-03-08 Thread Dennis Mungai
On Mon, 8 Mar 2021 at 17:49, Anders Degerberg  wrote:

> Hi,
>
> I've come across a problem I really can't figure out when trying to stream
> realtime a RGB 10-bit Decklink input, as YUV444 10-bit HEVC in 25fps.
>  In a 1920x1080 resolution on the Decklink input, it all works very well,
> using hevc_nvenc codec on a Nvidia GPU. Auto_scaler kicks in converting the
> correctly identified 'gbrp10le' input format to 'yuv44416le' for
> hevc_nvenc.
> But doing the same in 4K resolution causes input buffer overruns, only
> capable of about 20 fps. When watching CPU usage, there's only real load on
> one of the 32 threads, and that load is maxing out at 99%. CPU frequency is
> close to 4GHz on the AMD CPU.
> If I then switch the Decklink input to YUV instead, 4K works fine, so the
> hevc encoding on the gpu or streaming protocol is not the bottleneck.
>  This makes me think the problem lies with the auto_scaler RGB->YUV not
> keeping up with 4096x2160 pixels. This RGB->YUV conversion is done in
> libswscale I understand. I've tried to use -filter_threads and -threads to
> increase thread usage of the swscale, but it still seems to use only one
> thread.
>
>  Any suggestions how I can do this 4K RGB 10-bit->YUV444 10-bit colorspace
> conversion in ffmpeg in realtime?
>
> I've tried to hwupload to the gpu to be able to use scale_npp, but
> auto_scaler kicks in before I have the chance to send the RGB data to the
> -vf filters.
>
> I've also tried to build with a patch for multi-thread swscale found here:
>
> https://patchwork.ffmpeg.org/project/ffmpeg/patch/c1125bd979e9ae41908dc4913cbfacbb67a31...@irsmsx103.ger.corp.intel.com/
> But this patch doesn't seem to make a difference for the rgb2yuv colorspace
> conversions, it's probably only affective for image up/downscaling?
>
> Kind regards
> Anders
>
>

Hello there,

What is your exact ffmpeg command, and output?
___
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] (no subject)

2021-01-26 Thread Dennis Mungai
On Tue, 26 Jan 2021, 03:14 owen s,  wrote:

> I am running this command
>
> ffmpeg-git -y \
> -vaapi_device /dev/dri/renderD128 \
> -framerate 60 -i ./image.jpg \
> -stream_loop -1 -i ./audio.mp3 \
> -map 0:v \
> -c:v h264_vaapi \
> -vf
>
> 'crop=2560:1440:0:0,format=nv12|vaapi,hwupload,loop=loop=-1:size=1:start=0,hwdownload,format=yuv420p'
> \
> -rc_mode 2 -b:v 20M \
> -c:v libx264 \
> -map 1:a \
> -c:a libfdk_aac -b:a 128k -ar 44100 -ac 2 \
> -af "dynaudnorm=f=150:g=15" \
> -f flv /dev/null
>
> the encoding speed is very fast, typically 1.78x
>
> frame=2512127 fps=107 q=0.0 size=56457493kB time=11:37:47.36
> bitrate=11046.8kbits/s speed=1.79x
>
> Is there any way to limit this speed to a standard 1x?
> ___
>


Add the realtime filter to your filter chain, right before crop. So you'd
have -vf "realtime,crop..." etc

>
___
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] error with cuda for convert ts to mp4

2021-01-11 Thread Dennis Mungai
On Mon, 11 Jan 2021, 04:30 Michele Salerno,  wrote:

> Hi,
>
> i have GPU GTX660Ti on debian buster 64bit, cpu intel core i7.
>
> I have fresh install debian and install latest driver and cuda from
> website nvidia, no repository of debian.
>
> If convert file h264 with cpu it's ok, if use gpu i have error.
>
> The video prova.ts is recorder from decoder sat.
>
> The command used is:
>
> ffmpeg -y -threads 8 -vsync 0 -hwaccel cuda -i prova.ts -r 24 -c:v
> h264_nvenc -filter_complex yadif=parity=tff:deint=all,scale=1920:1080
> -b:v 3M -c:a aac -b:a 192k -ar 48000 prova.mp4
>
> This is output
>
> https://pastebin.com/uW9knqkz
>
> what is the error?
>
> Thanks.
>
> Best regards.
>
> Michele
>
>
> ___
>


Michele,

Use this:

ffmpeg -y -threads 1 -hwaccel cuda -i prova.ts -r 24 -c:v
h264_nvenc -filter_complex yadif_cuda,scale_cuda=1920:1080
-b:v 3M -c:a aac -b:a 192k -ar 48000 prova.mp4

Notes:

You're using nvdec hwaccel. Lower thread count for the decoder to 1, and
likewise use filters running on the GPU to prevent the need for hwdownload
filters.

>
___
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] H264_QSV reference

2020-11-05 Thread Dennis Mungai
On Thu, 5 Nov 2020 at 10:56, Stephan Monecke 
wrote:

> Hi,
>
> does anyone know where I can find a complete command argument
> reference for the h264_qsv encoder?
>
> E.g. `-global_quality` as one of the main parameters is not present in
> `fmpeg -h encoder=h264_qsv`.
>
> Thanks a lot!
>
> Cheers,
> Stephan
>
>
Start here https://ffmpeg.org/ffmpeg-codecs.html#QSV-encoders
___
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] SCTE-35 implementation already (bounty)

2020-09-22 Thread Dennis Mungai
On Tue, 22 Sep 2020, 13:43 Dennis Mungai,  wrote:

> On Tue, 22 Sep 2020, 13:12 andrei ka,  wrote:
>
>> btw, tsduck suite can extract pts of scte35, chances are you could make
>> filter_complex_script with these pos to insert kframes
>> 
>>
>>
>> On Wed, Sep 2, 2020 at 6:36 AM MediaStream  wrote:
>>
>> > Looking for SCTE-35 pass through implementation:
>> >
>> > 1. Extract SCTE-35 from MPEG-TS.
>> > 2. Translate timing of the original SCTE-35 events to match timing in
>> the
>> > output file appropriately or keep timing as is.
>> > 3. Signal encoder to force key frames at the boundaries of the SCTE-35
>> > event.
>> > 4. Inject SCTE-35 messaging into output MP4 files as emsg and into MPD
>> and
>> > M3U8 manifests if/as needed.
>> >
>> > More info:
>> > https://www.w3.org/TR/media-timed-events/#scte-35
>> >
>> >
>> https://www.tvtechnology.com/opinions/scte10435-and-beyond-a-look-at-ad-insertion-in-an-ott-world
>> >
>> > source TS file with SCTE-35 also saved as ES and XML:
>> > https://www.mediafire.com/folder/zv20csqeo1ixt/
>> >
>> > Bounty of $2,500.00 USD (up to Oct 2020)
>>
>
> So can gstreamer's mpegts muxer implementation.
>

To clarify: Devin's ffmpeg branch (linked above) delivers the first two
objectives. However, these patches need to be forward-ported to git master,
as they also require significant fix-ups to be applied to the mpegts muxer.

That way, a downstream packager can use the SCTE-35 payloads to insert the
relevant splices to the HLS and DASH manifests.

>
___
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] SCTE-35 implementation already (bounty)

2020-09-22 Thread Dennis Mungai
On Tue, 22 Sep 2020, 13:12 andrei ka,  wrote:

> btw, tsduck suite can extract pts of scte35, chances are you could make
> filter_complex_script with these pos to insert kframes
> 
>
>
> On Wed, Sep 2, 2020 at 6:36 AM MediaStream  wrote:
>
> > Looking for SCTE-35 pass through implementation:
> >
> > 1. Extract SCTE-35 from MPEG-TS.
> > 2. Translate timing of the original SCTE-35 events to match timing in the
> > output file appropriately or keep timing as is.
> > 3. Signal encoder to force key frames at the boundaries of the SCTE-35
> > event.
> > 4. Inject SCTE-35 messaging into output MP4 files as emsg and into MPD
> and
> > M3U8 manifests if/as needed.
> >
> > More info:
> > https://www.w3.org/TR/media-timed-events/#scte-35
> >
> >
> https://www.tvtechnology.com/opinions/scte10435-and-beyond-a-look-at-ad-insertion-in-an-ott-world
> >
> > source TS file with SCTE-35 also saved as ES and XML:
> > https://www.mediafire.com/folder/zv20csqeo1ixt/
> >
> > Bounty of $2,500.00 USD (up to Oct 2020)
>

So can gstreamer's mpegts muxer implementation.

>
___
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-devel] SCTE-35 implementation already (bounty)

2020-09-18 Thread Dennis Mungai
On Wed, 2 Sep 2020 at 07:29, MediaStream  wrote:

> Looking for SCTE-35 pass through implementation:
>
> 1. Extract SCTE-35 from MPEG-TS.
> 2. Translate timing of the original SCTE-35 events to match timing in the
> output file appropriately or keep timing as is.
> 3. Signal encoder to force key frames at the boundaries of the SCTE-35
> event.
> 4. Inject SCTE-35 messaging into output MP4 files as emsg and into MPD and
> M3U8 manifests if/as needed.
>
> More info:
> https://www.w3.org/TR/media-timed-events/#scte-35
>
> https://www.tvtechnology.com/opinions/scte10435-and-beyond-a-look-at-ad-insertion-in-an-ott-world
>
> source TS file with SCTE-35 also saved as ES and XML:
> https://www.mediafire.com/folder/zv20csqeo1ixt/
>
> Bounty of $2,500.00 USD (up to Oct 2020)
>
>
Hello there,

Please contact Devin Heitmueller (copied herein) for more on the same.
There's a branch with the SCTE-35 fix-ups here:
https://github.com/LTNGlobal-opensource/FFmpeg-ltn/commits/ltn_thumbnailer
Though its' based on an FFmpeg code-base from ~2 years ago. To get it to
run, try a minimalist build with the bare essentials enabled, as some
(newer) libraries such as libfdk-aac will give you trouble.

What I can confirm is that indeed, the SCTE-35 payloads can be passed
through and re-timed in mpegts muxer. So task (1) and (2) are *mostly*
complete. Let Devin confirm that for you.
There's also a generic bitstream filter you can use to dump the SCTE-35
messages.
See:
1.
https://github.com/LTNGlobal-opensource/FFmpeg-ltn/commit/f91fa5cc67b43183cf0bd6dab3b468bd2b94056d
2.
https://github.com/LTNGlobal-opensource/FFmpeg-ltn/commit/a04d2bbbc9829a5332472d86d5b86e69d1f7ec5d
3.
https://github.com/LTNGlobal-opensource/FFmpeg-ltn/commit/2f6fea5f86ee816b01e05840999bffc706a9af04

Porting these upstream (to ffmpeg master's git tip) will not be a trivial
task, but its' definitely doable.

Regards,

BR.
___
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] OVERLAY_CUDA and PGS Subtitle burn

2020-09-18 Thread Dennis Mungai
On Thu, 17 Sep 2020 at 03:29, Panda Sing Cool 
wrote:

> Hi,
>
> Changed the input format:
> Video -> yuv420p
> Sub -> yuv*a*420p (to include Alpha Channel)
>
> Now the video is showing, but still no subtitles.
> Still get the error message:
> *Error while add the frame to buffer source(Internal bug, should not have
> happened).*
>
>
> ./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags +genpts-fastseek \
>-ss 00:00:00 -t 00:00:15 \
>-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1
> -filter_complex_threads 1 \
>-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda
> -hwaccel_output_format cuda \
>-i input.mkv \
>
>
>
>
> *   -filter_complex \
> "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=yuv420p[vid]; \
>[0:s]format=yuva420p,hwupload[sub]; \ [vid][sub]overlay_cuda[v]"
> \*-map "[v]" -map 0:a \
>-force_key_frames "expr:gte(t,n_forced*5)" \
>-c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \
>-rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v 2000K
> -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac
> -b_ref_mode:v middle \
>-c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \
>output.mkv
>
>
>
>
> On Thu, 17 Sep 2020 at 07:08, Panda Sing Cool 
> wrote:
>
> > Hi everyone,
> >
> > i'm trying to use the OVERLAY_CUDA function to burn PGS titles over a
> > video and the result is not working.
> > i might  misunderstand the usage of this function, so some help is
> welcome.
> >
> > The result of this command is a black screen with audio, using 'standard'
> > overlay filter is working fine, but slow ...
> >
> > Notice this message at the end of the log file (ffmpeg version
> > N-99194-g142ae27b1d ( compiled myself from git) ):
> > *Error while add the frame to buffer source(Internal bug, should not have
> > happened).*
> >
> > Thanks for any help.
> >
> >
> >
> ***
> >
> >./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags
> +genpts-fastseek
> > \
> >-ss 00:00:00 -t 00:01:00 \
> >-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1
> > -filter_complex_threads 1 \
> >-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda
> > -hwaccel_output_format cuda \
> >-i input.mkv \
> >-filter_complex \
> >
> >
> > *   "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=nv12[vid]; \
> > [0:s]format=nv12,hwupload_cuda[sub]; \[vid][sub]overlay_cuda[v]" \*
> > -map "[v]" -map 0:a \
> >-force_key_frames "expr:gte(t,n_forced*5)" \
> >-c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \
> >-rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v 2000K
> > -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac
> > -b_ref_mode:v middle \
> >-c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \
> >output.mkv
> >
> >
> > * LOG 
> >
> > f*fmpeg version N-99194-g142ae27b1d *Copyright (c) 2000-2020 the FFmpeg
> > developers
> >   built with gcc 10 (GCC)
> >   configuration: --prefix=/home/users/work/ffmpeg_build
> > --pkg-config-flags=--static --extra-libs=-lpthread --extra-libs=-lm
> > --bindir=/home/users/work/ffmpeg_build/bin --enable-gpl
> --enable-libfdk_aac
> > --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvpx
> > --enable-libx264 --enable-libx265 --enable-vulkan --enable-nonfree
> > --enable-libnpp --enable-nvenc --enable-cuvid --enable-libass
> > --enable-libfontconfig --enable-libfreetype --enable-libfribidi
> > --enable-cuda
> >   libavutil  56. 59.100 / 56. 59.100
> >   libavcodec 58.106.100 / 58.106.100
> >   libavformat58. 56.100 / 58. 56.100
> >   libavdevice58. 11.102 / 58. 11.102
> >   libavfilter 7. 87.100 /  7. 87.100
> >   libswscale  5.  8.100 /  5.  8.100
> >   libswresample   3.  8.100 /  3.  8.100
> >   libpostproc55.  8.100 / 55.  8.100
> > Input #0, matroska,webm, from 'input.mkv':
> >   Metadata:
> > encoder : libebml v1.3.10 + libmatroska v1.5.2
> > creation_time   : 2020-08-13T06:58:46.00Z
> >   Duration: 00:57:53.06, start: 0.00, bitrate: 12993 kb/s
> > Chapter #0:0: start 0.00, end 508.424583
> > Metadata:
> >   title   : Chapter 01
> > Chapter #0:1: start 508.424583, end 1037.202833
> > Metadata:
> >   title   : Chapter 02
> > Chapter #0:2: start 1037.202833, end 1510.175333
> > Metadata:
> >   title   : Chapter 03
> > Chapter #0:3: start 1510.175333, end 2231.896333
> > Metadata:
> >   title   : Chapter 04
> > Chapter #0:4: start 2231.896333, end 2908.530625
> > Metadata:
> >   title   : Chapter 05
> > Chapter #0:5: start 2908.530625, end 3473.052917
> > Metadata:
> >   title   : Chapter 06
> > Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, SAR
> > 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k 

[FFmpeg-user] Can ffmpeg's filter_compex and audio filtering (-af) be used simultaneously?

2020-09-13 Thread Dennis Mungai
Hello there,

Can a standard complex filter graph (initialized via -filter_complex) be
used with an audio filter (inserted via -af) in the same command?

Take this rudimentary example snippet:

ffmpeg  -fflags +genpts -vsync 1 \
   -threads 1  -dn  \
   -i 127.0.0.1:12500?fifo_size=524288_size=15400960=600'
-filter_complex \
  "[0:v:0]yadif=0:-1:0,split=6[s0][s1][s2][s3][s4][s5]; \
   [s0]scale=w=1920:h=1080,split=2[v0][v1]; \
   [s1]scale=w=1280:h=720,split=2[v2][v3]; \
   [s2]scalep=w=960:h=540[v4]; \
   [s3]scale=w=768:h=432,split=2[v5][v6]; \
   [s4]scale=w=640:h=360[v7]; \
   [s5]scale=w=416:h=234[v8]" \
  -af "aresample=async=1000:min_hard_comp=0.10".

Which shows such a setup in use.

Are there any (known) issues with initializing separate audio filters
outside a complex filter?

Warm regards,

Dennis.
___
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] A query on mpegts and global headers

2020-08-30 Thread Dennis Mungai
On Sun, 30 Aug 2020 at 18:11, Gyan Doshi  wrote:

>
>
> On 30-08-2020 06:52 pm, Dennis Mungai wrote:
> > Hello there,
> >
> > With mpegts output, should global headers be used or not, set via -fflags
> > +global_header?
>
> No.
>
> > And if there are exceptions to that, based on the codec type wrapped in
> > mpegts, when should global headers be used for mpegts?
>
> Global header is for formats that store codec parameters out of band
> i.e. in container metadata. Enabling the flag tells the encoder to store
> parameters in AVStream->extradata from where it is used by muxers of
> such formats. Additionally, the flag also suppresses periodic
> announcement of these parameters within the stream (in-band).
>
> MPEG-TS has no global header since it is meant for use as a 'continuous'
> transport stream. to which clients may start listening at an arbitrary
> point. So periodic parameter set transmission is required.
>
> When generating an output for use by a single muxer, the muxer has a
> flag which will be conveyed to the encoder automatically, so the user
> doesn't have to set anything. However in case of the tee muxer, which
> sends data to multiple muxers, some of which require global headers, the
> flag has to be manually set and periodic parameter sets reinserted using
> dump_extra for muxers such as mpegts.
>
> Regards,
> Gyan
>
>
Many thanks for clearing that up, Gyan. Most appreciated.
___
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] A query on mpegts and global headers

2020-08-30 Thread Dennis Mungai
Hello there,

With mpegts output, should global headers be used or not, set via -fflags
+global_header?

And if there are exceptions to that, based on the codec type wrapped in
mpegts, when should global headers be used for mpegts?

I ask because of the dump_extra bitstream filter documentation, which shows
a similar use case:
https://ffmpeg.org/ffmpeg-bitstream-filters.html#dump_005fextra

Which implies that global headers should not be used with mpegts, *but*
even if that's the case, it can be corrected via the video bitstream filter
dump_extra.

Another example of this, cited by Gyan in this answer on Stackoverflow:
https://video.stackexchange.com/a/25797/19326

Please help on clarifying this. The ffmpeg documentation can be a bit
daunting at times.

Regards,

Dennis.
___
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_g

2020-08-20 Thread Dennis Mungai
On Thu, 20 Aug 2020, 20:35 Ashim Tom,  wrote:

> what is ffmpeg_g?
>

This is the ffmpeg binary with the debug symbols present.
When stripped (without debug symbols) you get the ffmpeg binary.

Debug symbols are useful for function tracing when attached to a debugger,
such as troubleshooting CUDA based filter performance with nvidia's NSIGHT
tools, etc.

>
___
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] How to have a secure UDP BroadCast

2020-08-19 Thread Dennis Mungai
On Wed, 19 Aug 2020, 11:53 Alessandro Molon, 
wrote:

> You simply cannot. UDP delivery is not meant to do that.
>
> There are other protocols that support authentication 
> If you provide a little bit more about what are your needs I can suggest
> some.
>
> Alex
>
> -Original Message-
> From: ffmpeg-user  On Behalf Of hassan
> shatnawi
> Sent: 02 October 2017 09:12
> To: ffmpeg-user@ffmpeg.org
> Subject: [FFmpeg-user] How to have a secure UDP BroadCast
>
> Dears,
>
> How to have a secure connection with username and password while
> broadcasting "UPD"
>
> I've use this command
>
> ffmpeg -f dshow -video_size 1280x720 -rtbufsize 702000K -framerate 30 -i
> video="Video (00-0 Pro Capture Quad HDMI)" -r 30 -threads 4 -vcodec
> libx264 -crf 0 -preset ultrafast -f mpegts "udp://
> username:password@192.168.1.12:"
>
> but it didn't work can you advice me plz.
>
> Thanks in advance.
>
> *Hassan Shatnawi*
> Software Developer
>
> *Software Development Department*
>
>
>
> *Haupshy Establishment for Electronics*
>
> Al Madina Al Monawara St. bld 31 | P.O.Box 6875 Amman 8, Jordan.
>
> *T: *+962 6 5820 927* | F: *+962 6 5820 926* | M: *+962 78 5792 096
>
> *E*: has...@haupshy.com *|* www.haupshy.com
> ___
>


The closest there is to your requirements, ie:

(a). A container format with support for timestamps such as mpegts

(b). Capabilities similar to UDP

Would be Haivision's SRT, which FFmpeg supports if enabled on build time
via --enable-libsrt.

SRT allows for optional encryption, whose details can be viewed via ffmpeg
-h protocol=srt.

Note that depending on your application requirements, you'll need to ensure
that your receiver can handle SRT input, OR use FFmpeg to handle SRT TX and
Rx in the network segment where such content security is desired.

Hope that helps.

>
___
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] A question of FFmpeg's UDP protocol usage

2020-06-28 Thread Dennis Mungai
Hello there,

I encountered a somewhat unique problem today with ffmpeg, where, on
receiving UPD multicast input, the ffmpeg process would also bind to a
random unicast port, say 5112:

ss -tulpn | grep :5112

udp   UNCONN  1213696  0   0.0.0.0:5112   0.0.0.0:*
 users:(("ffmpeg",pid=958238,fd=54))

All inputs in use are *multicast*, so why is ffmpeg binding to a local port
in udp unicast mode?

Going through the documentation, there are some options that may somewhat
alleviate this condition, though I've not tested them yet:
https://ffmpeg.org/ffmpeg-protocols.html#udp

1. connect=1/0: As documented, in my case (receiving), it stated "For
receiving, this gives the benefit of only receiving packets from the
specified peer address/port. "
2. sources=address[,address]: As documented: "Only receive packets sent
from the specified addresses. In case of multicast, also subscribe to
multicast traffic coming from these addresses only."

I'm tempted to use option 1 first, then 2, as the first option does not
require me to pass a hard coded IP as an argument.

Now, to the question: Is ffmpeg binding to a random UDP unicast port when
receiving UDP multicast normal/expected behavior? And if so, how can this
behavior be overridden so that such binding does not occur?
___
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] To Speed Up thumbnail creation - picture & video

2020-06-22 Thread Dennis Mungai
On Mon, 22 Jun 2020, 11:04 Arunava Banerjee via ffmpeg-user, <
ffmpeg-user@ffmpeg.org> wrote:

> Hello,
>
> Could a link with more recent versions of FFMPEG be provided?
>
> We could find the version as described on the following link:
> https://tecadmin.net/install-ffmpeg-on-linux/ --  It is version 4.2.2.
>
>
> On Mon, Jun 22, 2020 at 1:12 PM Arunava Banerjee <
> arunava.baner...@capitalnumbers.com> wrote:
>
> >
> > Hello,
> >
> > Thanks for the suggestions.
> >
> > Currently, for ubuntu 16.04, we are able to install only the FFMPEG 4
> > version.
> >
> > Will test on that surely and revert.
> >
> >
> > Regards
> >
> > On Mon, Jun 22, 2020 at 12:41 PM Carl Eugen Hoyos 
> > wrote:
> >
> >>
> >>
> >> > Am 22.06.2020 um 07:23 schrieb Arunava Banerjee via ffmpeg-user <
> >> ffmpeg-user@ffmpeg.org>:
> >> >
> >> > ffmpeg version 2.8.15
> >>
> >> This will be five years old soon, please test current FFmpeg git head.
> >>
> >> 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".
> >
> >
> >
> > --
> > ==
> > Best Regards,
> >
> > Arunava Banerjee
> > Sr. Web Developer,
> > Capital Numbers Infotech Pvt.Ltd.
> > Gmail: arunava.baner...@capitalnumbers.com
> > ==
> >
>
>
> --
> ==
> Best Regards,
>
> Arunava Banerjee
> Sr. Web Developer,
> Capital Numbers Infotech Pvt.Ltd.
> Gmail: arunava.baner...@capitalnumbers.com
> ==
> ___
> 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".



Do you have access to an NVIDIA GPU accelerated workflow on AWS?

You may be able to get far better results by combining the use of
scale_cuda (or scale_npp) filter(s) paired with the thumbnail_cuda filter
for GPU accelerated thumbnail generation.
___
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] GPU is not used

2020-05-23 Thread Dennis Mungai
On Sat, 23 May 2020, 10:26 Alexander Rodionov,  wrote:

> Im using ffmpeg to render video. Im saving images using matplotlib in
> format = rgba and pipe bytes to ffmpeg.
> If I open GPU usage - it shows 0% for ffmpeg process.
>
> ffmpeg \
> -loglevel debug \
> -hwaccel videotoolbox \
> -threads 16 \
> -y \
> -r 60 \
> -s 1920x1080 \
> -pix_fmt argb \
> -i - \
> -c:v hevc_videotoolbox \
> -pix_fmt yuv420p \
> -b:v 16M \
> out.mp4
>
> macOS Catalina 10.15.4
> MacBook Pro (16-inch, 2019)
> GPU: AMD Radeon Pro 5500M
>


How are you monitoring GPU usage?
Does Mac OSX allow for monitoring AMD VCE usage, directly or via an API
similar to Windows's WDDM extensions?
Typically, your encoding workload is *not* running directly on the GPU per
see, but on some SIP block called VCE, similar to Intel's QuickSync.

>
___
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] question about fps filter

2020-05-22 Thread Dennis Mungai
On Sat, 23 May 2020 at 01:07, Andy Sheimo  wrote:

> I am using the command line seen here but the fps filter is being ignored.
>
> ffmpeg.exe -loglevel debug -stats -hwaccel cuda -hwaccel_output_format cuda
> -i "Evanescence - Anywhere but Home.mkv" -map 0:0 -filter:v
> yadif_cuda=deint=interlaced,fps=24000/1001 -c:v h264_nvenc -b:v 2000k
> -maxrate:v 6000k -rc:v vbr_hq -spatial-aq:v 1 -temporal-aq:v 1 -profile:v
> high -color_primaries:v smpte170m -color_trc:v bt709 -colorspace:v
> smpte170m -metadata:s:v title= -disposition:v default -map 0:1 -c:a:0 eac3
> -b:a:0 256k -metadata:s:a:0 title= -disposition:a:0 default -map 0:2 -c:a:1
> copy -metadata:s:a:1 title= -disposition:a:1 0 -sn -metadata:g title=
> "Evanescence - Anywhere but Home 2.mkv"
>
> I found this in the debug output and am not sure why it sees what was
> passed by the command line but then is ignored in the filter graph can
> someone help me understand please? The complete debug output is available
> but too big to include here.
>
> [Parsed_yadif_cuda_0 @ 0220ac5561c0] Setting 'deint' to value
> 'interlaced'
> [Parsed_fps_1 @ 0220ac74a500] Setting 'fps' to value '24000/1001'
> [Parsed_fps_1 @ 0220ac74a500] fps=24000/1001
> [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'video_size' to
> value '720x480'
> [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'pix_fmt' to
> value '119'
> [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'time_base' to
> value '1/1000'
> [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'pixel_aspect'
> to value '186/157'
> [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'frame_rate' to
> value '3/1001'
> [graph 0 input from stream 0:0 @ 0220ac749f40] w:720 h:480 pixfmt:cuda
> tb:1/1000 fr:3/1001 sar:186/157
> [format @ 0220ac74bac0] Setting 'pix_fmts' to value
> 'yuv420p|nv12|p010le|yuv444p|p016le|yuv444p16le|bgr0|rgb0|cuda|d3d11'
> [AVFilterGraph @ 0220ac511d80] query_formats: 5 queried, 4 merged, 0
> already done, 0 delayed
> [h264_nvenc @ 0220ac561540] Using input frames context (format cuda)
> with h264_nvenc encoder.
> ___
>

What version of ffmpeg are you using?
There have been recent updates to the NVENC encoder's implementation in
ffmpeg that better handle frame rate, such as this commit:
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/b18fd2b95b2fea10f0b5381333a1b4c032f010bc
Use the latest build and retest.
___
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 single threaded bottleneck

2020-05-14 Thread Dennis Mungai
On Thu, May 14, 2020, 12:33 Gabriel Balaich  wrote:

> Thanks for the feedback.
>
> On Thu, 14 May 2020 at 01:52, Edward Park  wrote:
>
> > Hi,
> >
> > Some values don't look right, try getting rid of them.
> > -thread_queue_size  seems arbitrary,
>
> it is queue length, not bytes
>
> I was getting the error "Thread message queue blocking; consider raising
> the thread_queue_size option" when I left -thread_queue_size at default,
> the reason I set it at  is that that is the max it will let me set it
> before the command just errors out. When I remove "-thread_queue_size "
> the errors come back and I drop a massive amount of frames even when doing
> a single 4k60 input / output.
>
> -indexmem  seems arbitrary, pretty sure default value is bigger
> >
> -indexmem is one of the magical options I never really understood, I added
> it at some point (over 2 years ago at least) hoping it would solve this
> issue. I can't seem to find any information on what the default is, and
> when I remove it from the command it doesn't change the results. That being
> said any single option's relevancy in regards to my commands, at least as
> far as I can tell, is pretty low considering that everything works just
> fine with every option I have when I'm running each input(s) / output in
> its own instance of FFmpeg yet simultaneously.
>
>
> > -rtbufsize 2147.48M is kind of abusive, especially for the audio inputs
> >
> > I don't think you should be trying to buffer more, if the buffer keeps
> > growing then it won't last.
> >
> I couldn't try more buffer if I wanted to, 2147.48M (max INT) is the
> maximum buffer size allowed. But even then it only overfills if the
> hardware can't keep up, which is only shown to be the case when transcoding
> over 9K60 worth of video in a single FFmpeg instance.
>
>
> > I can't really tell what the dshow input mapping looks like, but I think
> > this is about the limit of your system.
> > With a 6800K, assuming the GPU is full sized,  are there enough lanes
> left
> > for 3 additional capture cards?
> >
> As seen in the screenshots my 6800k is only being overly taxed if I'm
> running all the inputs / outputs in one command / one instance of FFmpeg,
> *and
> only on one thread with plenty of headroom left on all other threads* (see
> task manager screenshots). When I separate them into multiple commands
> running in different processes, but still at the same time with all the
> same options, the 6800k isn't even at 35% total usage with plenty of
> headroom per thread. So it seems pretty clear to me that the 6800k is not
> the bottleneck, even so, I'm replacing it with a Threadripper (1950x, 2.5
> times as powerful as my 6800k) as described in the original message so I
> can have headroom to run FFmpeg and OBS at the same time.
>
>
> > Using the hardware encoder for so many streams at once might also have to
> > do with it, you could try saving
> > the raw input to fast enough scratch disk to check for that quickly.
>
> I'm using a GTX 1080 which has dual NVENC processing chips (see NVIDIA
> encode matrix:
> https://developer.nvidia.com/video-encode-decode-gpu-support-matrix), as
> can be seen in my screenshots the encoder is only at 40% usage, and while
> Nvidia typically only allows you to do 2-3 encodes at once it's a
> pseudo-limitation enforced by software which can be bypassed with a patch:
> https://github.com/keylase/nvidia-patch
>
> Just to further show that the hardware is not yet an issue in itself, I can
> run 4 separate 4k60 transcodes simultaneously in real-time using just the
> 6800k and the GTX 1080 with 30% headroom left on the CPU, 20% headroom on
> the GPUs encoding chips, multiple gigabytes of VRAM still available on the
> GPU, over 12gb of available system memory, and below 30% SSD usage. The one
> caveat being that each input / output has to be running in *separate
> instances of FFmpeg*, as soon as I try to transcode more than 9K60 in a
> *single
> FFmpeg command / instance* a single thread on my 6800K will reach 100%,
> despite the rest of the chip having 70% headroom, and then the command gets
> behind filling the buffer until there is no memory left.
>
> Just to make it clear, from my extensive testing the issue only presents
> itself when running massive commands with 3x or more 4K60 transcodes in
> *one
> instance* of *FFmpeg*, *when I run them separately but still at the same
> time I have zero issues*... Other than the fact that I have to run them in
> separate instances which is what I'm trying to avoid due to synchronization
> issues, among others. What I'm really trying to determine here is what part
> of a single FFmpeg instance is being limited to 1 thread when transcoding
> 3+ 4k60 streams.
> ___
> 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 

Re: [FFmpeg-user] Multiple FFMpeg-Cuda-HLS-Transcoding Instances -> Deadlock Behavior

2020-05-04 Thread Dennis Mungai
On Mon, 4 May 2020 at 11:22, Marco Kittel  wrote:

> Hello,
>
> i'm having a hard time rendering multiple hls instances with nvidia
> gear. The details are in the forum post. Here is a little summary.
> Everytime without any exception, when i'm running multiple instances of
> ffmpeg with cuda support, all instrances until one instance are stopping
> to work. It looks like a deadlock. Because this behavior isn't happening
> when i'm using libx264, i asked nvidia - how to fix it. I made a youtube
> video for you guys to see whats happening.
> https://www.youtube.com/watch?v=QOaf7v_Gwwk
>
> I tried every new nvidia driver and the beavior was the same. Then i
> build ffmpeg again with gcc 8, still the same behavior. I will try to
> rebuild ffmpeg with gcc 7.
>
>
> https://forums.developer.nvidia.com/t/multiple-ffmpeg-cuda-hls-transcoding-instances-deadlock-behavior/121461
>
>
> How did i build ffmpeg:
>
>
> ./configure --enable-libx264 --enable-cuvid --enable-gpl --enable-libnpp
> --enable-cuda --disable-cuda-sdk --enable-nonfree
> --extra-cflags=-I/usr/local/cuda-10.2/include
> --extra-ldflags=-L/usr/local/cuda-10.2/lib64 && make -j 8
>
>
> How i'm executing ffmpeg:
>
>
> exec $FFMPEG_PATH
> -vsync 0
> -loglevel debug
> -threads:v 1
> -threads:a 1
> -filter_threads 1
> -thread_queue_size 1024
> -hwaccel cuda
> -hwaccel_device 0
> -hwaccel_output_format cuda
> -deint adaptive
> -i “udp://$MULTICAST_ADDRESS:$PORT”
> -filter_complex
>
> “[v:0]split=4[temp1][temp2][source][temp3];[temp1]scale_npp=858:480[480p];[temp2]scale_npp=640:360[wide360p];[temp3]scale_npp=426:240[240p]”
> -g 50 -sc_threshold 0
> -map [wide360p]
> -preset medium
> -c:v:0 h264_nvenc
> -preset fast
> -profile:v baseline
> -b:v:0 600k
> -bufsize 24k
> -minrate 400k -maxrate 600k
> -map [480p]
> -c:v:1 h264_nvenc
> -preset medium
> -profile:v baseline
> -b:v:1 1000k
> -bufsize 56k
> -minrate 800k -maxrate 1600k
> -preset fast
> -map [source]
> -c:v:2 h264_nvenc
> -preset medium
> -profile:v baseline
> -preset fast
> -b:v:2 3600k
> -minrate 2000k -maxrate 4000k
> -bufsize 144k
> -map [240p]
> -c:v:3 h264_nvenc
> -preset medium
> -profile:v baseline
> -zerolatency 1
> -preset fast
> -b:v:3 400k
> -bufsize 16k
> -map a:0
> -c:a aac
> -b:a 128k
> -ac 2
> -map a:1
> -c:a aac
> -b:a 96k
> -ac 2
> -f hls
> -hls_time 4
> -hls_list_size 0
> -hls_flags append_list
> -hls_allow_cache 0
> -hls_playlist_type event
> -master_pl_name $MASTER_PLAYLIST_NAME
> -var_stream_map “a:0,agroup:audio,default:yes,language:DEU
> a:1,agroup:audio,language:FR v:0,agroup:audio v:1,agroup:audio,
> v:2,agroup:audio, v:3,agroup:audio”
> $SEGMENT_FILE_NAME
> $MEDIA_PLAYLIST_PREFIX
>
>
> Please help me to fix this behavior.
>
>
> Best regards
>
> Marco Kittel
>
>
>
Do me a favor:

Run:

dmesg | grep NVRM

And then post back as you run the failing command(s).

Run your command as shown, see the edits:

exec $FFMPEG_PATH
-vsync 0
-loglevel debug
-threads 1
-hwaccel cuda
-hwaccel_device 0
-extra_hw_frames 3
-hwaccel_output_format cuda
-i “udp://$MULTICAST_ADDRESS:$PORT”
-filter_complex
“[v:0]yadif_cuda=0:-1:0,split=4[temp1][temp2][source][temp3];[temp1]scale_npp=858:480[480p];[temp2]scale_npp=640:360[wide360p];[temp3]scale_npp=426:240[240p]”
-g 50
-map [wide360p]
-preset llhp
-c:v:0 h264_nvenc
-profile:v baseline
-b:v:0 600k
-bufsize 24k
-minrate 400k -maxrate 600k
-map [480p]
-c:v:1 h264_nvenc
-preset llhp
-profile:v baseline
-b:v:1 1000k
-bufsize 56k
-minrate 800k -maxrate 1600k
-map [source]
-c:v:2 h264_nvenc
-preset llhp
-profile:v baseline
-preset fast
-b:v:2 3600k
-minrate 2000k -maxrate 4000k
-bufsize 144k
-map [240p]
-c:v:3 h264_nvenc
-preset llhp
-profile:v baseline
-zerolatency 1
-b:v:3 400k
-bufsize 16k
-map a:0
-c:a aac
-b:a 128k
-ac 2
-map a:1
-c:a aac
-b:a 96k
-ac 2
-f hls
-hls_time 4
-hls_list_size 0
-hls_flags append_list
-hls_allow_cache 0
-hls_playlist_type event
-master_pl_name $MASTER_PLAYLIST_NAME
-var_stream_map “a:0,agroup:audio,default:yes,language:DEU
a:1,agroup:audio,language:FR v:0,agroup:audio v:1,agroup:audio,
v:2,agroup:audio, v:3,agroup:audio”
$SEGMENT_FILE_NAME
$MEDIA_PLAYLIST_PREFIX

Remember to include full output from the console.

I removed some superflous options (see the preset above) and added in
-extra_hw_frames 3 which will help with stability especially with
hardware-accelerated deinterlacing. The filter in use is now yadif_cuda.
For documentation on yadif_cuda, see
https://ffmpeg.org/ffmpeg-filters.html#yadif_005fcuda
You may also want to tune the rate control in NVENC (via the private codec
option -rc:v ).
For usage, see ffmpeg -h encoder=h264_nvenc

The output I requested above from dmesg will confirm *if* your GPU (and GPU
driver) is tripping up on XID errors.
For more on the same, see
https://docs.nvidia.com/deploy/xid-errors/index.html

Warm regards,

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

To unsubscribe, visit link above, 

Re: [FFmpeg-user] ffmpeg nvenc without cuda

2020-04-29 Thread Dennis Mungai
On Sat, 28 Sep 2019 at 18:42, Johanna Nilson  wrote:

> Thank you very much for your answers! Every community should be proud to
> have such an active and willing to help members. I see that it's not
> possible to achieve my goal today the direct way, c’est la vie.
>
>
>

Hey there,

The latest nvenc patchwork seems to take care of this, though I've not
tested it (yet):

1.
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/1dff97b7bc792267c3e79030fbaed0e9fefc65fb
2. Device selection caps:
https://git.ffmpeg.org/gitweb/ffmpeg.git/blobdiff/1128aa875367f66ac11adc30364d5652919a2591..1dff97b7bc792267c3e79030fbaed0e9fefc65fb:/libavcodec/nvenc.c
___
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 Problem in macOS

2020-04-25 Thread Dennis Mungai
On Sat, 25 Apr 2020, 21:13 Chakraborty, Rakesh via ffmpeg-user, <
ffmpeg-user@ffmpeg.org> wrote:

> Hi
>
> I am facing a transcoding problem in macOS. The entire issue details along
> with log files are attached.
> Requesting assistance to resolve this issue.
> Requesting assistance to resolve this issue.
> Requesting assistance to resolve this issue.
>
>
> Thanks & Regards
>
>
> Rakesh Chakraborty
>
> Mail to: rakesh.chakrabo...@mheducation.com
>
> The information contained in this message may be confidential and/or
> constitute a privileged attorney-client document.  If the reader of this
> message is not the intended recipient, or an employee or agent responsible
> for delivering this message to the intended recipient, you are hereby
> notified that any dissemination, distribution or copying of this
> communication is strictly prohibited.  If you have received this
> communication in error, please notify McGraw-Hill immediately by replying
> to the message and deleting it from your computer.  Thank you.
> ___
> 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".



Can you please post these logs directly in the email, and the problem
description in the word attachment to the email body?

Sending word documents here is simply trolling.
___
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] Stereo 3D encoding with nvenc

2020-04-24 Thread Dennis Mungai
On Fri, 24 Apr 2020, 18:39 Dennis Mungai,  wrote:

>
> On Fri, 24 Apr 2020, 14:47 Etienne Sandré-Chardonnal, <
> etienne.san...@m4x.org> wrote:
>
>> Hi,
>>
>> Are there options for encoding 3D video with nvenc, like with x264 and
>> --frame-packing? I know the NVEnc API has the option, but was it enabled
>> in
>> ffmpeg? I can't find any documented option.
>>
>> Thanks!
>>
>
> On the hardware side, VAAPI (and possibly QuickSync) have such an option
> exposed via FFmpeg. There was patchwork (not sure if it's merged or not,
> it's been a while) authored by Mark? Thompson (sic, not sure, need to
> confirm) enabling such functionality. Let me check on that and get back to
> you.
>

I found the patch series, not sure if it was applied for VAAPI back in the
day. It was authored by Mark Thompson at the request of a user who was
dealing with stereoscopic H/W decode issues
https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2019-October/250966.html

>
___
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] Stereo 3D encoding with nvenc

2020-04-24 Thread Dennis Mungai
On Fri, 24 Apr 2020, 14:47 Etienne Sandré-Chardonnal, <
etienne.san...@m4x.org> wrote:

> Hi,
>
> Are there options for encoding 3D video with nvenc, like with x264 and
> --frame-packing? I know the NVEnc API has the option, but was it enabled in
> ffmpeg? I can't find any documented option.
>
> Thanks!
>

On the hardware side, VAAPI (and possibly QuickSync) have such an option
exposed via FFmpeg. There was patchwork (not sure if it's merged or not,
it's been a while) authored by Mark? Thompson (sic, not sure, need to
confirm) enabling such functionality. Let me check on that and get back to
you.

>
___
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] yadif-cuda issues

2020-04-20 Thread Dennis Mungai
On Tue, 21 Apr 2020, 00:59 Andy Sheimo,  wrote:

> Here is the output from nvidia-smi:
> Mon Apr 20 17:56:48 2020
>
> +-+
> | NVIDIA-SMI 442.92   Driver Version: 442.92   CUDA Version: 10.2
>   |
>
> |---+--+--+
> | GPU  NameTCC/WDDM | Bus-IdDisp.A | Volatile Uncorr.
> ECC |
> | Fan  Temp  Perf  Pwr:Usage/Cap| Memory-Usage | GPU-Util  Compute
> M. |
>
> |===+==+==|
> |   0  GeForce GTX 106... WDDM  | :01:00.0  On |
>  N/A |
> | 41%   31CP8 8W / 120W |341MiB /  3072MiB |  0%
>  Default |
>
> +---+--+--+
>
>
>
> +-+
> | Processes:   GPU
> Memory |
> |  GPU   PID   Type   Process name Usage
>|
>
> |=|
> |0  3588C+G   Insufficient Permissions   N/A
>|
> |0  5432C+G   ...osoft.LockApp_cw5n1h2txyewy\LockApp.exe N/A
>|
> |0  6580C+G   ...t_cw5n1h2txyewy\ShellExperienceHost.exe N/A
>|
> |0  7292C+G   ...3.0.0_x64__8wekyb3d8bbwe\Calculator.exe N/A
>|
> |0 11704C+G   ...AppData\Local\slack\app-4.4.2\slack.exe N/A
>|
> |0 12492C+G   ...w5n1h2txyewy\InputApp\TextInputHost.exe N/A
>|
> |0 13628C+G   ...\bin\cef\cef.win7x64\steamwebhelper.exe N/A
>|
> |0 13888C+G   ...x64__8wekyb3d8bbwe\Microsoft.Photos.exe N/A
>|
> |0 13960C+G   C:\Windows\explorer.exeN/A
>|
> |0 14424C+G   ...s (x86)\DisplayFusion\DisplayFusion.exe N/A
>|
> |0 15028C+G   ...mmersiveControlPanel\SystemSettings.exe N/A
>|
> |0 16680C+G   ...6)\Google\Chrome\Application\chrome.exe N/A
>|
> |0 17068C+G   110.0_x64__8wekyb3d8bbwe\YourPhone.exe N/A
>|
> |0 18020C+G   ...5n1h2txyewy\StartMenuExperienceHost.exe N/A
>|
> |0 18268C+G   ...dows.Search_cw5n1h2txyewy\SearchApp.exe N/A
>|
>
> +---------+
>
> 2. the build is a Zeranoe build: ffmpeg-20200417-889ad93-win64-static
>
> On Mon, Apr 20, 2020 at 5:51 PM Dennis Mungai  wrote:
>
> > On Tue, 21 Apr 2020 at 00:31, Andy Sheimo  wrote:
> >
> > > I'm trying to use the yadif_cuda deinterlace but I have not been able
> to
> > > get it to work. Every option I.ve tried fails, I'm pretty sure I'm
> > getting
> > > something wrong so I'm looking for some advice.
> > >
> > > Here is my version:
> > > ffmpeg version git-2020-04-17-889ad93 Copyright (c) 2000-2020 the
> FFmpeg
> > > developers
> > > built with gcc 9.3.1 (GCC) 20200328
> > > configuration: --enable-gpl --enable-version3 --enable-sdl2
> > > --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
> > > --enable-libdav1d --enable-libbluray --enable-libfreetype
> > > --enable-libmp3lame --enable-libopencore-amrnb
> --enable-libopencore-amrwb
> > > --enable-libopenjpeg --enable-libopus --enable-libshine
> > --enable-libsnappy
> > > --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame
> > > --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
> > > --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma
> > > --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf
> > > --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
> > > --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads
> > > --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid
> > > --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
> > > --enable-avisynth --enable-libopenmpt --enable-amf
> > > libavutil  56. 42.102 / 56. 42.102
> > > libavcodec 58. 80.100 / 58. 80.100
> > > libavformat58. 42.100 / 58. 42.100
> > > libavdevice58.  9.103 / 58.  9.103
> > > libavfilter 7. 77.101 /  7. 77.101
> > > libswscale  5.  6.101 /  5.  6.101
> > > libswresample   3.  6.100 /  3.  6.100
> > > libpostproc55.  6.100 / 55.  6.100
> > >
> > > here are

Re: [FFmpeg-user] yadif-cuda issues

2020-04-20 Thread Dennis Mungai
On Tue, 21 Apr 2020 at 00:31, Andy Sheimo  wrote:

> I'm trying to use the yadif_cuda deinterlace but I have not been able to
> get it to work. Every option I.ve tried fails, I'm pretty sure I'm getting
> something wrong so I'm looking for some advice.
>
> Here is my version:
> ffmpeg version git-2020-04-17-889ad93 Copyright (c) 2000-2020 the FFmpeg
> developers
> built with gcc 9.3.1 (GCC) 20200328
> configuration: --enable-gpl --enable-version3 --enable-sdl2
> --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
> --enable-libdav1d --enable-libbluray --enable-libfreetype
> --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
> --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame
> --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
> --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma
> --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf
> --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
> --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads
> --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid
> --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
> --enable-avisynth --enable-libopenmpt --enable-amf
> libavutil  56. 42.102 / 56. 42.102
> libavcodec 58. 80.100 / 58. 80.100
> libavformat58. 42.100 / 58. 42.100
> libavdevice58.  9.103 / 58.  9.103
> libavfilter 7. 77.101 /  7. 77.101
> libswscale  5.  6.101 /  5.  6.101
> libswresample   3.  6.100 /  3.  6.100
> libpostproc55.  6.100 / 55.  6.100
>
> here are the commands I am using:
> ffmpeg -loglevel debug -stats -hwaccel nvdec -hwaccel_output_format cuda -i
> "L:\Sheimo_Originals\Star Trek Into Darkness\Star Trek Into Darkness -
> 1080p.mkv" -map 0:0 -vf yadif_cuda=0:-1:1 -c:v h264_nvenc -map 0:1 -c:a:0
> eac3 -b:a:0 640k -metadata:s:a:0 title= -disposition:a:0 default -sn
> -metadata:g title= "Star Trek Into Darkness - 1080p.mkv"
>
> or
> ffmpeg -loglevel debug -stats -hwaccel nvdec -hwaccel_output_format cuda -i
> "L:\Sheimo_Originals\Star Trek Into Darkness\Star Trek Into Darkness -
> 1080p.mkv" -map 0:0 -vf yadif_cuda=deint=interlaced -c:v h264_nvenc -map
> 0:1 -c:a:0 eac3 -b:a:0 640k -metadata:s:a:0 title= -disposition:a:0 default
> -sn -metadata:g title= "Star Trek Into Darkness - 1080p.mkv"
>
> or
> ffmpeg -loglevel debug -stats -hwaccel nvdec -hwaccel_output_format cuda -i
> "L:\Sheimo_Originals\Star Trek Into Darkness\Star Trek Into Darkness -
> 1080p.mkv" -map 0:0 -filter:v yadif_cuda=deint=interlaced -c:v h264_nvenc
> -b:v 2000k -maxrate:v 6000k -rc:v vbr_hq -profile:v high -color_primaries:v
> smpte170m -color_trc:v bt709 -colorspace:v smpte170m -metadata:s:v title=
> -disposition:v default -map 0:1 -c:a:0 eac3 -b:a:0 640k -metadata:s:a:0
> title= -disposition:a:0 default -sn -metadata:g title= "Star Trek Into
> Darkness - 1080p.mkv"
>
> The most common error I receive is:
> [Parsed_yadif_cuda_0 @ 020bd180a2c0]
> cu->cuModuleLoadData(>cu_module, vf_yadif_cuda_ptx) failed ->
> CUDA_ERROR_INVALID_IMAGE: device kernel image is invalid
> [Parsed_yadif_cuda_0 @ 020bd180a2c0] Failed to configure output pad on
> Parsed_yadif_cuda_0
> Error reinitializing filters!
> Failed to inject frame into filter network: Generic error in an external
> library
> Error while processing the decoded data for stream #0:0
>
> full log attached as output.txt
>
> The other common error is:
> [auto_scaler_0 @ 020daa1ac880] Setting 'flags' to value 'bicubic'
> [auto_scaler_0 @ 020daa1ac880] w:iw h:ih flags:'bicubic' interl:0
> [Parsed_yadif_cuda_0 @ 020da98bedc0] auto-inserting filter
> 'auto_scaler_0' between the filter 'graph 0 input from stream 0:0' and the
> filter 'Parsed_yadif_cuda_0'
> 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
>
> full log attached as output2.txt.
>
> The second error I am pretty sure has to do with me calling some software
> filter in a full hardware pipeline but I am unsure what it is. I also heard
> rumor of auto_scale being inserted when it doesn't need to be but I will
> let the experts tell me if they see that.
>
> My goal is to be able to use yadif_cuda so that I can keep a complete gpu
> pipeline. Any and all help is appreciated. Thanks
>
>
Hello there,

1. Which GPU do you have? Confirm the GPU and the driver version by running
nvidia-smi.
2. How did you build ffmpeg? Did you fetch a static build from Zeranoe?
I've seen a similar issue here on the "CUDA_ERROR_INVALID_IMAGE: device
kernel image is invalid error" posted on this mailing list related to
Zeranoe's builds.

If that's the case, please confirm. If you built 

Re: [FFmpeg-user] Demuxing HLS stream of fmp4 segments

2020-04-17 Thread Dennis Mungai
On Fri, 17 Apr 2020, 16:11 vectronic,  wrote:

>
>
> > On 17 Apr 2020, at 13:26, Pedro Pedrosa 
> wrote:
> >
> > Hello all
> >
> > I'm trying to demux an HLS stream containing fmp4 segments. It works fine
> > if I demux from the start of the input but as soon as I add the -ss flag
> to
> > skip to a timecode it no longer produces any output.
> >
> > I have tested on my own ffmpeg-generated streams and also on a public
> file
> > at
> >
> https://bitmovin-a.akamaihd.net/content/MI201109210084_1/m3u8s-fmp4/f08e80da-bf1d-4e3d-8899-f0f6155f6efa_video_270_40.m3u8
> >
> > Exact command that does not work: ffmpeg -ss 00:03:00 -i
> >
> https://bitmovin-a.akamaihd.net/content/MI201109210084_1/m3u8s-fmp4/f08e80da-bf1d-4e3d-8899-f0f6155f6efa_video_270_40.m3u8
> > -y -frames 1 -f image2 test.jpg
> >
> > Usage that works (omit -ss): ffmpeg -i
> >
> https://bitmovin-a.akamaihd.net/content/MI201109210084_1/m3u8s-fmp4/f08e80da-bf1d-4e3d-8899-f0f6155f6efa_video_270_40.m3u8
> > -y -frames 1 -f image2 test.jpg
> >
> > Any help would be greatly appreciated
> >
>
> I’ve had success using the patch I submitted against this ticket:
>
> https://trac.ffmpeg.org/ticket/7359 
>
>
> ___
> 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".



That patch needs to be split into two, with commit messages explaining what
each change does, as Michael Niedermayer explained.

Apply the recommendations mentioned therein and the ffmpeg-devel mailing
list will review the patch.
___
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] Demuxing HLS stream of fmp4 segments

2020-04-17 Thread Dennis Mungai
On Fri, 17 Apr 2020, 15:26 Pedro Pedrosa,  wrote:

> Hello all
>
> I'm trying to demux an HLS stream containing fmp4 segments. It works fine
> if I demux from the start of the input but as soon as I add the -ss flag to
> skip to a timecode it no longer produces any output.
>
> I have tested on my own ffmpeg-generated streams and also on a public file
> at
>
> https://bitmovin-a.akamaihd.net/content/MI201109210084_1/m3u8s-fmp4/f08e80da-bf1d-4e3d-8899-f0f6155f6efa_video_270_40.m3u8
>
> Exact command that does not work: ffmpeg -ss 00:03:00 -i
>
> https://bitmovin-a.akamaihd.net/content/MI201109210084_1/m3u8s-fmp4/f08e80da-bf1d-4e3d-8899-f0f6155f6efa_video_270_40.m3u8
> -y
> 
> -frames 1 -f image2 test.jpg
>
> Usage that works (omit -ss): ffmpeg -i
>
> https://bitmovin-a.akamaihd.net/content/MI201109210084_1/m3u8s-fmp4/f08e80da-bf1d-4e3d-8899-f0f6155f6efa_video_270_40.m3u8
> -y
> 
> -frames 1 -f image2 test.jpg
>
> Any help would be greatly appreciated
>

What build version of FFmpeg are you using, and on what platform?

Where possible, use a recent build from the master git tip. John Van Sickle
and Zeranoe's static builds should do. Then retest and report back, with
full, uncut console output.

There have been patches published recently that improve FFmpeg's handling
of fragmented mp4.
___
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] "Non-monotonous DTS in output stream" error, previous and current values are equal

2020-04-15 Thread Dennis Mungai
Try this: Add -dts_delta_threshold 0 *before* the input and retest.

On Sun, 23 Feb 2020, 16:27 Crazy Red Elephant via ffmpeg-user, <
ffmpeg-user@ffmpeg.org> wrote:

> I tried adding "-fflags +ignpts" before input but that didn't help, there
> are still DTS warnings, however, this time the values are not equal for
> some reason (except the first pair):
>
> [mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0;
> previous: 6030, current: 6030; changing to 6031. This may result in
> incorrect timestamps in the output file.
> [mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0;
> previous: 180204, current: 177177; changing to 180205. This may result in
> incorrect timestamps in the output file.
> [hls @ 01a901cc9380] Opening 'crypto:part1.ts' for reading
> [mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0;
> previous: 360384, current: 357357; changing to 360385. This may result in
> incorrect timestamps in the output file.
> [mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0;
> previous: 540565, current: 537538; changing to 540566. This may result in
> incorrect timestamps in the output file.
> [hls @ 01a901cc9380] Opening 'crypto:part2.ts' for reading
> [mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0;
> previous: 720745, current: 717718; changing to 720746. This may result in
> incorrect timestamps in the output file.
> [mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0;
> previous: 900925, current: 897898; changing to 900926. This may result in
> incorrect timestamps in the output file.
>
> ‐‐‐ Original Message ‐‐‐
> On Sunday, February 23, 2020 3:15 PM, Crazy Red Elephant via ffmpeg-user <
> ffmpeg-user@ffmpeg.org> wrote:
>
> > Guys please, I still have not found a solution and I'm so desperate :-(
> I asked this question on multiple sites and nobody is helping...
> >
> > ‐‐‐ Original Message ‐‐‐
> > On Wednesday, February 12, 2020 12:44 AM, Ted Park
> kumowoon1...@gmail.com wrote:
> >
> > > > 4.  A general question - is there any difference between (a)
> decrypting all .ts parts separately, then concatenating them into one big
> .ts file and remuxing it into .mp4 and (b) concatenating all encrypted .ts
> parts first, then decrypting the big .ts result file and then remuxing it
> into .mp4?
> > >
> > > This makes me think you are not decrypting the segments correctly, I
> had understood the specs to mean that if it isn’t specified, the IV needs
> to be incremented for each segment (so you would need to use
> 0x for the first segment,
> 0x0001 for the second, etc. based on the
> initial media sequence number of 0).
> > > I don’t think the missing picture message at the end is unexpected,
> since the stream was cut arbitrarily after all, this is the result of my
> attempt at decrypting each segment with openssl and using cat to put them
> together (ffmpeg wasn’t used, except to test the file).
> > > https://media.kumowoon1025.com/videos/cat.ts
> https://media.kumowoon1025.com/videos/cat.ts
> > > 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".
___
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] AMD GPU + Vaapi encoding problem

2020-04-08 Thread Dennis Mungai
On Wed, 8 Apr 2020, 22:58 Colin Bitterfield,  wrote:

> I tried VAAPI with a RADEON 580 on Linux. It was intermittent at best.
>
> I wound up using Vulkan with success.
>
> This is the hwaccel command I was using for transcoding.
>
> time ffmpeg -hide_banner -stats -hwaccel vulkan -init_hw_device vulkan:0
> -threads 16 -i input.mp4 -vf scale=854:480 -c:v  libopenh264  -c:a copy
> -quality quality -b:v 2M -crf 23 -maxrate 2M -bufsize 6M -slice_mode dyn
> -max_nal_size 65535 -allow_skip_frames 1 output_gpu_3.mp4 -y
>
> I started writing an article on RADEON based transcoding:
> Here is a draft link. It is far from done. But I will finishing it this
> week
>
> https://medium.com/@cbitterfield/radeon-gpu-transcoding-with-ubuntu-18-04-lts-2e5143d0d1cd
> On Apr 8, 2020, 12:39 PM -0700, Tobias Kilb , wrote:
> > Uh, indeed. Good to know. I thought the development is going towards
> vaapi
> > from amd/intel.
> >
> > Regards
> > Tobias
> >
> > Ostap Batug  schrieb am Mi., 8. Apr. 2020, 21:25:
> >
> > >
> https://wiki.archlinux.org/index.php/Hardware_video_acceleration#ATI/AMD
> > >
> > > On Wed, 8 Apr 2020 at 22:17, Tobias Kilb  wrote:
> > >
> > > > Hi,
> > > >
> > > > AI am wondering why it shows vdpau because you have an amd graphics
> > > > adapter.
> > > >
> > > > Regards
> > > > Tobias
> > > >
> > > > Ostap Batug  schrieb am Mi., 8. Apr. 2020,
> 21:08:
> > > >
> > > > > Hello,
> > > > > Yes this is the same machine
> > > > > i havent figured out a command to run with -init_hw_device , but
> > > > -hwaccels
> > > > > reports:
> > > > > Hardware acceleration methods:
> > > > > vdpau
> > > > > so seems that i don't have vaapi? although i am not certain, yes
> my gpu
> > > > is
> > > > > primarily supporting vdpau, but i have a sort of vaapi emulation
> with
> > > > > vdpau, or something?
> > > > > Regards,
> > > > > Repu
> > > > >
> > > > > On Wed, 8 Apr 2020 at 21:03, Ted Park 
> wrote:
> > > > >
> > > > > > Hello,
> > > > > >
> > > > > > > Okay, i've used latest static build from git of amd64 arch, it
> > > can't
> > > > > find
> > > > > > > option -vaapi_device,
> > > > > > > and this is the output (ran from the extracted archive path):
> > > > > > > $ ./ffmpeg -vaapi_device /dev/dri/renderD128 -f x11grab
> -video_size
> > > > > > > 1920x1080 -i :0 -vf 'format=nv12,hwupload' -c:v h264_vaapi
> -b:v 7M
> > > > > > > -profile:v main -bf 0 output.mp4
> > > > > > > ffmpeg version N-52056-ge5d25d1147-static
> > > > > > https://johnvansickle.com/ffmpeg/
> > > > > > > Copyright (c) 2000-2020 the FFmpeg developers
> > > > > > > built with gcc 8 (Debian 8.3.0-6)
> > > > > > > configuration: --enable-gpl --enable-version3 --enable-static
> > > > > > > --disable-debug --disable-ffplay --disable-indev=sndio
> > > > > > > --disable-outdev=sndio --cc=gcc --enable-fontconfig
> --enable-frei0r
> > > > > > > --enable-gnutls --enable-gmp --enable-libgme --enable-gray
> > > > > > --enable-libaom
> > > > > > > --enable-libfribidi --enable-libass --enable-libvmaf
> > > > > --enable-libfreetype
> > > > > > > --enable-libmp3lame --enable-libopencore-amrnb
> > > > > --enable-libopencore-amrwb
> > > > > > > --enable-libopenjpeg --enable-librubberband --enable-libsoxr
> > > > > > > --enable-libspeex --enable-libsrt --enable-libvorbis
> > > --enable-libopus
> > > > > > > --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc
> > > > > > > --enable-libvpx --enable-libwebp --enable-libx264
> --enable-libx265
> > > > > > > --enable-libxml2 --enable-libdav1d --enable-libxvid
> > > --enable-libzvbi
> > > > > > > --enable-libzimg
> > > > > > > libavutil 56. 42.101 / 56. 42.101
> > > > > > > libavcodec 58. 76.100 / 58. 76.100
> > > > > > > libavformat 58. 42.100 / 58. 42.100
> > > > > > > libavdevice 58. 9.103 / 58. 9.103
> > > > > > > libavfilter 7. 77.100 / 7. 77.100
> > > > > > > libswscale 5. 6.101 / 5. 6.101
> > > > > > > libswresample 3. 6.100 / 3. 6.100
> > > > > > > libpostproc 55. 6.100 / 55. 6.100
> > > > > > > Unrecognized option 'vaapi_device'.
> > > > > > > Error splitting the argument list: Option not found
> > > > > >
> > > > > >
> > > > > > The option might not be there any more, try using -init_hw_device
> > > > > instead,
> > > > > > and use -hwaccels to list additional hardware support?
> > > > > > Also confirm this is the same machine (or at least with similar
> > > > hardware)
> > > > > > that ran the earlier command?
> > > > > >
> > > > > > Regards,
> > > > > > Ted Park
> > > > > >
> > > > > > ___
> > > > > > 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 

Re: [FFmpeg-user] AMD GPU + Vaapi encoding problem

2020-04-08 Thread Dennis Mungai
rames to estimate rate;
> consider increasing probesize
> Input #0, x11grab, from ':0':
>   Duration: N/A, start: 1586364590.199153, bitrate: N/A
> Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080,
> 29.97 fps, 1000k tbr, 1000k tbn, 1000k tbc
> File 'output.mp4' already exists. Overwrite ? [y/N] y
> Stream mapping:
>   Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_vaapi))
> Press [q] to stop, [?] for help
> [h264_vaapi @ 0x557f0c7d4040] Driver does not support some wanted packed
> headers (wanted 0xd, found 0).
> [h264_vaapi @ 0x557f0c7d4040] Driver does not support packed sequence
> headers, but a global header is requested.
> [h264_vaapi @ 0x557f0c7d4040] No global header will be written: this may
> result in a stream which is not usable for some purposes (e.g. not muxable
> to some containers).
> Output #0, mp4, to 'output.mp4':
>   Metadata:
> encoder : Lavf58.29.100
> Stream #0:0: Video: h264 (h264_vaapi) (Main) (avc1 / 0x31637661),
> vaapi_vld, 1920x1080, q=-1--1, 7000 kb/s, 29.97 fps, 30k tbn, 29.97 tbc
> Metadata:
>   encoder : Lavc58.54.100 h264_vaapi
> [h264_vaapi @ 0x557f0c7d4040] Failed to end picture encode issue: 5
> (invalid VAContextID).
> [h264_vaapi @ 0x557f0c7d4040] Encode failed: -5.
> Video encoding failed
> Conversion failed!
>
> P.S. i would like to use Vulkan anything, but i believe my GPU doesn't
> support Vulkan API
>
> On Wed, 8 Apr 2020 at 19:42, Dennis Mungai  wrote:
>
> > On Wed, 8 Apr 2020 at 19:25, Ostap Batug  wrote:
> >
> > > First of all sorry if this is a duplicate question, but during my
> search
> > > online i haven't found a solution.
> > > Hello, i have a problem, my CPU is pretty slow so i wanted to try use
> > VAAPI
> > > encoding for rtmp streaming. (On the side note, using vaapi is kind of
> > > counter intuitive, but that can be ju me being a newbie) Regardless of
> > what
> > > i try i get an error. Searching online i haven't found any information,
> > but
> > > here's the same error even without streaming, but direct copy paste
> from
> > "
> > > https://trac.ffmpeg.org/wiki/Hardware/VAAPI; of the middle screen
> > capture
> > > command
> > > $ ffmpeg -vaapi_device /dev/dri/renderD128 -f x11grab -video_size
> > 1920x1080
> > > -i :0 -vf 'format=nv12,hwupload' -c:v h264_vaapi -qp 24 output.mp4
> > > And this was the complete output:
> > > ffmpeg version n4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
> > >   built with gcc 9.3.0 (Artix Linux 9.3.0-1)
> > >   configuration: --prefix=/usr --disable-debug --disable-static
> > > --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls
> > > --enable-gpl --enable-ladspa --enable-libaom --enable-libass
> > > --enable-libbluray --enable-libdav1d --enable-libdrm
> --enable-libfreetype
> > > --enable-libfribidi --enable-libgsm --enable-libiec61883
> --enable-libjack
> > > --enable-libmfx --enable-libmodplug --enable-libmp3lame
> > > --enable-libopencore_amrnb --enable-libopencore_amrwb
> > --enable-libopenjpeg
> > > --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex
> > > --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab
> > > --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264
> > > --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid
> > > --enable-nvdec --enable-nvenc --enable-omx --enable-shared
> > > --enable-version3
> > >   libavutil  56. 31.100 / 56. 31.100
> > >   libavcodec 58. 54.100 / 58. 54.100
> > >   libavformat58. 29.100 / 58. 29.100
> > >   libavdevice58.  8.100 / 58.  8.100
> > >   libavfilter 7. 57.100 /  7. 57.100
> > >   libswscale  5.  5.100 /  5.  5.100
> > >   libswresample   3.  5.100 /  3.  5.100
> > >   libpostproc55.  5.100 / 55.  5.100
> > > [x11grab @ 0x555f24fbc000] Stream #0: not enough frames to estimate
> rate;
> > > consider increasing probesize
> > > Input #0, x11grab, from ':0':
> > >   Duration: N/A, start: 1586362599.799368, bitrate: N/A
> > > Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080,
> > > 29.97 fps, 1000k tbr, 1000k tbn, 1000k tbc
> > > Stream mapping:
> > >   Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_vaapi))
> > > Press [q] to stop, [?] for help
> > > [h264_vaapi @ 0x555f24fc9000] Driver does not support some wanted
> packed
> > > headers (wanted 0xd, found 0).
> >

Re: [FFmpeg-user] Issue with hwaccel cuvid

2020-04-08 Thread Dennis Mungai
On Wed, 8 Apr 2020 at 19:46, Andy Sheimo  wrote:

> Dennis, Thank you. Lesson learned, check latest builds before submitting
> questions. Using the latest static build has resolved the issue.
>
> Cheers, -Andy
>
> On Wed, Apr 8, 2020 at 12:14 PM Dennis Mungai  wrote:
>
> > On Wed, 8 Apr 2020 at 19:04, Andy Sheimo  wrote:
> >
> > > This still produces the same error;
> > >
> > > ffmpeg -threads 1 -loglevel verbose -hwaccel cuvid
> > > -hwaccel_output_format cuda -c:v mpeg2_cuvid -extra_hw_frames 3 -i
> > > "l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a
> > copy
> > > -c:v h264_nvenc test.mkv
> > >
> > > But this works to complete the job;
> > >
> > > ffmpeg -threads 1 -loglevel verbose -hwaccel cuda
> > > -hwaccel_output_format cuda -extra_hw_frames 3 -i
> > > "l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a
> > copy
> > > -c:v h264_nvenc test.mkv
> > >
> > > By not specifying  -c:v mpeg2_cuvid do we know what decoder is being
> > used?
> > > Is the process still completely in hardware? Do you think this is a
> > > limitation of the cuvid decoder?
> > >
> > > Thanks for your help. -Andy
> > >
> >
> > NVDEC (an alias to the CUDA hwaccel) handles GPU memory quite differently
> > from CUVID, and when its' in use, the decoder is not specified.
> > CUVID, however, was never a true hwaccel, but rather a "wrapper" that
> > "brings up"/initializes a specific decoder by name passed to it via -c:v,
> > in a similar fashion to the bring-up seen with QuickSync (-hwaccel qsv).
> >
> > I cannot speak much about why CUVID is failing on your end. I migrated
> all
> > my workflows to NVDEC an year ago.
> >
> > Perhaps omitting the hwacccel_output_format with CUVID will help?
> >
> > Try this:
> >
> > ffmpeg -threads 1 -loglevel verbose -hwaccel cuvid
> > -c:v mpeg2_cuvid -extra_hw_frames 3 -i
> > "l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a
> copy
> > -c:v h264_nvenc test.mkv
> >
> > Then report back.
>
>
Thanks, and welcome.
___
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] AMD GPU + Vaapi encoding problem

2020-04-08 Thread Dennis Mungai
On Wed, 8 Apr 2020 at 19:25, Ostap Batug  wrote:

> First of all sorry if this is a duplicate question, but during my search
> online i haven't found a solution.
> Hello, i have a problem, my CPU is pretty slow so i wanted to try use VAAPI
> encoding for rtmp streaming. (On the side note, using vaapi is kind of
> counter intuitive, but that can be ju me being a newbie) Regardless of what
> i try i get an error. Searching online i haven't found any information, but
> here's the same error even without streaming, but direct copy paste from "
> https://trac.ffmpeg.org/wiki/Hardware/VAAPI; of the middle screen capture
> command
> $ ffmpeg -vaapi_device /dev/dri/renderD128 -f x11grab -video_size 1920x1080
> -i :0 -vf 'format=nv12,hwupload' -c:v h264_vaapi -qp 24 output.mp4
> And this was the complete output:
> ffmpeg version n4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
>   built with gcc 9.3.0 (Artix Linux 9.3.0-1)
>   configuration: --prefix=/usr --disable-debug --disable-static
> --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls
> --enable-gpl --enable-ladspa --enable-libaom --enable-libass
> --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype
> --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack
> --enable-libmfx --enable-libmodplug --enable-libmp3lame
> --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg
> --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex
> --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab
> --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264
> --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid
> --enable-nvdec --enable-nvenc --enable-omx --enable-shared
> --enable-version3
>   libavutil  56. 31.100 / 56. 31.100
>   libavcodec 58. 54.100 / 58. 54.100
>   libavformat58. 29.100 / 58. 29.100
>   libavdevice58.  8.100 / 58.  8.100
>   libavfilter 7. 57.100 /  7. 57.100
>   libswscale  5.  5.100 /  5.  5.100
>   libswresample   3.  5.100 /  3.  5.100
>   libpostproc55.  5.100 / 55.  5.100
> [x11grab @ 0x555f24fbc000] Stream #0: not enough frames to estimate rate;
> consider increasing probesize
> Input #0, x11grab, from ':0':
>   Duration: N/A, start: 1586362599.799368, bitrate: N/A
> Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080,
> 29.97 fps, 1000k tbr, 1000k tbn, 1000k tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_vaapi))
> Press [q] to stop, [?] for help
> [h264_vaapi @ 0x555f24fc9000] Driver does not support some wanted packed
> headers (wanted 0xd, found 0).
> [h264_vaapi @ 0x555f24fc9000] Driver does not support packed sequence
> headers, but a global header is requested.
> [h264_vaapi @ 0x555f24fc9000] No global header will be written: this may
> result in a stream which is not usable for some purposes (e.g. not muxable
> to some containers).
> Output #0, mp4, to 'output.mp4':
>   Metadata:
> encoder : Lavf58.29.100
> Stream #0:0: Video: h264 (h264_vaapi) (High) (avc1 / 0x31637661),
> vaapi_vld, 1920x1080, q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc
> Metadata:
>   encoder : Lavc58.54.100 h264_vaapi
> [h264_vaapi @ 0x555f24fc9000] Failed to end picture encode issue: 5
> (invalid VAContextID).
> [h264_vaapi @ 0x555f24fc9000] Encode failed: -5.
> Video encoding failed
> Conversion failed!
>
> Please help,
> My GPU is:
> 00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
> Trinity [Radeon HD 7660G]
> And glxinfo:
> OpenGL vendor string: X.Org
> OpenGL renderer string: AMD ARUBA (DRM 2.50.0 / 5.5.10-artix1-1, LLVM
> 9.0.1)
> OpenGL core profile version string: 4.3 (Core Profile) Mesa 20.0.4
> OpenGL core profile shading language version string: 4.30
> OpenGL core profile context flags: (none)
> OpenGL core profile profile mask: core profile
> OpenGL core profile extensions:
> OpenGL version string: 3.1 Mesa 20.0.4
> OpenGL shading language version string: 1.40
> OpenGL context flags: (none)
> OpenGL extensions:
> OpenGL ES profile version string: OpenGL ES 3.1 Mesa 20.0.4
> OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
> OpenGL ES profile extensions:
> And vainfo:
> vainfo: VA-API version: 1.7 (libva 2.6.0)
> vainfo: Driver version: Mesa Gallium driver 20.0.4 for AMD ARUBA (DRM
> 2.50.0 / 5.5.10-artix1-1, LLVM 9.0.1)
> vainfo: Supported profile and entrypoints
>   VAProfileMPEG2Simple: VAEntrypointVLD
>   VAProfileMPEG2Main  : VAEntrypointVLD
>   VAProfileVC1Simple  : VAEntrypointVLD
>   VAProfileVC1Main: VAEntrypointVLD
>   VAProfileVC1Advanced: VAEntrypointVLD
>   VAProfileH264ConstrainedBaseline: VAEntrypointVLD
>   VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
>   VAProfileH264Main   : VAEntrypointVLD
>   VAProfileH264Main   : 

Re: [FFmpeg-user] Issue with hwaccel cuvid

2020-04-08 Thread Dennis Mungai
On Wed, 8 Apr 2020 at 19:13, Dennis Mungai  wrote:

> On Wed, 8 Apr 2020 at 19:04, Andy Sheimo  wrote:
>
>> This still produces the same error;
>>
>> ffmpeg -threads 1 -loglevel verbose -hwaccel cuvid
>> -hwaccel_output_format cuda -c:v mpeg2_cuvid -extra_hw_frames 3 -i
>> "l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a copy
>> -c:v h264_nvenc test.mkv
>>
>> But this works to complete the job;
>>
>> ffmpeg -threads 1 -loglevel verbose -hwaccel cuda
>> -hwaccel_output_format cuda -extra_hw_frames 3 -i
>> "l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a copy
>> -c:v h264_nvenc test.mkv
>>
>> By not specifying  -c:v mpeg2_cuvid do we know what decoder is being used?
>> Is the process still completely in hardware? Do you think this is a
>> limitation of the cuvid decoder?
>>
>> Thanks for your help. -Andy
>>
>
> NVDEC (an alias to the CUDA hwaccel) handles GPU memory quite differently
> from CUVID, and when its' in use, the decoder is not specified.
> CUVID, however, was never a true hwaccel, but rather a "wrapper" that
> "brings up"/initializes a specific decoder by name passed to it via -c:v,
> in a similar fashion to the bring-up seen with QuickSync (-hwaccel qsv).
>
> I cannot speak much about why CUVID is failing on your end. I migrated all
> my workflows to NVDEC an year ago.
>
> Perhaps omitting the hwacccel_output_format with CUVID will help?
>
> Try this:
>
> ffmpeg -threads 1 -loglevel verbose -hwaccel cuvid
> -c:v mpeg2_cuvid -extra_hw_frames 3 -i
> "l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a copy
> -c:v h264_nvenc test.mkv
>
> Then report back
>

And another suggestion:

Try using a newer FFmpeg build. Your binary was compiled in ~2019. Retry
with a new build and report back.
On this mailing list, only ffmpeg git tip builds are supported.

For up to date static builds, see:
1. Jon Van Sickle's builds (Linux):  https://johnvansickle.com/ffmpeg/
2. For Windows, Zeranoe's: https://ffmpeg.zeranoe.com/builds/
___
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] Issue with hwaccel cuvid

2020-04-08 Thread Dennis Mungai
On Wed, 8 Apr 2020 at 19:04, Andy Sheimo  wrote:

> This still produces the same error;
>
> ffmpeg -threads 1 -loglevel verbose -hwaccel cuvid
> -hwaccel_output_format cuda -c:v mpeg2_cuvid -extra_hw_frames 3 -i
> "l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a copy
> -c:v h264_nvenc test.mkv
>
> But this works to complete the job;
>
> ffmpeg -threads 1 -loglevel verbose -hwaccel cuda
> -hwaccel_output_format cuda -extra_hw_frames 3 -i
> "l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a copy
> -c:v h264_nvenc test.mkv
>
> By not specifying  -c:v mpeg2_cuvid do we know what decoder is being used?
> Is the process still completely in hardware? Do you think this is a
> limitation of the cuvid decoder?
>
> Thanks for your help. -Andy
>

NVDEC (an alias to the CUDA hwaccel) handles GPU memory quite differently
from CUVID, and when its' in use, the decoder is not specified.
CUVID, however, was never a true hwaccel, but rather a "wrapper" that
"brings up"/initializes a specific decoder by name passed to it via -c:v,
in a similar fashion to the bring-up seen with QuickSync (-hwaccel qsv).

I cannot speak much about why CUVID is failing on your end. I migrated all
my workflows to NVDEC an year ago.

Perhaps omitting the hwacccel_output_format with CUVID will help?

Try this:

ffmpeg -threads 1 -loglevel verbose -hwaccel cuvid
-c:v mpeg2_cuvid -extra_hw_frames 3 -i
"l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a copy
-c:v h264_nvenc test.mkv

Then report back.
___
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] Issue with hwaccel cuvid

2020-04-08 Thread Dennis Mungai
On Wed, 8 Apr 2020 at 17:57, Andy Sheimo  wrote:

> I keep getting an error on some files and it appears to be due to a
> scaler being inserted but I don't know how to fix it. Any help would be
> appreciated. logging below:
>
> K:\Video\GAMERA THE BRAVE>ffmpeg -loglevel verbose -hwaccel cuvid
> -hwaccel_output_format yuv420p -c:v mpeg2_cuvid -i
> "l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a copy
> -c:v h264_nvenc test.mkv
> ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
>   built with gcc 9.2.1 (GCC) 20200122
>   configuration: --enable-gpl --enable-version3 --enable-sdl2
> --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
> --enable-libdav1d --enable-libbluray --enable-libfreetype
> --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
> --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx
> --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
> --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
> --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
> --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
> --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid
> --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
> --enable-avisynth --enable-libopenmpt
>   libavutil  56. 31.100 / 56. 31.100
>   libavcodec 58. 54.100 / 58. 54.100
>   libavformat58. 29.100 / 58. 29.100
>   libavdevice58.  8.100 / 58.  8.100
>   libavfilter 7. 57.100 /  7. 57.100
>   libswscale  5.  5.100 /  5.  5.100
>   libswresample   3.  5.100 /  3.  5.100
>   libpostproc55.  5.100 / 55.  5.100
> Input #0, matroska,webm, from 'l:\welter_originals\gamera the
> brave\Latatude Zero-trailer.mkv':
>   Metadata:
> encoder : libmakemkv v1.15.0 (1.3.5/1.4.7) win(x64-release)
> creation_time   : 2020-03-05T18:41:29.00Z
>   Duration: 00:02:28.75, start: 0.00, bitrate: 4685 kb/s
> Stream #0:0(eng): Video: mpeg2video (Main), 1 reference frame,
> yuv420p(tv, top first, left), 720x480 [SAR 32:27 DAR 16:9], SAR 186:157 DAR
> 279:157, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
> Metadata:
>   BPS-eng : 4488094
>   DURATION-eng: 00:02:28.74860
>   NUMBER_OF_FRAMES-eng: 3567
>   NUMBER_OF_BYTES-eng: 83449382
>   SOURCE_ID-eng   : 0100E0
>   _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.0 win(x64-release)
>   _STATISTICS_WRITING_DATE_UTC-eng: 2020-03-05 18:41:29
>   _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> SOURCE_ID
> Stream #0:1(eng): Audio: ac3, 48000 Hz, mono, fltp, 192 kb/s (default)
> Metadata:
>   title   : Mono
>   BPS-eng : 192000
>   DURATION-eng: 00:02:28.70400
>   NUMBER_OF_FRAMES-eng: 4647
>   NUMBER_OF_BYTES-eng: 3568896
>   SOURCE_ID-eng   : 0180BD
>   _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.0 win(x64-release)
>   _STATISTICS_WRITING_DATE_UTC-eng: 2020-03-05 18:41:29
>   _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> SOURCE_ID
> File 'test.mkv' already exists. Overwrite ? [y/N] y
> [mpeg2_cuvid @ 01ec985dfbc0] Initializing cuvid hwaccel
> [mpeg2_cuvid @ 01ec985dfbc0] CUVID capabilities for mpeg2_cuvid:
> [mpeg2_cuvid @ 01ec985dfbc0] 8 bit: supported: 1, min_width: 48,
> max_width: 4080, min_height: 16, max_height: 4080
> [mpeg2_cuvid @ 01ec985dfbc0] 10 bit: supported: 0, min_width: 0,
> max_width: 0, min_height: 0, max_height: 0
> [mpeg2_cuvid @ 01ec985dfbc0] 12 bit: supported: 0, min_width: 0,
> max_width: 0, min_height: 0, max_height: 0
> Stream mapping:
>   Stream #0:0 -> #0:0 (mpeg2video (mpeg2_cuvid) -> h264 (h264_nvenc))
>   Stream #0:1 -> #0:1 (copy)
> Press [q] to stop, [?] for help
> [mpeg2_cuvid @ 01ec985dfbc0] Initializing cuvid hwaccel
> [mpeg2_cuvid @ 01ec985dfbc0] Formats: Original: cuda | HW: cuda | SW:
> nv12
> [graph 0 input from stream 0:0 @ 01ec98632f00] w:720 h:480 pixfmt:cuda
> tb:1/1000 fr:3/1001 sar:186/157 sws_param:flags=2
> [h264_nvenc @ 01ec985efe00] Loaded Nvenc version 10.0
> [h264_nvenc @ 01ec985efe00] Nvenc initialized successfully
> Output #0, matroska, to 'test.mkv':
>   Metadata:
> encoder : Lavf58.29.100
> Stream #0:0(eng): Video: h264 (h264_nvenc) (Main), 1 reference frame
> (H264 / 0x34363248), cuda(left), 720x480 [SAR 186:157 DAR 279:157],
> q=-1--1, 2000 kb/s, 29.97 fps, 1k tbn, 29.97 tbc
> Metadata:
>   BPS-eng : 4488094
>   DURATION-eng: 00:02:28.74860
>   NUMBER_OF_FRAMES-eng: 3567
>   NUMBER_OF_BYTES-eng: 83449382
>   SOURCE_ID-eng   : 0100E0
>   _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.0 win(x64-release)
>   _STATISTICS_WRITING_DATE_UTC-eng: 2020-03-05 18:41:29
>   _STATISTICS_TAGS-eng: BPS DURATION 

Re: [FFmpeg-user] High CPU usage during scale_npp to low resolutions with multiple instances

2020-04-08 Thread Dennis Mungai
On Wed, 8 Apr 2020, 15:23 Valentin Schweitzer,  wrote:

>
>
> Set this environment  variable: CUDA_DEVICE_MAX_CONNECTIONS=2
>
> Then retest and report back.
>
>
>
>
>
> One more thing: Could you show us the output of:
>
> numactl --hardware
>
> Thanks for your reply. We should have clarified that we are on Windows.
> Unfortunately, setting the environment variable CUDA_DEVICE_MAX_CONNECTIONS
> to 2 does not make a difference. The closest we got to a numactl equivalent
> on Windows is the NUMA view in the Task Manager which shows four NUMA nodes
> on our 24-core processor. Given this information, is it possible that
> either
> the Windows scheduler or the NVIDIA driver is having troubles with
> different
> ffmpeg instances being distributed to different NUMA nodes so that a lot of
> data has to be transferred between NUMA nodes, limiting the CPU? Are there
> any mitigations to this or is there anything else that we can analyze to
> clarify why different resolutions behave so differently on our machine?
>
> Greetings,
> Valentin
>


Hey there,

In your BIOS, disable the following options and retest:

1. SMT support (toggle to disabled).
2. X2APIC (toggle to disabled).

This will be the equivalent of setting "gaming mode" on the Ryzen consumer
processors. Apply these changes, retest and report back.

>
___
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] High CPU usage during scale_npp to low resolutions with multiple instances

2020-03-30 Thread Dennis Mungai
On Mon, 30 Mar 2020, 15:31 Dennis Mungai,  wrote:

> On Mon, 30 Mar 2020, 15:22 Valentin Schweitzer, 
> wrote:
>
>> 1234567890123456789012345678901234567890123456789012345678901234567890
>>
>> Hi,
>>
>> when using scale_npp to scale a test video down from 1920x1080 to
>> 1024x576 or lower with multiple processes in parallel, CPU usage is
>> unusually high.For context, when scaling the same video down to
>> 1280x720, CPU usage stays at about0.5% per FFmpeg instance. When
>> scaling down too 1024x576 or lower, CPU usage per FFmpeg process rises
>> to about 3.0%. The values listed here appear when starting 29
>> instances of FFmpeg in parallel. The effect is less pronounced but
>> still visible at 10 instances in parallel. Hardware used for this
>> is an AMD EPYC 7401P 24 Core + NVIDIA Quadro RTX 4000.
>>
>> To generate 100s of random noise in 1080p (which will be the test video):
>>
>> ffmpeg -y -hide_banner -f lavfi -i nullsrc=s=1920x1080 -filter_complex
>> "geq=random(1)*255:128:128;aevalsrc=-2+random(0)" -vcodec rawvideo
>> -acodec pcm_s16le -t 100 noise.mkv
>>
>> Now rescale the test video to 720p:
>>
>> ffmpeg -hide_banner -y -i noise.mkv -vf
>> hwupload_cuda,scale_npp=w=1280:h=720:format=nv12 -vcodec h264_nvenc -an
>> -f null NUL
>>
>> This should not cause very high CPU usage. Now rescale the same video to
>> 576p:
>>
>> ffmpeg -hide_banner -y -i noise.mkv -vf
>> hwupload_cuda,scale_npp=w=1024:h=576:format=nv12 -vcodec h264_nvenc -an
>> -f null NUL
>>
>> This should cause about 5 or 6 times as much CPU usage.
>>
>> This might be caused by some NVIDIA optimizations, but it does not
>> seem to be documented and I have yet to find a good place to ask
>>
>
>
> Set this environment  variable: CUDA_DEVICE_MAX_CONNECTIONS=2
>
> Then retest and report back.
>


One more thing: Could you show us the output of:

numactl --hardware
___
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] High CPU usage during scale_npp to low resolutions with multiple instances

2020-03-30 Thread Dennis Mungai
On Mon, 30 Mar 2020, 15:22 Valentin Schweitzer,  wrote:

> 1234567890123456789012345678901234567890123456789012345678901234567890
>
> Hi,
>
> when using scale_npp to scale a test video down from 1920x1080 to
> 1024x576 or lower with multiple processes in parallel, CPU usage is
> unusually high.For context, when scaling the same video down to
> 1280x720, CPU usage stays at about0.5% per FFmpeg instance. When
> scaling down too 1024x576 or lower, CPU usage per FFmpeg process rises
> to about 3.0%. The values listed here appear when starting 29
> instances of FFmpeg in parallel. The effect is less pronounced but
> still visible at 10 instances in parallel. Hardware used for this
> is an AMD EPYC 7401P 24 Core + NVIDIA Quadro RTX 4000.
>
> To generate 100s of random noise in 1080p (which will be the test video):
>
> ffmpeg -y -hide_banner -f lavfi -i nullsrc=s=1920x1080 -filter_complex
> "geq=random(1)*255:128:128;aevalsrc=-2+random(0)" -vcodec rawvideo
> -acodec pcm_s16le -t 100 noise.mkv
>
> Now rescale the test video to 720p:
>
> ffmpeg -hide_banner -y -i noise.mkv -vf
> hwupload_cuda,scale_npp=w=1280:h=720:format=nv12 -vcodec h264_nvenc -an
> -f null NUL
>
> This should not cause very high CPU usage. Now rescale the same video to
> 576p:
>
> ffmpeg -hide_banner -y -i noise.mkv -vf
> hwupload_cuda,scale_npp=w=1024:h=576:format=nv12 -vcodec h264_nvenc -an
> -f null NUL
>
> This should cause about 5 or 6 times as much CPU usage.
>
> This might be caused by some NVIDIA optimizations, but it does not
> seem to be documented and I have yet to find a good place to ask
>


Set this environment  variable: CUDA_DEVICE_MAX_CONNECTIONS=2

Then retest and report back.

>
___
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] On the recovery behavior of HLS muxer when slaved to tee'd fifo muxers in ffmpeg.

2020-03-27 Thread Dennis Mungai
On Wed, 25 Mar 2020 at 08:32, Dennis Mungai  wrote:

> On Wed, 25 Mar 2020 at 08:27, Dennis Mungai  wrote:
>
>> Four months ago, I posted a ticket on trac, #8387, see
>> https://trac.ffmpeg.org/ticket/8387
>>
>> Which described an anomaly with the recovery behavior of the underlying
>> HLS muxers called up via the tee's fifo slaves. More details in the ticket.
>>
>> What I've discovered by extensively studying this behavior is that when
>> dealing with fragmented mp4, the HLS muxer (as configured above) will
>> definitely fail to re-create the init.mp4 file should the target path (on a
>> local or remote filesystem) go missing.
>>
>> This is still present with ffmpeg git head, compiled a few hours ago.
>>
>> Case in point: Simulating failures with unstable NFS mounts, using the
>> same recovery options for fifo work flawlessly for DASH where the init
>> segments per variant are successfully re-created but the same doesn't carry
>> over for HLS.
>>
>> What gives?
>>
>> Are there specific tee and fifo muxer settings I can try out to resolve
>> this?
>>
>> Thanks,
>>
>> Dennis.
>>
>
> Update: A bit too soon, perhaps I should also update the subject.
> DASH demonstrates something similar:
> In effect, the muxer tries to re-create the init segment(s) for each
> variant stream(s), but fails with the ominous message:
>
> "Application provided invalid, non monotonically increasing dts to muxer
> in stream 0"
>
>

Update: I fixed the issue.

For NFS mounts, use these options in fstab:

$server_ip:/$nfs_mount /$mount_point nfs
timeo=21,fg,nofail,retrans=600,actimeo=3,vers=4,soft,x-systemd.automount,x-systemd.mount-timeout=infinity,retry=1_netdev
0 0

Sneaky details are in the systemd NFS guide:
https://www.freedesktop.org/software/systemd/man/systemd.mount.html

And for FFmpeg, configure the muxer options as shown:

(a). For fifo muxers called up by tee, pass these options:
use_fifo=1:fifo_options=queue_size=9\\:attempt_recovery=1\\:drop_pkts_on_overflow=1
(b). For both HLS and DASH, pass the option ignore_io_errors=1

This was tested with ffmpeg 1:N transcode to multiple NFS mounted
directories for each output, and can confirm clean recovery when NFS
server(s) are restarted.
I cannot (yet) explain why this setup works differently from a similar case
but with local filesystems, but as tested over the last two days, this is
what I got to work with no issues.

Leaving this here incase someone else runs into the same issue with NFS and
transparent tee/fifo recovery with ffmpeg and HLS output.
___
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] Use of tee output with codec copy

2020-03-25 Thread Dennis Mungai
On Thu, 26 Mar 2020 at 02:03, Devin Heitmueller 
wrote:

> Hi Dennis,
>
> > Could you provide the sample file mentioned in the issue above?
>
> Sure, you can download it from here:
>
> https://www.dropbox.com/s/rhyn751pru4yagb/foo.ts?dl=0
>
> Devin
>
> --
> Devin J. Heitmueller - Kernel Labs
> http://www.kernellabs.com
>
>
Many thanks, I'll take a look.
This *might* be related to an issue I've been tracking internally with the
tee muxer.
___
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] Use of tee output with codec copy

2020-03-25 Thread Dennis Mungai
On Thu, 26 Mar 2020 at 00:27, Devin Heitmueller 
wrote:

> Hello,
>
> I've seen various postings related to problems with the use of copy with
> the tee output format, but not with any real resolution.  I'm trying to
> direct output to both an flv and a UDP output with codec copy, and I've
> boiled it down to the following test case (run against today's master).
>
> I originally assumed it was some failure to automatically insert a BSF when
> using the tee filter, but I don't see any sign of that.
>
> There's something in ffmpeg that converts "h264 (High) ([27][0][0][0]" into
> "h264 (High) ([7][0][0][0] / 0x0007)" when going directly to flv but not
> when using tee, but it's not clear to me where in the code that happens.
>
> Any suggestions would be greatly appreciated (I'm happy to provide the
> foo.ts file if you can't reproduce it with any other ts that has h.264 in
> it).
>
> Thanks,
>
> Devin Heitmueller
>
> =
> ./ffmpeg -i foo.ts -map 0:0 -c:v copy -f tee "[f=mpegts]udp://
> 227.1.1.1:6002?pkt_size=1316|[f=flv]whatever.flv
> "
> ffmpeg version N-96891-g60b1f85b67 Copyright (c) 2000-2020 the FFmpeg
> developers
>   built with Apple clang version 11.0.0 (clang-1100.0.33.17)
>   configuration:
>   libavutil  56. 42.100 / 56. 42.100
>   libavcodec 58. 73.102 / 58. 73.102
>   libavformat58. 39.101 / 58. 39.101
>   libavdevice58.  9.103 / 58.  9.103
>   libavfilter 7. 77.100 /  7. 77.100
>   libswscale  5.  6.100 /  5.  6.100
>   libswresample   3.  6.100 /  3.  6.100
> Input #0, mpegts, from 'foo.ts':
>   Duration: 00:00:23.90, start: 1.40, bitrate: 2531 kb/s
>   Program 1
> Metadata:
>   service_name: Service01
>   service_provider: FFmpeg
> Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B),
> yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps,
> 29.97 tbr, 90k tbn, 59.94 tbc
> Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
> stereo, fltp, 256 kb/s
> [flv @ 0x7fe45a804c00] Tag [27][0][0][0] incompatible with output codec id
> '27' ([7][0][0][0])
> [tee @ 0x7fe45a802200] Slave '[f=flv]whatever.flv': error writing header:
> Invalid data found when processing input
> [tee @ 0x7fe45a802200] Slave muxer #1 failed, aborting.
> Could not write header for output file #0 (incorrect codec parameters ?):
> Invalid data found when processing input
> Stream mapping:
>   Stream #0:0 -> #0:0 (copy)
> Last message repeated 1 times
> ===
>
> For reference, this command works fine:
> ./ffmpeg -i foo.ts -map 0:0 -c:v copy -f flv whatever.flv
>
>
> --
> Devin J. Heitmueller - Kernel Labs
>
>
Hey there,

Could you provide the sample file mentioned in the issue above?
___
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] On the recovery behavior of HLS muxer when slaved to tee'd fifo muxers in ffmpeg.

2020-03-24 Thread Dennis Mungai
Four months ago, I posted a ticket on trac, #8387, see
https://trac.ffmpeg.org/ticket/8387

Which described an anomaly with the recovery behavior of the underlying HLS
muxers called up via the tee's fifo slaves. More details in the ticket.

What I've discovered by extensively studying this behavior is that when
dealing with fragmented mp4, the HLS muxer (as configured above) will
definitely fail to re-create the init.mp4 file should the target path (on a
local or remote filesystem) go missing.

This is still present with ffmpeg git head, compiled a few hours ago.

Case in point: Simulating failures with unstable NFS mounts, using the same
recovery options for fifo work flawlessly for DASH where the init segments
per variant are successfully re-created but the same doesn't carry over for
HLS.

What gives?

Are there specific tee and fifo muxer settings I can try out to resolve
this?

Thanks,

Dennis.
___
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] On the recovery behavior of HLS muxer when slaved to tee'd fifo muxers in ffmpeg.

2020-03-24 Thread Dennis Mungai
On Wed, 25 Mar 2020 at 08:27, Dennis Mungai  wrote:

> Four months ago, I posted a ticket on trac, #8387, see
> https://trac.ffmpeg.org/ticket/8387
>
> Which described an anomaly with the recovery behavior of the underlying
> HLS muxers called up via the tee's fifo slaves. More details in the ticket.
>
> What I've discovered by extensively studying this behavior is that when
> dealing with fragmented mp4, the HLS muxer (as configured above) will
> definitely fail to re-create the init.mp4 file should the target path (on a
> local or remote filesystem) go missing.
>
> This is still present with ffmpeg git head, compiled a few hours ago.
>
> Case in point: Simulating failures with unstable NFS mounts, using the
> same recovery options for fifo work flawlessly for DASH where the init
> segments per variant are successfully re-created but the same doesn't carry
> over for HLS.
>
> What gives?
>
> Are there specific tee and fifo muxer settings I can try out to resolve
> this?
>
> Thanks,
>
> Dennis.
>

Update: A bit too soon, perhaps I should also update the subject.
DASH demonstrates something similar:
In effect, the muxer tries to re-create the init segment(s) for each
variant stream(s), but fails with the ominous message:

"Application provided invalid, non monotonically increasing dts to muxer in
stream 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] NVENC with transparency

2020-03-23 Thread Dennis Mungai
On Mon, 23 Mar 2020 at 21:06, Joshua Grauman  wrote:

> Hi all,
>
> I have a GeForce GT 1030/PCIe/SSE2 that supports NVENC and I have ffmpeg
> compiled with nvenc support.
>
> ./ffmpeg -encoders 2>/dev/null | grep nvenc
>   V. h264_nvenc   NVIDIA NVENC H.264 encoder (codec h264)
>   V. nvencNVIDIA NVENC H.264 encoder (codec h264)
>   V. nvenc_h264   NVIDIA NVENC H.264 encoder (codec h264)
>   V. nvenc_hevc   NVIDIA NVENC hevc encoder (codec hevc)
>   V. hevc_nvenc   NVIDIA NVENC hevc encoder (codec hevc)
>
> Am I correct that nvenc could never help accelerate the following command
> and that it can only help encode h264/h265?
>
> ffmpeg -f rawvideo -pixel_format bgra -video_size $SIZE -framerate $2 -i -
> -vcodec utvideo $1.avi
>
> Secondarily, is there any way to get h264/h265 to encode with transparency
> (or any way to get the nvenc encoder to encode a video with transparency
> at all)? Thanks!


The GT 1030 does not support NVENC.

>
>
___
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".

  1   2   3   >