Fwd: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT
---------- Forwarded message --------- От: Wang, Fei W <[email protected]> Date: пт, 22 нояб. 2024 г., 09:10 Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT To: [email protected] <[email protected]> On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote:
Hello.
Recently I teached cinelerra-gg to use qsv encoders in ffmpeg (libavcodec) and some test were working but some not.
We nailed it down to top-field first material, like HDV files. bff files like consumer version of DV and progressive worked fine.
I looked at source and ... I thought condition at
http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852
must contain case for bff, but I tried this and it was reportedly not helping?
We currently set flags = ildct+ilme on interlaced streams, I hope to avoid special-casing qsv encoders, but may be we have no other choice?
I asked user (Terje) to add +ildct flag to his normal system ffmpeg line and it started to fail too:
https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html
AV1 doesn't support interlaced frame. You may add deinterlace filter before encoder after apply this patch: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13372 cmd: ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 - hwaccel_output_format qsv -i input.mp4 -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null - Thanks Fei
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
On 11/22/24 08:45, Andrew Randrianasulu wrote:
---------- Forwarded message --------- От: *Wang, Fei W* <[email protected]> Date: пт, 22 нояб. 2024 г., 09:10 Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT To: [email protected] <[email protected]>
On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote:
Hello.
Recently I teached cinelerra-gg to use qsv encoders in ffmpeg (libavcodec) and some test were working but some not.
We nailed it down to top-field first material, like HDV files. bff files like consumer version of DV and progressive worked fine.
I looked at source and ... I thought condition at
http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852
must contain case for bff, but I tried this and it was reportedly not helping?
We currently set flags = ildct+ilme on interlaced streams, I hope to avoid special-casing qsv encoders, but may be we have no other choice?
I asked user (Terje) to add +ildct flag to his normal system ffmpeg line and it started to fail too:
https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html
AV1 doesn't support interlaced frame.
We can dual check to transcode hdv to av1_qsv again, as I did with ffmpeg in this post https://www.mail-archive.com/[email protected]/msg08314.html My issue now currently on Kaby Lake is that I have no hdv.m2t file stored and could not find a download link with example hdv. Suggestion?
You may add deinterlace filter before encoder after apply this patch: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13372
cmd: ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 - hwaccel_output_format qsv -i input.mp4 -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null -
Thanks Fei
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
On Fri, Nov 22, 2024 at 2:52 PM Terje Hanssen <[email protected]> wrote:
On 11/22/24 08:45, Andrew Randrianasulu wrote:
---------- Forwarded message --------- От: Wang, Fei W <[email protected]> Date: пт, 22 нояб. 2024 г., 09:10 Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT To: [email protected] <[email protected]>
On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote:
Hello.
Recently I teached cinelerra-gg to use qsv encoders in ffmpeg (libavcodec) and some test were working but some not.
We nailed it down to top-field first material, like HDV files. bff files like consumer version of DV and progressive worked fine.
I looked at source and ... I thought condition at
http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852
must contain case for bff, but I tried this and it was reportedly not helping?
We currently set flags = ildct+ilme on interlaced streams, I hope to avoid special-casing qsv encoders, but may be we have no other choice?
I asked user (Terje) to add +ildct flag to his normal system ffmpeg line and it started to fail too:
https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html
AV1 doesn't support interlaced frame.
We can dual check to transcode hdv to av1_qsv again, as I did with ffmpeg in this post https://www.mail-archive.com/[email protected]/msg08314.html
My issue now currently on Kaby Lake is that I have no hdv.m2t file stored and could not find a download link with example hdv. Suggestion?
https://archive.org/download/hdv01
You may add deinterlace filter before encoder after apply this patch: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13372
cmd: ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 - hwaccel_output_format qsv -i input.mp4 -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null -
Thanks Fei
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
On 11/22/24 18:41, Andrew Randrianasulu wrote:
On Fri, Nov 22, 2024 at 2:52 PM Terje Hanssen<[email protected]> wrote:
On 11/22/24 08:45, Andrew Randrianasulu wrote:
---------- Forwarded message --------- От: Wang, Fei W<[email protected]> Date: пт, 22 нояб. 2024 г., 09:10 Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT To:[email protected] <[email protected]>
On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote:
Hello.
Recently I teached cinelerra-gg to use qsv encoders in ffmpeg (libavcodec) and some test were working but some not.
We nailed it down to top-field first material, like HDV files. bff files like consumer version of DV and progressive worked fine.
I looked at source and ... I thought condition at
http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852
must contain case for bff, but I tried this and it was reportedly not helping?
We currently set flags = ildct+ilme on interlaced streams, I hope to avoid special-casing qsv encoders, but may be we have no other choice?
I asked user (Terje) to add +ildct flag to his normal system ffmpeg line and it started to fail too:
https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html AV1 doesn't support interlaced frame.
We can dual check to transcode hdv to av1_qsv again, as I did with ffmpeg in this post https://www.mail-archive.com/[email protected]/msg08314.html
My issue now currently on Kaby Lake is that I have no hdv.m2t file stored and could not find a download link with example hdv. Suggestion?
Thanks, I downloaded FX1_01.mpg, which even its wrong file extension is a 1080i50 HDV recorded on a predecessor of my own Sony FX7-E camcorder.) mediainfo FX1_01.mpg | egrep -i "scan|bit|format|FileExtension" Format : MPEG-TS Overall bit rate mode : Variable Overall bit rate : 26.1 Mb/s Maximum Overall bit rate : 33.0 Mb/s FileExtension_Invalid : ts m2t m2s m4t m4s tmf ts tp trp ty Format : MPEG Video Format version : Version 2 Format profile : Main@High 1440 Format settings : CustomMatrix / BVOP Format settings, BVOP : Yes Format settings, Matrix : Custom Format settings, GOP : M=3, N=12 Format settings, picture structure : Frame Bit rate mode : Constant Bit rate : 24.5 Mb/s Maximum bit rate : 25.0 Mb/s Bit depth : 8 bits Scan type : Interlaced Scan order : Top Field First Bits/(Pixel*Frame) : 0.629 Format : MPEG Audio Format version : Version 1 Format profile : Layer 2 Bit rate mode : Constant Bit rate : 384 kb/s Format : MPEG Video / MPEG Audio / / But unhappily, the HDV --> av1_qsv transcoding I previous did on i17-12700/DG2 WS https://www.mail-archive.com/[email protected]/msg08314.html HDV --> av1_qsv -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4 ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default) is not possible on my legacy KBL i7-8550U Intel UHD Graphics 620 [av1_qsv @ 0x5641dd0f5440] This version of runtime doesn't support AV1 encoding as confirmed by these limited capabilites vainfo | grep -i enc libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSliceLP VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : VAEntrypointEncSliceLP VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointEncSlice By the way, neither this attempt claims about unsupported or wrong image structure format !?
You may add deinterlace filter before encoder after apply this patch: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13372
cmd: ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 - hwaccel_output_format qsv -i input.mp4 -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null -
Thanks Fei
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
пт, 22 нояб. 2024 г., 19:55 Terje Hanssen <[email protected]>:
On 11/22/24 18:41, Andrew Randrianasulu wrote:
On Fri, Nov 22, 2024 at 2:52 PM Terje Hanssen <[email protected]> <[email protected]> wrote:
On 11/22/24 08:45, Andrew Randrianasulu wrote:
---------- Forwarded message --------- От: Wang, Fei W <[email protected]> <[email protected]> Date: пт, 22 нояб. 2024 г., 09:10 Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT To: [email protected] <[email protected]> <[email protected]>
On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote:
Hello.
Recently I teached cinelerra-gg to use qsv encoders in ffmpeg (libavcodec) and some test were working but some not.
We nailed it down to top-field first material, like HDV files. bff files like consumer version of DV and progressive worked fine.
I looked at source and ... I thought condition at http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852
must contain case for bff, but I tried this and it was reportedly not helping?
We currently set flags = ildct+ilme on interlaced streams, I hope to avoid special-casing qsv encoders, but may be we have no other choice?
I asked user (Terje) to add +ildct flag to his normal system ffmpeg line and it started to fail too: https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html
AV1 doesn't support interlaced frame.
We can dual check to transcode hdv to av1_qsv again, as I did with ffmpeg in this posthttps://www.mail-archive.com/[email protected]/msg08314.html
My issue now currently on Kaby Lake is that I have no hdv.m2t file stored and could not find a download link with example hdv. Suggestion?
https://archive.org/download/hdv01
Thanks, I downloaded FX1_01.mpg, which even its wrong file extension is a 1080i50 HDV recorded on a predecessor of my own Sony FX7-E camcorder.)
mediainfo FX1_01.mpg | egrep -i "scan|bit|format|FileExtension" Format : MPEG-TS Overall bit rate mode : Variable Overall bit rate : 26.1 Mb/s Maximum Overall bit rate : 33.0 Mb/s FileExtension_Invalid : ts m2t m2s m4t m4s tmf ts tp trp ty Format : MPEG Video Format version : Version 2 Format profile : Main@High 1440 Format settings : CustomMatrix / BVOP Format settings, BVOP : Yes Format settings, Matrix : Custom Format settings, GOP : M=3, N=12 Format settings, picture structure : Frame Bit rate mode : Constant Bit rate : 24.5 Mb/s Maximum bit rate : 25.0 Mb/s Bit depth : 8 bits Scan type : Interlaced Scan order : Top Field First Bits/(Pixel*Frame) : 0.629 Format : MPEG Audio Format version : Version 1 Format profile : Layer 2 Bit rate mode : Constant Bit rate : 384 kb/s Format : MPEG Video / MPEG Audio / /
But unhappily, the HDV --> av1_qsv transcoding I previous did on i17-12700/DG2 WS https://www.mail-archive.com/[email protected]/msg08314.html
HDV --> av1_qsv -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4
ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default)
is not possible on my legacy KBL i7-8550U Intel UHD Graphics 620
[av1_qsv @ 0x5641dd0f5440] This version of runtime doesn't support AV1 encoding
as confirmed by these limited capabilites
vainfo | grep -i enc libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSliceLP VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : VAEntrypointEncSliceLP VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointEncSlice
By the way, neither this attempt claims about unsupported or wrong image structure format !?
may be it not even come to this line and abort earlier? (in compiled languages functions can be executed out of order they appear in file)
You may add deinterlace filter before encoder after apply this patch:https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13372
cmd: ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 - hwaccel_output_format qsv -i input.mp4 -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null -
Thanks Fei
_______________________________________________ ffmpeg-devel mailing [email protected]https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or [email protected] with subject "unsubscribe".
_______________________________________________ ffmpeg-devel mailing [email protected]https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or [email protected] with subject "unsubscribe".
On 11/22/24 17:58, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 19:55 Terje Hanssen <[email protected]>:
On 11/22/24 18:41, Andrew Randrianasulu wrote:
On Fri, Nov 22, 2024 at 2:52 PM Terje Hanssen<[email protected]> <mailto:[email protected]> wrote:
On 11/22/24 08:45, Andrew Randrianasulu wrote:
---------- Forwarded message --------- От: Wang, Fei W<[email protected]> <mailto:[email protected]> Date: пт, 22 нояб. 2024 г., 09:10 Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT To:[email protected] <[email protected]> <mailto:[email protected]>
On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote:
Hello.
Recently I teached cinelerra-gg to use qsv encoders in ffmpeg (libavcodec) and some test were working but some not.
We nailed it down to top-field first material, like HDV files. bff files like consumer version of DV and progressive worked fine.
I looked at source and ... I thought condition at
http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852
must contain case for bff, but I tried this and it was reportedly not helping?
We currently set flags = ildct+ilme on interlaced streams, I hope to avoid special-casing qsv encoders, but may be we have no other choice?
I asked user (Terje) to add +ildct flag to his normal system ffmpeg line and it started to fail too:
https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html
AV1 doesn't support interlaced frame.
We can dual check to transcode hdv to av1_qsv again, as I did with ffmpeg in this post https://www.mail-archive.com/[email protected]/msg08314.html
My issue now currently on Kaby Lake is that I have no hdv.m2t file stored and could not find a download link with example hdv. Suggestion?
Thanks, I downloaded FX1_01.mpg, which even its wrong file extension is a 1080i50 HDV recorded on a predecessor of my own Sony FX7-E camcorder.)
mediainfo FX1_01.mpg | egrep -i "scan|bit|format|FileExtension" Format : MPEG-TS Overall bit rate mode : Variable Overall bit rate : 26.1 Mb/s Maximum Overall bit rate : 33.0 Mb/s FileExtension_Invalid : ts m2t m2s m4t m4s tmf ts tp trp ty Format : MPEG Video Format version : Version 2 Format profile : Main@High 1440 Format settings : CustomMatrix / BVOP Format settings, BVOP : Yes Format settings, Matrix : Custom Format settings, GOP : M=3, N=12 Format settings, picture structure : Frame Bit rate mode : Constant Bit rate : 24.5 Mb/s Maximum bit rate : 25.0 Mb/s Bit depth : 8 bits Scan type : Interlaced Scan order : Top Field First Bits/(Pixel*Frame) : 0.629 Format : MPEG Audio Format version : Version 1 Format profile : Layer 2 Bit rate mode : Constant Bit rate : 384 kb/s Format : MPEG Video / MPEG Audio / /
But unhappily, the HDV --> av1_qsv transcoding I previous did on i17-12700/DG2 WS https://www.mail-archive.com/[email protected]/msg08314.html
HDV --> av1_qsv -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4
ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default)
is not possible on my legacy KBL i7-8550U Intel UHD Graphics 620
[av1_qsv @ 0x5641dd0f5440] This version of runtime doesn't support AV1 encoding
as confirmed by these limited capabilites
vainfo | grep -i enc libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSliceLP VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : VAEntrypointEncSliceLP VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointEncSlice
By the way, neither this attempt claims about unsupported or wrong image structure format !?
may be it not even come to this line and abort earlier? (in compiled languages functions can be executed out of order they appear in file)
HDV --> av1_qsv transcoded as referenced above on the newer i17-12700/DG2
You may add deinterlace filter before encoder after apply this patch: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13372
cmd: ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 - hwaccel_output_format qsv -i input.mp4 -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null -
Thanks Fei
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
пт, 22 нояб. 2024 г., 20:07 Terje Hanssen <[email protected]>:
On 11/22/24 17:58, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 19:55 Terje Hanssen <[email protected]>:
On 11/22/24 18:41, Andrew Randrianasulu wrote:
On Fri, Nov 22, 2024 at 2:52 PM Terje Hanssen <[email protected]> <[email protected]> wrote:
On 11/22/24 08:45, Andrew Randrianasulu wrote:
---------- Forwarded message --------- От: Wang, Fei W <[email protected]> <[email protected]> Date: пт, 22 нояб. 2024 г., 09:10 Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT To: [email protected] <[email protected]> <[email protected]>
On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote:
Hello.
Recently I teached cinelerra-gg to use qsv encoders in ffmpeg (libavcodec) and some test were working but some not.
We nailed it down to top-field first material, like HDV files. bff files like consumer version of DV and progressive worked fine.
I looked at source and ... I thought condition at http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852
must contain case for bff, but I tried this and it was reportedly not helping?
We currently set flags = ildct+ilme on interlaced streams, I hope to avoid special-casing qsv encoders, but may be we have no other choice?
I asked user (Terje) to add +ildct flag to his normal system ffmpeg line and it started to fail too: https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html
AV1 doesn't support interlaced frame.
We can dual check to transcode hdv to av1_qsv again, as I did with ffmpeg in this posthttps://www.mail-archive.com/[email protected]/msg08314.html
My issue now currently on Kaby Lake is that I have no hdv.m2t file stored and could not find a download link with example hdv. Suggestion?
https://archive.org/download/hdv01
Thanks, I downloaded FX1_01.mpg, which even its wrong file extension is a 1080i50 HDV recorded on a predecessor of my own Sony FX7-E camcorder.)
mediainfo FX1_01.mpg | egrep -i "scan|bit|format|FileExtension" Format : MPEG-TS Overall bit rate mode : Variable Overall bit rate : 26.1 Mb/s Maximum Overall bit rate : 33.0 Mb/s FileExtension_Invalid : ts m2t m2s m4t m4s tmf ts tp trp ty Format : MPEG Video Format version : Version 2 Format profile : Main@High 1440 Format settings : CustomMatrix / BVOP Format settings, BVOP : Yes Format settings, Matrix : Custom Format settings, GOP : M=3, N=12 Format settings, picture structure : Frame Bit rate mode : Constant Bit rate : 24.5 Mb/s Maximum bit rate : 25.0 Mb/s Bit depth : 8 bits Scan type : Interlaced Scan order : Top Field First Bits/(Pixel*Frame) : 0.629 Format : MPEG Audio Format version : Version 1 Format profile : Layer 2 Bit rate mode : Constant Bit rate : 384 kb/s Format : MPEG Video / MPEG Audio / /
But unhappily, the HDV --> av1_qsv transcoding I previous did on i17-12700/DG2 WS https://www.mail-archive.com/[email protected]/msg08314.html
HDV --> av1_qsv -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4
ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default)
is not possible on my legacy KBL i7-8550U Intel UHD Graphics 620
[av1_qsv @ 0x5641dd0f5440] This version of runtime doesn't support AV1 encoding
as confirmed by these limited capabilites
vainfo | grep -i enc libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSliceLP VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : VAEntrypointEncSliceLP VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointEncSlice
By the way, neither this attempt claims about unsupported or wrong image structure format !?
may be it not even come to this line and abort earlier? (in compiled languages functions can be executed out of order they appear in file)
HDV --> av1_qsv transcoded as referenced above on the newer i17-12700/DG2
?? you mean why default ffmpeg does not trip over this line? it silently ignores interlace and makes something flagged as interlaced but actually not?
You may add deinterlace filter before encoder after apply this patch:https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13372
cmd: ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 - hwaccel_output_format qsv -i input.mp4 -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null -
Thanks Fei
_______________________________________________ ffmpeg-devel mailing [email protected]https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or [email protected] with subject "unsubscribe".
_______________________________________________ ffmpeg-devel mailing [email protected]https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or [email protected] with subject "unsubscribe".
On 11/22/24 18:12, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 20:07 Terje Hanssen <[email protected]>:
On 11/22/24 17:58, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 19:55 Terje Hanssen <[email protected]>:
On 11/22/24 18:41, Andrew Randrianasulu wrote:
On Fri, Nov 22, 2024 at 2:52 PM Terje Hanssen<[email protected]> <mailto:[email protected]> wrote:
On 11/22/24 08:45, Andrew Randrianasulu wrote:
---------- Forwarded message --------- От: Wang, Fei W<[email protected]> <mailto:[email protected]> Date: пт, 22 нояб. 2024 г., 09:10 Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT To:[email protected] <[email protected]> <mailto:[email protected]>
On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote:
Hello.
Recently I teached cinelerra-gg to use qsv encoders in ffmpeg (libavcodec) and some test were working but some not.
We nailed it down to top-field first material, like HDV files. bff files like consumer version of DV and progressive worked fine.
I looked at source and ... I thought condition at
http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852
must contain case for bff, but I tried this and it was reportedly not helping?
We currently set flags = ildct+ilme on interlaced streams, I hope to avoid special-casing qsv encoders, but may be we have no other choice?
I asked user (Terje) to add +ildct flag to his normal system ffmpeg line and it started to fail too:
https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html
AV1 doesn't support interlaced frame.
We can dual check to transcode hdv to av1_qsv again, as I did with ffmpeg in this post https://www.mail-archive.com/[email protected]/msg08314.html
My issue now currently on Kaby Lake is that I have no hdv.m2t file stored and could not find a download link with example hdv. Suggestion?
Thanks, I downloaded FX1_01.mpg, which even its wrong file extension is a 1080i50 HDV recorded on a predecessor of my own Sony FX7-E camcorder.)
mediainfo FX1_01.mpg | egrep -i "scan|bit|format|FileExtension" Format : MPEG-TS Overall bit rate mode : Variable Overall bit rate : 26.1 Mb/s Maximum Overall bit rate : 33.0 Mb/s FileExtension_Invalid : ts m2t m2s m4t m4s tmf ts tp trp ty Format : MPEG Video Format version : Version 2 Format profile : Main@High 1440 Format settings : CustomMatrix / BVOP Format settings, BVOP : Yes Format settings, Matrix : Custom Format settings, GOP : M=3, N=12 Format settings, picture structure : Frame Bit rate mode : Constant Bit rate : 24.5 Mb/s Maximum bit rate : 25.0 Mb/s Bit depth : 8 bits Scan type : Interlaced Scan order : Top Field First Bits/(Pixel*Frame) : 0.629 Format : MPEG Audio Format version : Version 1 Format profile : Layer 2 Bit rate mode : Constant Bit rate : 384 kb/s Format : MPEG Video / MPEG Audio / /
But unhappily, the HDV --> av1_qsv transcoding I previous did on i17-12700/DG2 WS https://www.mail-archive.com/[email protected]/msg08314.html
HDV --> av1_qsv -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4
ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default)
is not possible on my legacy KBL i7-8550U Intel UHD Graphics 620
[av1_qsv @ 0x5641dd0f5440] This version of runtime doesn't support AV1 encoding
as confirmed by these limited capabilites
vainfo | grep -i enc libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSliceLP VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : VAEntrypointEncSliceLP VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointEncSlice
By the way, neither this attempt claims about unsupported or wrong image structure format !?
may be it not even come to this line and abort earlier? (in compiled languages functions can be executed out of order they appear in file)
HDV --> av1_qsv transcoded as referenced above on the newer i17-12700/DG2
??
you mean why default ffmpeg does not trip over this line?
it silently ignores interlace and makes something flagged as interlaced but actually not?
We can have a closer look at the av1_qsv output, possibly with loglevel verbose or debug on that WS, when I'm back again. I don't know what ffmpeg really does here, but as far it is accelerated (fps=561 for cfhd.mkv), viewable and playable, it will be good?
You may add deinterlace filter before encoder after apply this patch: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13372
cmd: ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 - hwaccel_output_format qsv -i input.mp4 -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null -
Thanks Fei
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
пт, 22 нояб. 2024 г., 20:37 Terje Hanssen <[email protected]>:
On 11/22/24 18:12, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 20:07 Terje Hanssen <[email protected]>:
On 11/22/24 17:58, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 19:55 Terje Hanssen <[email protected]>:
On 11/22/24 18:41, Andrew Randrianasulu wrote:
On Fri, Nov 22, 2024 at 2:52 PM Terje Hanssen <[email protected]> <[email protected]> wrote:
On 11/22/24 08:45, Andrew Randrianasulu wrote:
---------- Forwarded message --------- От: Wang, Fei W <[email protected]> <[email protected]> Date: пт, 22 нояб. 2024 г., 09:10 Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT To: [email protected] <[email protected]> <[email protected]>
On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote:
Hello.
Recently I teached cinelerra-gg to use qsv encoders in ffmpeg (libavcodec) and some test were working but some not.
We nailed it down to top-field first material, like HDV files. bff files like consumer version of DV and progressive worked fine.
I looked at source and ... I thought condition at http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852
must contain case for bff, but I tried this and it was reportedly not helping?
We currently set flags = ildct+ilme on interlaced streams, I hope to avoid special-casing qsv encoders, but may be we have no other choice?
I asked user (Terje) to add +ildct flag to his normal system ffmpeg line and it started to fail too: https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html
AV1 doesn't support interlaced frame.
We can dual check to transcode hdv to av1_qsv again, as I did with ffmpeg in this posthttps://www.mail-archive.com/[email protected]/msg08314.html
My issue now currently on Kaby Lake is that I have no hdv.m2t file stored and could not find a download link with example hdv. Suggestion?
https://archive.org/download/hdv01
Thanks, I downloaded FX1_01.mpg, which even its wrong file extension is a 1080i50 HDV recorded on a predecessor of my own Sony FX7-E camcorder.)
mediainfo FX1_01.mpg | egrep -i "scan|bit|format|FileExtension" Format : MPEG-TS Overall bit rate mode : Variable Overall bit rate : 26.1 Mb/s Maximum Overall bit rate : 33.0 Mb/s FileExtension_Invalid : ts m2t m2s m4t m4s tmf ts tp trp ty Format : MPEG Video Format version : Version 2 Format profile : Main@High 1440 Format settings : CustomMatrix / BVOP Format settings, BVOP : Yes Format settings, Matrix : Custom Format settings, GOP : M=3, N=12 Format settings, picture structure : Frame Bit rate mode : Constant Bit rate : 24.5 Mb/s Maximum bit rate : 25.0 Mb/s Bit depth : 8 bits Scan type : Interlaced Scan order : Top Field First Bits/(Pixel*Frame) : 0.629 Format : MPEG Audio Format version : Version 1 Format profile : Layer 2 Bit rate mode : Constant Bit rate : 384 kb/s Format : MPEG Video / MPEG Audio / /
But unhappily, the HDV --> av1_qsv transcoding I previous did on i17-12700/DG2 WS https://www.mail-archive.com/[email protected]/msg08314.html
HDV --> av1_qsv -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4
ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default)
is not possible on my legacy KBL i7-8550U Intel UHD Graphics 620
[av1_qsv @ 0x5641dd0f5440] This version of runtime doesn't support AV1 encoding
as confirmed by these limited capabilites
vainfo | grep -i enc libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSliceLP VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : VAEntrypointEncSliceLP VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointEncSlice
By the way, neither this attempt claims about unsupported or wrong image structure format !?
may be it not even come to this line and abort earlier? (in compiled languages functions can be executed out of order they appear in file)
HDV --> av1_qsv transcoded as referenced above on the newer i17-12700/DG2
??
you mean why default ffmpeg does not trip over this line?
it silently ignores interlace and makes something flagged as interlaced but actually not?
We can have a closer look at the av1_qsv output, possibly with loglevel verbose or debug on that WS, when I'm back again. I don't know what ffmpeg really does here, but as far it is accelerated (fps=561 for cfhd.mkv), viewable and playable, it will be good?
welll ..may be? If it works good enough for those goals may be you can just set cingg's format to progressive even if autodetect says interlaced, and try to render.
You may add deinterlace filter before encoder after apply this patch:https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13372
cmd: ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 - hwaccel_output_format qsv -i input.mp4 -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null -
Thanks Fei
_______________________________________________ ffmpeg-devel mailing [email protected]https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or [email protected] with subject "unsubscribe".
_______________________________________________ ffmpeg-devel mailing [email protected]https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or [email protected] with subject "unsubscribe".
On 11/22/24 18:54, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 20:37 Terje Hanssen <[email protected]>:
On 11/22/24 18:12, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 20:07 Terje Hanssen <[email protected]>:
On 11/22/24 17:58, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 19:55 Terje Hanssen <[email protected]>:
On 11/22/24 18:41, Andrew Randrianasulu wrote:
On Fri, Nov 22, 2024 at 2:52 PM Terje Hanssen<[email protected]> <mailto:[email protected]> wrote:
On 11/22/24 08:45, Andrew Randrianasulu wrote:
---------- Forwarded message --------- От: Wang, Fei W<[email protected]> <mailto:[email protected]> Date: пт, 22 нояб. 2024 г., 09:10 Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT To:[email protected] <[email protected]> <mailto:[email protected]>
On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote:
Hello.
Recently I teached cinelerra-gg to use qsv encoders in ffmpeg (libavcodec) and some test were working but some not.
We nailed it down to top-field first material, like HDV files. bff files like consumer version of DV and progressive worked fine.
I looked at source and ... I thought condition at
http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852
must contain case for bff, but I tried this and it was reportedly not helping?
We currently set flags = ildct+ilme on interlaced streams, I hope to avoid special-casing qsv encoders, but may be we have no other choice?
I asked user (Terje) to add +ildct flag to his normal system ffmpeg line and it started to fail too:
https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html
AV1 doesn't support interlaced frame.
I wonder if AV1 generic doesn't support interlaced input video, then neither AV1 software encoders like av1_svt should be able to do it. Or may this mean interlaced output?
We can dual check to transcode hdv to av1_qsv again, as I did with ffmpeg in this post https://www.mail-archive.com/[email protected]/msg08314.html
My issue now currently on Kaby Lake is that I have no hdv.m2t file stored and could not find a download link with example hdv. Suggestion?
Thanks, I downloaded FX1_01.mpg, which even its wrong file extension is a 1080i50 HDV recorded on a predecessor of my own Sony FX7-E camcorder.)
mediainfo FX1_01.mpg | egrep -i "scan|bit|format|FileExtension" Format : MPEG-TS Overall bit rate mode : Variable Overall bit rate : 26.1 Mb/s Maximum Overall bit rate : 33.0 Mb/s FileExtension_Invalid : ts m2t m2s m4t m4s tmf ts tp trp ty Format : MPEG Video Format version : Version 2 Format profile : Main@High 1440 Format settings : CustomMatrix / BVOP Format settings, BVOP : Yes Format settings, Matrix : Custom Format settings, GOP : M=3, N=12 Format settings, picture structure : Frame Bit rate mode : Constant Bit rate : 24.5 Mb/s Maximum bit rate : 25.0 Mb/s Bit depth : 8 bits Scan type : Interlaced Scan order : Top Field First Bits/(Pixel*Frame) : 0.629 Format : MPEG Audio Format version : Version 1 Format profile : Layer 2 Bit rate mode : Constant Bit rate : 384 kb/s Format : MPEG Video / MPEG Audio / /
But unhappily, the HDV --> av1_qsv transcoding I previous did on i17-12700/DG2 WS https://www.mail-archive.com/[email protected]/msg08314.html
HDV --> av1_qsv -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4
ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default)
is not possible on my legacy KBL i7-8550U Intel UHD Graphics 620
[av1_qsv @ 0x5641dd0f5440] This version of runtime doesn't support AV1 encoding
as confirmed by these limited capabilites
vainfo | grep -i enc libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSliceLP VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : VAEntrypointEncSliceLP VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointEncSlice
By the way, neither this attempt claims about unsupported or wrong image structure format !?
may be it not even come to this line and abort earlier? (in compiled languages functions can be executed out of order they appear in file)
HDV --> av1_qsv transcoded as referenced above on the newer i17-12700/DG2
??
you mean why default ffmpeg does not trip over this line?
it silently ignores interlace and makes something flagged as interlaced but actually not?
We can have a closer look at the av1_qsv output, possibly with loglevel verbose or debug on that WS, when I'm back again. I don't know what ffmpeg really does here, but as far it is accelerated (fps=561 for cfhd.mkv), viewable and playable, it will be good?
welll ..may be?
If it works good enough for those goals may be you can just set cingg's format to progressive even if autodetect says interlaced, and try to render.
I'll try that also.
You may add deinterlace filter before encoder after apply this patch: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13372
cmd: ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 - hwaccel_output_format qsv -i input.mp4 -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null -
Thanks Fei
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
сб, 23 нояб. 2024 г., 15:15 Terje Hanssen <[email protected]>:
On 11/22/24 18:54, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 20:37 Terje Hanssen <[email protected]>:
On 11/22/24 18:12, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 20:07 Terje Hanssen <[email protected]>:
On 11/22/24 17:58, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 19:55 Terje Hanssen <[email protected]>:
On 11/22/24 18:41, Andrew Randrianasulu wrote:
On Fri, Nov 22, 2024 at 2:52 PM Terje Hanssen <[email protected]> <[email protected]> wrote:
On 11/22/24 08:45, Andrew Randrianasulu wrote:
---------- Forwarded message --------- От: Wang, Fei W <[email protected]> <[email protected]> Date: пт, 22 нояб. 2024 г., 09:10 Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT To: [email protected] <[email protected]> <[email protected]>
On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote:
Hello.
Recently I teached cinelerra-gg to use qsv encoders in ffmpeg (libavcodec) and some test were working but some not.
We nailed it down to top-field first material, like HDV files. bff files like consumer version of DV and progressive worked fine.
I looked at source and ... I thought condition at http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852
must contain case for bff, but I tried this and it was reportedly not helping?
We currently set flags = ildct+ilme on interlaced streams, I hope to avoid special-casing qsv encoders, but may be we have no other choice?
I asked user (Terje) to add +ildct flag to his normal system ffmpeg line and it started to fail too: https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html
AV1 doesn't support interlaced frame.
I wonder if AV1 generic doesn't support interlaced input video, then neither AV1 software encoders like av1_svt should be able to do it. Or may this mean interlaced output?
*i think* specification allow it, just current hw implementation via qsv does not exist (yet?). You better ask some intel engineers about that.
We can dual check to transcode hdv to av1_qsv again, as I did with ffmpeg in this posthttps://www.mail-archive.com/[email protected]/msg08314.html
My issue now currently on Kaby Lake is that I have no hdv.m2t file stored and could not find a download link with example hdv. Suggestion?
https://archive.org/download/hdv01
Thanks, I downloaded FX1_01.mpg, which even its wrong file extension is a 1080i50 HDV recorded on a predecessor of my own Sony FX7-E camcorder.)
mediainfo FX1_01.mpg | egrep -i "scan|bit|format|FileExtension" Format : MPEG-TS Overall bit rate mode : Variable Overall bit rate : 26.1 Mb/s Maximum Overall bit rate : 33.0 Mb/s FileExtension_Invalid : ts m2t m2s m4t m4s tmf ts tp trp ty Format : MPEG Video Format version : Version 2 Format profile : Main@High 1440 Format settings : CustomMatrix / BVOP Format settings, BVOP : Yes Format settings, Matrix : Custom Format settings, GOP : M=3, N=12 Format settings, picture structure : Frame Bit rate mode : Constant Bit rate : 24.5 Mb/s Maximum bit rate : 25.0 Mb/s Bit depth : 8 bits Scan type : Interlaced Scan order : Top Field First Bits/(Pixel*Frame) : 0.629 Format : MPEG Audio Format version : Version 1 Format profile : Layer 2 Bit rate mode : Constant Bit rate : 384 kb/s Format : MPEG Video / MPEG Audio / /
But unhappily, the HDV --> av1_qsv transcoding I previous did on i17-12700/DG2 WS https://www.mail-archive.com/[email protected]/msg08314.html
HDV --> av1_qsv -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4
ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default)
is not possible on my legacy KBL i7-8550U Intel UHD Graphics 620
[av1_qsv @ 0x5641dd0f5440] This version of runtime doesn't support AV1 encoding
as confirmed by these limited capabilites
vainfo | grep -i enc libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSliceLP VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : VAEntrypointEncSliceLP VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointEncSlice
By the way, neither this attempt claims about unsupported or wrong image structure format !?
may be it not even come to this line and abort earlier? (in compiled languages functions can be executed out of order they appear in file)
HDV --> av1_qsv transcoded as referenced above on the newer i17-12700/DG2
??
you mean why default ffmpeg does not trip over this line?
it silently ignores interlace and makes something flagged as interlaced but actually not?
We can have a closer look at the av1_qsv output, possibly with loglevel verbose or debug on that WS, when I'm back again. I don't know what ffmpeg really does here, but as far it is accelerated (fps=561 for cfhd.mkv), viewable and playable, it will be good?
welll ..may be?
If it works good enough for those goals may be you can just set cingg's format to progressive even if autodetect says interlaced, and try to render.
I'll try that also.
You may add deinterlace filter before encoder after apply this patch:https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13372
cmd: ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 - hwaccel_output_format qsv -i input.mp4 -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null -
Thanks Fei
_______________________________________________ ffmpeg-devel mailing [email protected]https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or [email protected] with subject "unsubscribe".
_______________________________________________ ffmpeg-devel mailing [email protected]https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or [email protected] with subject "unsubscribe".
Den 23.11.2024 13:24, skrev Andrew Randrianasulu:
сб, 23 нояб. 2024 г., 15:15 Terje Hanssen <[email protected]>:
On 11/22/24 18:54, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 20:37 Terje Hanssen <[email protected]>:
On 11/22/24 18:12, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 20:07 Terje Hanssen <[email protected]>:
On 11/22/24 17:58, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 19:55 Terje Hanssen <[email protected]>:
On 11/22/24 18:41, Andrew Randrianasulu wrote:
On Fri, Nov 22, 2024 at 2:52 PM Terje Hanssen<[email protected]> <mailto:[email protected]> wrote:
On 11/22/24 08:45, Andrew Randrianasulu wrote:
---------- Forwarded message --------- От: Wang, Fei W<[email protected]> <mailto:[email protected]> Date: пт, 22 нояб. 2024 г., 09:10 Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT To:[email protected] <[email protected]> <mailto:[email protected]>
On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote: > Hello. > > > Recently I teached cinelerra-gg to use qsv encoders in ffmpeg > (libavcodec) > and some test were working but some not. > > We nailed it down to top-field first material, like HDV files. bff > files > like consumer version of DV and progressive worked fine. > > I looked at source and ... I thought condition at > > http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852 > > > must contain case for bff, but I tried this and it was reportedly not > helping? > > > We currently set flags = ildct+ilme on interlaced streams, I hope to > avoid > special-casing qsv encoders, but may be we have no other choice? > > I asked user (Terje) to add +ildct flag to his normal system ffmpeg > line > and it started to fail too: > > https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html AV1 doesn't support interlaced frame.
Tried also the cmd as suggested from Fei Wang: ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -hwaccel_output_format qsv -i hdv09_04.m2t -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null - libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 [mpeg2video @ 0x55908d205300] Invalid frame dimensions 0x0. Last message repeated 3 times [mpegts @ 0x55908d1aa480] PES packet size mismatch [mpegts @ 0x55908d1aa480] Packet corrupt (stream = 1, dts = 258142320). [mpegts @ 0x55908d1aa480] Could not find codec parameters for stream 2 (Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options [mpegts @ 0x55908d1aa480] Could not find codec parameters for stream 3 (Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, mpegts, from 'hdv09_04.m2t': Duration: 00:03:59.06, start: 2629.496000, bitrate: 26110 kb/s Program 100 Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 25000 kb/s, 25 fps, 25 tbr, 90k tbn Side data: cpb: bitrate max/min/avg: 25000000/0/0 buffer size: 7340032 vbv_delay: N/A Stream #0:1[0x814]: Audio: mp2 (mp3float) ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 384 kb/s Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0) Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1) Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (native) -> av1 (av1_qsv)) Stream #0:1 -> #0:1 (mp2 (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help [av1_qsv @ 0x55908d2dd280] Using the constant quantization parameter (CQP) by default. Please use the global_quality option and other options for a quality-based mode or the b option and other options for a bitrate-based mode if the default is not the desired choice. Output #0, null, to 'pipe:': Metadata: encoder : Lavf61.7.100 Stream #0:0: Video: av1, nv12(tv, bt709, top coded first (swapped)), 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 25 fps, 25 tbn Metadata: encoder : Lavc61.19.100 av1_qsv Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Metadata: encoder : Lavc61.19.100 pcm_s16le [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 167 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 183 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 194 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 196 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 198 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 199 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 208 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 199 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 207 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 220 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 199 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 207 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 202 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 207 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 205 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 182 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 202 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 183 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 194 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 208 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 202 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 191 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 187 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 190 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 212 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 220 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 200 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 197 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 204 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 125 times [mpegts @ 0x55908d1aa480] PES packet size mismatch [mpegts @ 0x55908d1aa480] Packet corrupt (stream = 1, dts = 258142320). [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 8 times [mpeg2video @ 0x55908d232400] ac-tex damaged at 10 61 [mpeg2video @ 0x55908d232400] Warning MVs not available [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 [mpeg2video @ 0x55908d232400] concealing 630 DC, 630 AC, 630 MV errors in P frame [vist#0:0/mpeg2video @ 0x55908d354b40] [dec:mpeg2video @ 0x55908d320d00] corrupt decoded frame [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 33 times [out#0/null @ 0x55908d261140] video:45168KiB audio:44770KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown frame= 5963 fps=399 q=-0.0 Lsize=N/A time=-1563749870:36:53.12 bitrate=N/A speed=N/A
I wonder if AV1 generic doesn't support interlaced input video, then neither AV1 software encoders like av1_svt should be able to do it. Or may this mean interlaced output?
*i think* specification allow it, just current hw implementation via qsv does not exist (yet?).
You better ask some intel engineers about that.
............snip
But unhappily, the HDV --> av1_qsv transcoding I previous did on i17-12700/DG2 WS https://www.mail-archive.com/[email protected]/msg08314.html
HDV --> av1_qsv -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4
ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default)
is not possible on my legacy KBL i7-8550U Intel UHD Graphics 620
[av1_qsv @ 0x5641dd0f5440] This version of runtime doesn't support AV1 encoding
.........................snip
By the way, neither this attempt claims about unsupported or wrong image structure format !?
may be it not even come to this line and abort earlier? (in compiled languages functions can be executed out of order they appear in file)
HDV --> av1_qsv transcoded as referenced above on the newer i17-12700/DG2
??
you mean why default ffmpeg does not trip over this line?
it silently ignores interlace and makes something flagged as interlaced but actually not?
We can have a closer look at the av1_qsv output, possibly with loglevel verbose or debug on that WS, when I'm back again. I don't know what ffmpeg really does here, but as far it is accelerated (fps=561 for cfhd.mkv), viewable and playable, it will be good?
welll ..may be?
Tried my own tff 1080i50 HDV input with FFmpeg on i7-12700/DG2 again and got No av1_qsv errors: HDV --> av1_qsv nv12 -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4 frame= 5963 fps=561 q=-0.0 Lsize= 234099KiB time=00:03:58.77 bitrate=8031.5kbits/s speed=22.5x ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default) mediainfo hdv09_04_av1_qsv_format_nv12_gq25.mp4 | egrep -i "scan|bit|format" Complete name : hdv09_04_av1_qsv_format_nv12_gq25.mp4 Format : MPEG-4 Format profile : Base Media Overall bit rate : 8 021 kb/s Format : AV1 Format/Info : AOMedia Video 1 Format profile : [email protected] Bit rate : 7 903 kb/s Bit depth : 8 bits Scan type : Interlaced Scan type, store method : Interleaved fields Scan order : Top Field First Bits/(Pixel*Frame) : 0.203 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Bit rate mode : Constant Bit rate : 132 kb/s Also FHD --> av1_qsv with p010le works
If it works good enough for those goals may be you can just set cingg's format to progressive even if autodetect says interlaced, and try to render.
I'll try that also.
I can't notice differences at playback with VLC and FFplay (other than 16:9 vs 4:3 format as usual). And both visually with good qualities in my eyes. Cingg Set Format Interlace Mode: Not interlaced did the trick and both hdv and hd could be rendered FFprobe reported it is pgogressiv, while native FFmpeg transcoding still say interlaced. HDV --> av1_qsv av1_qsv_8b420.mp4 mp4 av1_qsv # av1_qsv_8b420 cin_pix_fmt=nv12 profile=main # global_quality=25 ** rendered 5972 frames in 10.026 secs, 595.651 fps ---------- ffprobe -hide_banner hdv09_04_av1_qsv.mp4 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hdv09_04_av1_qsv.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomav01iso2mp41 encoder : Lavf61.1.100 Duration: 00:03:58.88, start: 0.000000, bitrate: 1533 kb/s Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709/unknown/unknown, progressive), 1440x1080, 1532 kb/s, SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 12800 tbn (default) ===================== FHD --> av1_qsv av1_qsv_10b420.mp4 mp4 av1_qsv # av1_qsv_10b420 cin_pix_fmt=p010le profile=main # global_quality=25 ** rendered 1780 frames in 42.035 secs, 42.346 fps ------------------- ffprobe -hide_banner hd01_av1_qsv.mp4 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hd01_av1_qsv.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomav01iso2mp41 encoder : Lavf61.1.100 Duration: 00:01:11.20, start: 0.000000, bitrate: 1070 kb/s Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p10le(tv, bt709/unknown/unknown, progressive), 1920x1080, 1070 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 12800 tbn (default)
вс, 24 нояб. 2024 г., 19:45 Terje J. Hanssen <[email protected]>:
Den 23.11.2024 13:24, skrev Andrew Randrianasulu:
сб, 23 нояб. 2024 г., 15:15 Terje Hanssen <[email protected]>:
On 11/22/24 18:54, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 20:37 Terje Hanssen <[email protected]>:
On 11/22/24 18:12, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 20:07 Terje Hanssen <[email protected]>:
On 11/22/24 17:58, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 19:55 Terje Hanssen <[email protected]>:
On 11/22/24 18:41, Andrew Randrianasulu wrote:
On Fri, Nov 22, 2024 at 2:52 PM Terje Hanssen <[email protected]> <[email protected]> wrote:
On 11/22/24 08:45, Andrew Randrianasulu wrote:
---------- Forwarded message --------- От: Wang, Fei W <[email protected]> <[email protected]> Date: пт, 22 нояб. 2024 г., 09:10 Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT To: [email protected] <[email protected]> <[email protected]>
On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote:
Hello.
Recently I teached cinelerra-gg to use qsv encoders in ffmpeg (libavcodec) and some test were working but some not.
We nailed it down to top-field first material, like HDV files. bff files like consumer version of DV and progressive worked fine.
I looked at source and ... I thought condition at http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852
must contain case for bff, but I tried this and it was reportedly not helping?
We currently set flags = ildct+ilme on interlaced streams, I hope to avoid special-casing qsv encoders, but may be we have no other choice?
I asked user (Terje) to add +ildct flag to his normal system ffmpeg line and it started to fail too: https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html
AV1 doesn't support interlaced frame.
Tried also the cmd as suggested from Fei Wang:
ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -hwaccel_output_format qsv -i hdv09_04.m2t -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null - libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 [mpeg2video @ 0x55908d205300] Invalid frame dimensions 0x0. Last message repeated 3 times [mpegts @ 0x55908d1aa480] PES packet size mismatch [mpegts @ 0x55908d1aa480] Packet corrupt (stream = 1, dts = 258142320). [mpegts @ 0x55908d1aa480] Could not find codec parameters for stream 2 (Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options [mpegts @ 0x55908d1aa480] Could not find codec parameters for stream 3 (Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, mpegts, from 'hdv09_04.m2t': Duration: 00:03:59.06, start: 2629.496000, bitrate: 26110 kb/s Program 100 Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 25000 kb/s, 25 fps, 25 tbr, 90k tbn Side data: cpb: bitrate max/min/avg: 25000000/0/0 buffer size: 7340032 vbv_delay: N/A Stream #0:1[0x814]: Audio: mp2 (mp3float) ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 384 kb/s Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0) Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1) Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (native) -> av1 (av1_qsv)) Stream #0:1 -> #0:1 (mp2 (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help [av1_qsv @ 0x55908d2dd280] Using the constant quantization parameter (CQP) by default. Please use the global_quality option and other options for a quality-based mode or the b option and other options for a bitrate-based mode if the default is not the desired choice. Output #0, null, to 'pipe:': Metadata: encoder : Lavf61.7.100 Stream #0:0: Video: av1, nv12(tv, bt709, top coded first (swapped)), 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 25 fps, 25 tbn Metadata: encoder : Lavc61.19.100 av1_qsv Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Metadata: encoder : Lavc61.19.100 pcm_s16le [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 167 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 183 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 194 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 196 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 198 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 199 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 208 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 199 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 207 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 220 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 199 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 207 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 202 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 207 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 205 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 182 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 202 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 183 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 194 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 208 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 202 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 191 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 187 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 190 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 212 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 220 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 200 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 197 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 204 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 125 times [mpegts @ 0x55908d1aa480] PES packet size mismatch [mpegts @ 0x55908d1aa480] Packet corrupt (stream = 1, dts = 258142320). [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 8 times [mpeg2video @ 0x55908d232400] ac-tex damaged at 10 61 [mpeg2video @ 0x55908d232400] Warning MVs not available [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 [mpeg2video @ 0x55908d232400] concealing 630 DC, 630 AC, 630 MV errors in P frame [vist#0:0/mpeg2video @ 0x55908d354b40] [dec:mpeg2video @ 0x55908d320d00] corrupt decoded frame [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 33 times [out#0/null @ 0x55908d261140] video:45168KiB audio:44770KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown frame= 5963 fps=399 q=-0.0 Lsize=N/A time=-1563749870:36:53.12 bitrate=N/A speed=N/A
I wonder if AV1 generic doesn't support interlaced input video, then neither AV1 software encoders like av1_svt should be able to do it. Or may this mean interlaced output?
*i think* specification allow it, just current hw implementation via qsv does not exist (yet?).
You better ask some intel engineers about that.
............snip
But unhappily, the HDV --> av1_qsv transcoding I previous did on i17-12700/DG2 WS https://www.mail-archive.com/[email protected]/msg08314.html
HDV --> av1_qsv -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4
ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default)
is not possible on my legacy KBL i7-8550U Intel UHD Graphics 620
[av1_qsv @ 0x5641dd0f5440] This version of runtime doesn't support AV1 encoding
.........................snip
By the way, neither this attempt claims about unsupported or wrong image structure format !?
may be it not even come to this line and abort earlier? (in compiled languages functions can be executed out of order they appear in file)
HDV --> av1_qsv transcoded as referenced above on the newer i17-12700/DG2
??
you mean why default ffmpeg does not trip over this line?
it silently ignores interlace and makes something flagged as interlaced but actually not?
We can have a closer look at the av1_qsv output, possibly with loglevel verbose or debug on that WS, when I'm back again. I don't know what ffmpeg really does here, but as far it is accelerated (fps=561 for cfhd.mkv), viewable and playable, it will be good?
welll ..may be?
Tried my own tff 1080i50 HDV input with FFmpeg on i7-12700/DG2 again and got No av1_qsv errors:
HDV --> av1_qsv nv12 -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4 frame= 5963 fps=561 q=-0.0 Lsize= 234099KiB time=00:03:58.77 bitrate=8031.5kbits/s speed=22.5x
ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default)
mediainfo hdv09_04_av1_qsv_format_nv12_gq25.mp4 | egrep -i "scan|bit|format" Complete name : hdv09_04_av1_qsv_format_nv12_gq25.mp4 Format : MPEG-4 Format profile : Base Media Overall bit rate : 8 021 kb/s Format : AV1 Format/Info : AOMedia Video 1 Format profile : [email protected] Bit rate : 7 903 kb/s Bit depth : 8 bits Scan type : Interlaced Scan type, store method : Interleaved fields Scan order : Top Field First Bits/(Pixel*Frame) : 0.203 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Bit rate mode : Constant Bit rate : 132 kb/s
Also FHD --> av1_qsv with p010le works
If it works good enough for those goals may be you can just set cingg's format to progressive even if autodetect says interlaced, and try to render.
I'll try that also.
I can't notice differences at playback with VLC and FFplay (other than 16:9 vs 4:3 format as usual). And both visually with good qualities in my eyes.
Cingg Set Format Interlace Mode: Not interlaced did the trick and both hdv and hd could be rendered FFprobe reported it is pgogressiv, while native FFmpeg transcoding still say interlaced.
But do files rendered by cingg set to progressive and ffmpeg from same tff source differ visually?
HDV --> av1_qsv
av1_qsv_8b420.mp4 mp4 av1_qsv # av1_qsv_8b420 cin_pix_fmt=nv12 profile=main # global_quality=25
** rendered 5972 frames in 10.026 secs, 595.651 fps
----------
ffprobe -hide_banner hdv09_04_av1_qsv.mp4 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hdv09_04_av1_qsv.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomav01iso2mp41 encoder : Lavf61.1.100 Duration: 00:03:58.88, start: 0.000000, bitrate: 1533 kb/s Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709/unknown/unknown, progressive), 1440x1080, 1532 kb/s, SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 12800 tbn (default)
=====================
FHD --> av1_qsv
av1_qsv_10b420.mp4 mp4 av1_qsv # av1_qsv_10b420 cin_pix_fmt=p010le profile=main # global_quality=25
** rendered 1780 frames in 42.035 secs, 42.346 fps
-------------------
ffprobe -hide_banner hd01_av1_qsv.mp4 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hd01_av1_qsv.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomav01iso2mp41 encoder : Lavf61.1.100 Duration: 00:01:11.20, start: 0.000000, bitrate: 1070 kb/s Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p10le(tv, bt709/unknown/unknown, progressive), 1920x1080, 1070 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 12800 tbn (default)
Den 24.11.2024 22:22, skrev Andrew Randrianasulu:
вс, 24 нояб. 2024 г., 19:45 Terje J. Hanssen <[email protected]>:
Den 23.11.2024 13:24, skrev Andrew Randrianasulu:
сб, 23 нояб. 2024 г., 15:15 Terje Hanssen <[email protected]>:
On 11/22/24 18:54, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 20:37 Terje Hanssen <[email protected]>:
On 11/22/24 18:12, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 20:07 Terje Hanssen <[email protected]>:
On 11/22/24 17:58, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 19:55 Terje Hanssen <[email protected]>:
On 11/22/24 18:41, Andrew Randrianasulu wrote:
On Fri, Nov 22, 2024 at 2:52 PM Terje Hanssen<[email protected]> <mailto:[email protected]> wrote: > On 11/22/24 08:45, Andrew Randrianasulu wrote: > > > > ---------- Forwarded message --------- > От: Wang, Fei W<[email protected]> <mailto:[email protected]> > Date: пт, 22 нояб. 2024 г., 09:10 > Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT > To:[email protected] <[email protected]> <mailto:[email protected]> > > > On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote: >> Hello. >> >> >> Recently I teached cinelerra-gg to use qsv encoders in ffmpeg >> (libavcodec) >> and some test were working but some not. >> >> We nailed it down to top-field first material, like HDV files. bff >> files >> like consumer version of DV and progressive worked fine. >> >> I looked at source and ... I thought condition at >> >> http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852 >> >> >> must contain case for bff, but I tried this and it was reportedly not >> helping? >> >> >> We currently set flags = ildct+ilme on interlaced streams, I hope to >> avoid >> special-casing qsv encoders, but may be we have no other choice? >> >> I asked user (Terje) to add +ildct flag to his normal system ffmpeg >> line >> and it started to fail too: >> >> https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html > AV1 doesn't support interlaced frame.
Tried also the cmd as suggested from Fei Wang:
ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -hwaccel_output_format qsv -i hdv09_04.m2t -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null - libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 [mpeg2video @ 0x55908d205300] Invalid frame dimensions 0x0. Last message repeated 3 times [mpegts @ 0x55908d1aa480] PES packet size mismatch [mpegts @ 0x55908d1aa480] Packet corrupt (stream = 1, dts = 258142320). [mpegts @ 0x55908d1aa480] Could not find codec parameters for stream 2 (Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options [mpegts @ 0x55908d1aa480] Could not find codec parameters for stream 3 (Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, mpegts, from 'hdv09_04.m2t': Duration: 00:03:59.06, start: 2629.496000, bitrate: 26110 kb/s Program 100 Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 25000 kb/s, 25 fps, 25 tbr, 90k tbn Side data: cpb: bitrate max/min/avg: 25000000/0/0 buffer size: 7340032 vbv_delay: N/A Stream #0:1[0x814]: Audio: mp2 (mp3float) ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 384 kb/s Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0) Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1) Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (native) -> av1 (av1_qsv)) Stream #0:1 -> #0:1 (mp2 (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help [av1_qsv @ 0x55908d2dd280] Using the constant quantization parameter (CQP) by default. Please use the global_quality option and other options for a quality-based mode or the b option and other options for a bitrate-based mode if the default is not the desired choice. Output #0, null, to 'pipe:': Metadata: encoder : Lavf61.7.100 Stream #0:0: Video: av1, nv12(tv, bt709, top coded first (swapped)), 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 25 fps, 25 tbn Metadata: encoder : Lavc61.19.100 av1_qsv Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Metadata: encoder : Lavc61.19.100 pcm_s16le [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 167 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 183 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 194 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 196 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 198 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 199 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 208 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 199 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 207 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 220 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 199 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 207 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 202 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 207 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 205 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 182 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 202 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 183 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 194 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 208 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 202 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 191 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 187 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 190 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 212 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 220 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 200 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 197 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 204 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 125 times [mpegts @ 0x55908d1aa480] PES packet size mismatch [mpegts @ 0x55908d1aa480] Packet corrupt (stream = 1, dts = 258142320). [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 8 times [mpeg2video @ 0x55908d232400] ac-tex damaged at 10 61 [mpeg2video @ 0x55908d232400] Warning MVs not available [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 [mpeg2video @ 0x55908d232400] concealing 630 DC, 630 AC, 630 MV errors in P frame [vist#0:0/mpeg2video @ 0x55908d354b40] [dec:mpeg2video @ 0x55908d320d00] corrupt decoded frame [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 33 times [out#0/null @ 0x55908d261140] video:45168KiB audio:44770KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown frame= 5963 fps=399 q=-0.0 Lsize=N/A time=-1563749870:36:53.12 bitrate=N/A speed=N/A
I wonder if AV1 generic doesn't support interlaced input video, then neither AV1 software encoders like av1_svt should be able to do it. Or may this mean interlaced output?
*i think* specification allow it, just current hw implementation via qsv does not exist (yet?).
You better ask some intel engineers about that.
............snip
But unhappily, the HDV --> av1_qsv transcoding I previous did on i17-12700/DG2 WS https://www.mail-archive.com/[email protected]/msg08314.html
HDV --> av1_qsv -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4
ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default)
is not possible on my legacy KBL i7-8550U Intel UHD Graphics 620
[av1_qsv @ 0x5641dd0f5440] This version of runtime doesn't support AV1 encoding
.........................snip
By the way, neither this attempt claims about unsupported or wrong image structure format !?
may be it not even come to this line and abort earlier? (in compiled languages functions can be executed out of order they appear in file)
HDV --> av1_qsv transcoded as referenced above on the newer i17-12700/DG2
??
you mean why default ffmpeg does not trip over this line?
it silently ignores interlace and makes something flagged as interlaced but actually not?
We can have a closer look at the av1_qsv output, possibly with loglevel verbose or debug on that WS, when I'm back again. I don't know what ffmpeg really does here, but as far it is accelerated (fps=561 for cfhd.mkv), viewable and playable, it will be good?
welll ..may be?
Tried my own tff 1080i50 HDV input with FFmpeg on i7-12700/DG2 again and got No av1_qsv errors:
HDV --> av1_qsv nv12 -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4 frame= 5963 fps=561 q=-0.0 Lsize= 234099KiB time=00:03:58.77 bitrate=8031.5kbits/s speed=22.5x
ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default)
mediainfo hdv09_04_av1_qsv_format_nv12_gq25.mp4 | egrep -i "scan|bit|format" Complete name : hdv09_04_av1_qsv_format_nv12_gq25.mp4 Format : MPEG-4 Format profile : Base Media Overall bit rate : 8 021 kb/s Format : AV1 Format/Info : AOMedia Video 1 Format profile : [email protected] Bit rate : 7 903 kb/s Bit depth : 8 bits Scan type : Interlaced Scan type, store method : Interleaved fields Scan order : Top Field First Bits/(Pixel*Frame) : 0.203 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Bit rate mode : Constant Bit rate : 132 kb/s
Also FHD --> av1_qsv with p010le works
If it works good enough for those goals may be you can just set cingg's format to progressive even if autodetect says interlaced, and try to render.
I'll try that also.
I can't notice differences at playback with VLC and FFplay (other than 16:9 vs 4:3 format as usual). And both visually with good qualities in my eyes.
Cingg Set Format Interlace Mode: Not interlaced did the trick and both hdv and hd could be rendered FFprobe reported it is pgogressiv, while native FFmpeg transcoding still say interlaced.
But do files rendered by cingg set to progressive and ffmpeg from same tff source differ visually?
No. It is easy to see during VLC playback that neither av1_qsv from Cin/ffmpeg is progressive, but rather interlaced: Pause during horizontal movements (camcorder panning) shows interlaced vertical edges. Then shortcut "D" on this still image swithch it to deinterlaced and smoother edges. This is on a computer LCD monitor. I rendered also with global_quality=25 (switched on in Cingg preset), which then gives higher bitrate and quality comparable with the output from the native ffmpeg 7.1.
HDV --> av1_qsv
av1_qsv_8b420.mp4 mp4 av1_qsv # av1_qsv_8b420 cin_pix_fmt=nv12 profile=main # global_quality=25
** rendered 5972 frames in 10.026 secs, 595.651 fps
----------
ffprobe -hide_banner hdv09_04_av1_qsv.mp4 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hdv09_04_av1_qsv.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomav01iso2mp41 encoder : Lavf61.1.100 Duration: 00:03:58.88, start: 0.000000, bitrate: 1533 kb/s Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709/unknown/unknown, progressive), 1440x1080, 1532 kb/s, SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 12800 tbn (default)
=====================
FHD --> av1_qsv
av1_qsv_10b420.mp4 mp4 av1_qsv # av1_qsv_10b420 cin_pix_fmt=p010le profile=main # global_quality=25
** rendered 1780 frames in 42.035 secs, 42.346 fps
-------------------
ffprobe -hide_banner hd01_av1_qsv.mp4 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hd01_av1_qsv.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomav01iso2mp41 encoder : Lavf61.1.100 Duration: 00:01:11.20, start: 0.000000, bitrate: 1070 kb/s Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p10le(tv, bt709/unknown/unknown, progressive), 1920x1080, 1070 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 12800 tbn (default)
пн, 25 нояб. 2024 г., 01:11 Terje J. Hanssen <[email protected]>:
Den 24.11.2024 22:22, skrev Andrew Randrianasulu:
вс, 24 нояб. 2024 г., 19:45 Terje J. Hanssen <[email protected]>:
Den 23.11.2024 13:24, skrev Andrew Randrianasulu:
сб, 23 нояб. 2024 г., 15:15 Terje Hanssen <[email protected]>:
On 11/22/24 18:54, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 20:37 Terje Hanssen <[email protected]>:
On 11/22/24 18:12, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 20:07 Terje Hanssen <[email protected]>:
On 11/22/24 17:58, Andrew Randrianasulu wrote:
пт, 22 нояб. 2024 г., 19:55 Terje Hanssen <[email protected]>:
On 11/22/24 18:41, Andrew Randrianasulu wrote:
On Fri, Nov 22, 2024 at 2:52 PM Terje Hanssen <[email protected]> <[email protected]> wrote:
On 11/22/24 08:45, Andrew Randrianasulu wrote:
---------- Forwarded message --------- От: Wang, Fei W <[email protected]> <[email protected]> Date: пт, 22 нояб. 2024 г., 09:10 Subject: Re: [FFmpeg-devel] qsvenc.c & AV_CODEC_FLAG_INTERLACED_DCT To: [email protected] <[email protected]> <[email protected]>
On Thu, 2024-11-21 at 11:50 +0300, Andrew Randrianasulu wrote:
Hello.
Recently I teached cinelerra-gg to use qsv encoders in ffmpeg (libavcodec) and some test were working but some not.
We nailed it down to top-field first material, like HDV files. bff files like consumer version of DV and progressive worked fine.
I looked at source and ... I thought condition at http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc.c#l852
must contain case for bff, but I tried this and it was reportedly not helping?
We currently set flags = ildct+ilme on interlaced streams, I hope to avoid special-casing qsv encoders, but may be we have no other choice?
I asked user (Terje) to add +ildct flag to his normal system ffmpeg line and it started to fail too: https://lists.cinelerra-gg.org/pipermail/cin/2024-November/009123.html
AV1 doesn't support interlaced frame.
Tried also the cmd as suggested from Fei Wang:
ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -hwaccel_output_format qsv -i hdv09_04.m2t -pix_fmt nv12 -vf vpp_qsv=deinterlace=advanced -c:v av1_qsv -f null - libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_22 libva info: va_openDriver() returns 0 [mpeg2video @ 0x55908d205300] Invalid frame dimensions 0x0. Last message repeated 3 times [mpegts @ 0x55908d1aa480] PES packet size mismatch [mpegts @ 0x55908d1aa480] Packet corrupt (stream = 1, dts = 258142320). [mpegts @ 0x55908d1aa480] Could not find codec parameters for stream 2 (Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options [mpegts @ 0x55908d1aa480] Could not find codec parameters for stream 3 (Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, mpegts, from 'hdv09_04.m2t': Duration: 00:03:59.06, start: 2629.496000, bitrate: 26110 kb/s Program 100 Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 25000 kb/s, 25 fps, 25 tbr, 90k tbn Side data: cpb: bitrate max/min/avg: 25000000/0/0 buffer size: 7340032 vbv_delay: N/A Stream #0:1[0x814]: Audio: mp2 (mp3float) ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 384 kb/s Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0) Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1) Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (native) -> av1 (av1_qsv)) Stream #0:1 -> #0:1 (mp2 (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help [av1_qsv @ 0x55908d2dd280] Using the constant quantization parameter (CQP) by default. Please use the global_quality option and other options for a quality-based mode or the b option and other options for a bitrate-based mode if the default is not the desired choice. Output #0, null, to 'pipe:': Metadata: encoder : Lavf61.7.100 Stream #0:0: Video: av1, nv12(tv, bt709, top coded first (swapped)), 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 25 fps, 25 tbn Metadata: encoder : Lavc61.19.100 av1_qsv Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Metadata: encoder : Lavc61.19.100 pcm_s16le [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 167 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 183 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 194 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 196 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 198 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 199 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 208 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 199 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 207 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 220 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 199 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 207 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 202 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 207 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 205 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 182 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 202 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 183 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 194 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 208 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 202 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 191 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 187 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 190 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 212 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 220 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 200 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 197 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 204 times [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 125 times [mpegts @ 0x55908d1aa480] PES packet size mismatch [mpegts @ 0x55908d1aa480] Packet corrupt (stream = 1, dts = 258142320). [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 8 times [mpeg2video @ 0x55908d232400] ac-tex damaged at 10 61 [mpeg2video @ 0x55908d232400] Warning MVs not available [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 [mpeg2video @ 0x55908d232400] concealing 630 DC, 630 AC, 630 MV errors in P frame [vist#0:0/mpeg2video @ 0x55908d354b40] [dec:mpeg2video @ 0x55908d320d00] corrupt decoded frame [null @ 0x55908d355c00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: -140737488355328 >= -140737488355328 Last message repeated 33 times [out#0/null @ 0x55908d261140] video:45168KiB audio:44770KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown frame= 5963 fps=399 q=-0.0 Lsize=N/A time=-1563749870:36:53.12 bitrate=N/A speed=N/A
I wonder if AV1 generic doesn't support interlaced input video, then neither AV1 software encoders like av1_svt should be able to do it. Or may this mean interlaced output?
*i think* specification allow it, just current hw implementation via qsv does not exist (yet?).
You better ask some intel engineers about that.
............snip
But unhappily, the HDV --> av1_qsv transcoding I previous did on i17-12700/DG2 WS https://www.mail-archive.com/[email protected]/msg08314.html
HDV --> av1_qsv -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4
ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default)
is not possible on my legacy KBL i7-8550U Intel UHD Graphics 620
[av1_qsv @ 0x5641dd0f5440] This version of runtime doesn't support AV1 encoding
.........................snip
By the way, neither this attempt claims about unsupported or wrong image structure format !?
may be it not even come to this line and abort earlier? (in compiled languages functions can be executed out of order they appear in file)
HDV --> av1_qsv transcoded as referenced above on the newer i17-12700/DG2
??
you mean why default ffmpeg does not trip over this line?
it silently ignores interlace and makes something flagged as interlaced but actually not?
We can have a closer look at the av1_qsv output, possibly with loglevel verbose or debug on that WS, when I'm back again. I don't know what ffmpeg really does here, but as far it is accelerated (fps=561 for cfhd.mkv), viewable and playable, it will be good?
welll ..may be?
Tried my own tff 1080i50 HDV input with FFmpeg on i7-12700/DG2 again and got No av1_qsv errors:
HDV --> av1_qsv nv12 -global_quality 25 ----------------------------------- ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv -global_quality 25 hdv09_04_av1_qsv_format_nv12_gq25.mp4 frame= 5963 fps=561 q=-0.0 Lsize= 234099KiB time=00:03:58.77 bitrate=8031.5kbits/s speed=22.5x
ffprobe -hide_banner hdv09_04_av1_qsv_format_nv12_gq25.mp4 Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080, 7902 kb/s, SAR 4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800 tbn (default)
mediainfo hdv09_04_av1_qsv_format_nv12_gq25.mp4 | egrep -i "scan|bit|format" Complete name : hdv09_04_av1_qsv_format_nv12_gq25.mp4 Format : MPEG-4 Format profile : Base Media Overall bit rate : 8 021 kb/s Format : AV1 Format/Info : AOMedia Video 1 Format profile : [email protected] Bit rate : 7 903 kb/s Bit depth : 8 bits Scan type : Interlaced Scan type, store method : Interleaved fields Scan order : Top Field First Bits/(Pixel*Frame) : 0.203 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Bit rate mode : Constant Bit rate : 132 kb/s
Also FHD --> av1_qsv with p010le works
If it works good enough for those goals may be you can just set cingg's format to progressive even if autodetect says interlaced, and try to render.
I'll try that also.
I can't notice differences at playback with VLC and FFplay (other than 16:9 vs 4:3 format as usual). And both visually with good qualities in my eyes.
Cingg Set Format Interlace Mode: Not interlaced did the trick and both hdv and hd could be rendered FFprobe reported it is pgogressiv, while native FFmpeg transcoding still say interlaced.
But do files rendered by cingg set to progressive and ffmpeg from same tff source differ visually?
No. It is easy to see during VLC playback that neither av1_qsv from Cin/ffmpeg is progressive, but rather interlaced: Pause during horizontal movements (camcorder panning) shows interlaced vertical edges. Then shortcut "D" on this still image swithch it to deinterlaced and smoother edges. This is on a computer LCD monitor.
I rendered also with global_quality=25 (switched on in Cingg preset), which then gives higher bitrate and quality comparable with the output from the native ffmpeg 7.1.
Hm. Then I guess I have no other way but to disable autoadding this flag especially for qsv(av1/h264/vp9). You can try to make other qsv profiles with "format set to progressive hack" in the meantime. (there should also be mjpeg and mpeg2 encoders - not most useful but it will be interesting to know if they share same chocke-on-ildct behavior with av1/h264/vp9.)
HDV --> av1_qsv
av1_qsv_8b420.mp4 mp4 av1_qsv # av1_qsv_8b420 cin_pix_fmt=nv12 profile=main # global_quality=25
** rendered 5972 frames in 10.026 secs, 595.651 fps
----------
ffprobe -hide_banner hdv09_04_av1_qsv.mp4 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hdv09_04_av1_qsv.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomav01iso2mp41 encoder : Lavf61.1.100 Duration: 00:03:58.88, start: 0.000000, bitrate: 1533 kb/s Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p(tv, bt709/unknown/unknown, progressive), 1440x1080, 1532 kb/s, SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 12800 tbn (default)
=====================
FHD --> av1_qsv
av1_qsv_10b420.mp4 mp4 av1_qsv # av1_qsv_10b420 cin_pix_fmt=p010le profile=main # global_quality=25
** rendered 1780 frames in 42.035 secs, 42.346 fps
-------------------
ffprobe -hide_banner hd01_av1_qsv.mp4 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hd01_av1_qsv.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomav01iso2mp41 encoder : Lavf61.1.100 Duration: 00:01:11.20, start: 0.000000, bitrate: 1070 kb/s Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 0x31307661), yuv420p10le(tv, bt709/unknown/unknown, progressive), 1920x1080, 1070 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 12800 tbn (default)
Den 24.11.2024 23:30, skrev Andrew Randrianasulu:
пн, 25 нояб. 2024 г., 01:11 Terje J. Hanssen <[email protected]>:
Den 24.11.2024 22:22, skrev Andrew Randrianasulu:
вс, 24 нояб. 2024 г., 19:45 Terje J. Hanssen <[email protected]>:
I can't notice differences at playback with VLC and FFplay (other than 16:9 vs 4:3 format as usual). And both visually with good qualities in my eyes.
Cingg Set Format Interlace Mode: Not interlaced did the trick and both hdv and hd could be rendered FFprobe reported it is pgogressiv, while native FFmpeg transcoding still say interlaced.
But do files rendered by cingg set to progressive and ffmpeg from same tff source differ visually?
No. It is easy to see during VLC playback that neither av1_qsv from Cin/ffmpeg is progressive, but rather interlaced: Pause during horizontal movements (camcorder panning) shows interlaced vertical edges. Then shortcut "D" on this still image swithch it to deinterlaced and smoother edges. This is on a computer LCD monitor.
I rendered also with global_quality=25 (switched on in Cingg preset), which then gives higher bitrate and quality comparable with the output from the native ffmpeg 7.1.
Hm. Then I guess I have no other way but to disable autoadding this flag especially for qsv(av1/h264/vp9).
You can try to make other qsv profiles with "format set to progressive hack" in the meantime. (there should also be mjpeg and mpeg2 encoders - not most useful but it will be interesting to know if they share same chocke-on-ildct behavior with av1/h264/vp9.)
I have not found other interlaced test files, and I think 1080i hdv as already tested are the main source for interlaced mpeg2. The other mpeg2 video files I have prepared for dvd via ffmpeg and dvde, are all progressive. From the url below I have tested a few mjpeg clips. Mediainfo doesn't report any scan type about them, so I think they are not field interlaced but frame based, as they also render ok with av1_qsv. Else they seems to be faulty possibly with regards to timing, as the playback speed seemingly is all too fast https://filesamples.com/formats/mjpeg?utm_content=cmp-true
On Sun, 24 Nov 2024 23:11:07 +0100 "Terje J. Hanssen via Cin" <[email protected]> wrote:
Den 24.11.2024 22:22, skrev Andrew Randrianasulu:
вс, 24 нояб. 2024 г., 19:45 Terje J. Hanssen <[email protected]>:
<snip>
I can't notice differences at playback with VLC and FFplay (other than 16:9 vs 4:3 format as usual). And both visually with good qualities in my eyes.
Cingg Set Format Interlace Mode: Not interlaced did the trick and both hdv and hd could be rendered FFprobe reported it is pgogressiv, while native FFmpeg transcoding still say interlaced.
But do files rendered by cingg set to progressive and ffmpeg from same tff source differ visually?
No. It is easy to see during VLC playback that neither av1_qsv from Cin/ffmpeg is progressive, but rather interlaced: Pause during horizontal movements (camcorder panning) shows interlaced vertical edges. Then shortcut "D" on this still image swithch it to deinterlaced and smoother edges. This is on a computer LCD monitor.
I've have that problem as well, converting old VHS videos in PAL format to MP4 format. My solution is to use ffmpeg before editing in CinGG, using a de-interlace filter, as follows: ffmpeg -i inputvideo -vf bwdif outputvideo.mp4 Using mp4 as output format also reduces the original mpeg file to half the size. Instead of the -vf bwdif you can use the -vf yadif filter, but bwdif gave slightly better results for my videos. MatN
Den 25.11.2024 11:20, skrev Mat:
On Sun, 24 Nov 2024 23:11:07 +0100 "Terje J. Hanssen via Cin" <[email protected]> wrote:
Den 24.11.2024 22:22, skrev Andrew Randrianasulu:
вс, 24 нояб. 2024 г., 19:45 Terje J. Hanssen <[email protected]>:
<snip>
I can't notice differences at playback with VLC and FFplay (other than 16:9 vs 4:3 format as usual). And both visually with good qualities in my eyes.
Cingg Set Format Interlace Mode: Not interlaced did the trick and both hdv and hd could be rendered FFprobe reported it is pgogressiv, while native FFmpeg transcoding still say interlaced.
But do files rendered by cingg set to progressive and ffmpeg from same tff source differ visually?
No. It is easy to see during VLC playback that neither av1_qsv from Cin/ffmpeg is progressive, but rather interlaced: Pause during horizontal movements (camcorder panning) shows interlaced vertical edges. Then shortcut "D" on this still image swithch it to deinterlaced and smoother edges. This is on a computer LCD monitor.
I've have that problem as well, converting old VHS videos in PAL format to MP4 format. My solution is to use ffmpeg before editing in CinGG, using a de-interlace filter, as follows:
ffmpeg -i inputvideo -vf bwdif outputvideo.mp4
Using mp4 as output format also reduces the original mpeg file to half the size. Instead of the -vf bwdif you can use the -vf yadif filter, but bwdif gave slightly better results for my videos.
MatN
For end-user formats like AV1 and HEVC etc. I don't think interlaced video is an issue as mediaplayers handle it simply. What I don't understand is why my system ffmpeg 7.1 is capable to transcode tff interlaced input video to av1_qsv, while Cingg's internal ffmpeg 7.0 error out due to unsupported pixel structure. May something have changed here between ffmpeg 7.0 and 7.1?
On Mon, Nov 25, 2024 at 6:27 PM Terje J. Hanssen <[email protected]> wrote:
Den 25.11.2024 11:20, skrev Mat:
On Sun, 24 Nov 2024 23:11:07 +0100 "Terje J. Hanssen via Cin" <[email protected]> wrote:
Den 24.11.2024 22:22, skrev Andrew Randrianasulu:
вс, 24 нояб. 2024 г., 19:45 Terje J. Hanssen <[email protected]>:
<snip>
I can't notice differences at playback with VLC and FFplay (other than 16:9 vs 4:3 format as usual). And both visually with good qualities in my eyes.
Cingg Set Format Interlace Mode: Not interlaced did the trick and both hdv and hd could be rendered FFprobe reported it is pgogressiv, while native FFmpeg transcoding still say interlaced.
But do files rendered by cingg set to progressive and ffmpeg from same tff source differ visually?
No. It is easy to see during VLC playback that neither av1_qsv from Cin/ffmpeg is progressive, but rather interlaced: Pause during horizontal movements (camcorder panning) shows interlaced vertical edges. Then shortcut "D" on this still image swithch it to deinterlaced and smoother edges. This is on a computer LCD monitor.
I've have that problem as well, converting old VHS videos in PAL format to MP4 format. My solution is to use ffmpeg before editing in CinGG, using a de-interlace filter, as follows:
ffmpeg -i inputvideo -vf bwdif outputvideo.mp4
Using mp4 as output format also reduces the original mpeg file to half the size. Instead of the -vf bwdif you can use the -vf yadif filter, but bwdif gave slightly better results for my videos.
MatN
For end-user formats like AV1 and HEVC etc. I don't think interlaced video is an issue as mediaplayers handle it simply. What I don't understand is why my system ffmpeg 7.1 is capable to transcode tff interlaced input video to av1_qsv, while Cingg's internal ffmpeg 7.0 error out due to unsupported pixel structure. May something have changed here between ffmpeg 7.0 and 7.1?
ffmpeg by default does not add +ildct flag, we do (if input is interlaced)
Den 25.11.2024 19:44, skrev Andrew Randrianasulu:
On Mon, Nov 25, 2024 at 6:27 PM Terje J. Hanssen <[email protected]> wrote:
Den 25.11.2024 11:20, skrev Mat:
On Sun, 24 Nov 2024 23:11:07 +0100 "Terje J. Hanssen via Cin" <[email protected]> wrote:
Den 24.11.2024 22:22, skrev Andrew Randrianasulu:
вс, 24 нояб. 2024 г., 19:45 Terje J. Hanssen <[email protected]>: <snip> I can't notice differences at playback with VLC and FFplay (other than 16:9 vs 4:3 format as usual). And both visually with good qualities in my eyes.
Cingg Set Format Interlace Mode: Not interlaced did the trick and both hdv and hd could be rendered FFprobe reported it is pgogressiv, while native FFmpeg transcoding still say interlaced.
But do files rendered by cingg set to progressive and ffmpeg from same tff source differ visually? No. It is easy to see during VLC playback that neither av1_qsv from Cin/ffmpeg is progressive, but rather interlaced: Pause during horizontal movements (camcorder panning) shows interlaced vertical edges. Then shortcut "D" on this still image swithch it to deinterlaced and smoother edges. This is on a computer LCD monitor. I've have that problem as well, converting old VHS videos in PAL format to MP4 format. My solution is to use ffmpeg before editing in CinGG, using a de-interlace filter, as follows:
ffmpeg -i inputvideo -vf bwdif outputvideo.mp4
Using mp4 as output format also reduces the original mpeg file to half the size. Instead of the -vf bwdif you can use the -vf yadif filter, but bwdif gave slightly better results for my videos.
MatN For end-user formats like AV1 and HEVC etc. I don't think interlaced video is an issue as mediaplayers handle it simply. What I don't understand is why my system ffmpeg 7.1 is capable to transcode tff interlaced input video to av1_qsv, while Cingg's internal ffmpeg 7.0 error out due to unsupported pixel structure. May something have changed here between ffmpeg 7.0 and 7.1?
ffmpeg by default does not add +ildct flag, we do (if input is interlaced)
Something similar for NVENC? https://stackoverflow.com/questions/57103688/ffmpeg-nvenc-encoding-with-flag...
On Mon, Nov 25, 2024 at 7:11 PM Terje J. Hanssen <[email protected]> wrote:
Den 25.11.2024 19:44, skrev Andrew Randrianasulu:
On Mon, Nov 25, 2024 at 6:27 PM Terje J. Hanssen <[email protected]> wrote:
Den 25.11.2024 11:20, skrev Mat:
On Sun, 24 Nov 2024 23:11:07 +0100 "Terje J. Hanssen via Cin" <[email protected]> wrote:
Den 24.11.2024 22:22, skrev Andrew Randrianasulu:
вс, 24 нояб. 2024 г., 19:45 Terje J. Hanssen <[email protected]>: <snip> I can't notice differences at playback with VLC and FFplay (other than 16:9 vs 4:3 format as usual). And both visually with good qualities in my eyes.
Cingg Set Format Interlace Mode: Not interlaced did the trick and both hdv and hd could be rendered FFprobe reported it is pgogressiv, while native FFmpeg transcoding still say interlaced.
But do files rendered by cingg set to progressive and ffmpeg from same tff source differ visually? No. It is easy to see during VLC playback that neither av1_qsv from Cin/ffmpeg is progressive, but rather interlaced: Pause during horizontal movements (camcorder panning) shows interlaced vertical edges. Then shortcut "D" on this still image swithch it to deinterlaced and smoother edges. This is on a computer LCD monitor. I've have that problem as well, converting old VHS videos in PAL format to MP4 format. My solution is to use ffmpeg before editing in CinGG, using a de-interlace filter, as follows:
ffmpeg -i inputvideo -vf bwdif outputvideo.mp4
Using mp4 as output format also reduces the original mpeg file to half the size. Instead of the -vf bwdif you can use the -vf yadif filter, but bwdif gave slightly better results for my videos.
MatN For end-user formats like AV1 and HEVC etc. I don't think interlaced video is an issue as mediaplayers handle it simply. What I don't understand is why my system ffmpeg 7.1 is capable to transcode tff interlaced input video to av1_qsv, while Cingg's internal ffmpeg 7.0 error out due to unsupported pixel structure. May something have changed here between ffmpeg 7.0 and 7.1?
ffmpeg by default does not add +ildct flag, we do (if input is interlaced)
Something similar for NVENC? https://stackoverflow.com/questions/57103688/ffmpeg-nvenc-encoding-with-flag...
May be? You really better ask someone who works with QSV for specifically Linux/ffmpeg environment.
participants (4)
-
Andrew Randrianasulu -
Mat -
Terje Hanssen -
Terje J. Hanssen