[FFmpeg-trac] #10915(undetermined:new): using hardware encoding and decoding, change the resolution of videos, and merge them using concat
FFmpeg
trac at avcodec.org
Wed Mar 20 04:31:28 EET 2024
#10915: using hardware encoding and decoding, change the resolution of videos, and
merge them using concat
-------------------------------------+-------------------------------------
Reporter: elias | Type: defect
tsolis |
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Two videos with different resolution, framerates, and the rest, i would
like to join them together by making framerates =25 , and resolution
1920x1080.
I want to use encoding and decoding hardware acceleration.
However, it fails.
`Impossible to convert between the formats supported by the filter
'Parsed_scale_vaapi_2' and the filter 'auto_scale_1'
`
```
ffmpeg version 6.1.1-1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 13 (Debian 13.2.0-9)
configuration: --prefix=/usr --extra-version=1 --toolchain=hardened
--libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu
--arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-
ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b
--enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d
--enable-libflite --enable-libfontconfig --enable-libfreetype --enable-
libharfbuzz --enable-libfribidi --enable-libglslang --enable-libgme
--enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa
--enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-
libpulse --enable-librabbitmq --enable-librist --enable-librubberband
--enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex
--enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp
--enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
--enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal
--enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-
libjxl --enable-pocketsphinx --enable-librsvg --enable-libvpl --disable-
libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-
chromaprint --enable-frei0r --enable-libsvtav1 --enable-libx264 --enable-
libplacebo --enable-librav1e --enable-shared
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x564257deb200] Auto-inserting h264_mp4toannexb
bitstream filter
Input #0, concat, from './vids.txt':
Duration: N/A, start: 0.000000, bitrate: 16895 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709, progressive), 1920x1080, 16767 kb/s, 29.39 fps, 29.58 tbr, 90k tbn
Metadata:
handler_name : VideoHandle
vendor_id : [0][0][0][0]
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono,
fltp, 128 kb/s
Metadata:
handler_name : SoundHandle
vendor_id : [0][0][0][0]
File 'out_video.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_vaapi))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[hevc_vaapi @ 0x564257d3e8c0] Driver does not support some wanted packed
headers (wanted 0xd, found 0x1).
Output #0, mp4, to 'out_video.mp4':
Metadata:
encoder : Lavf60.16.100
Stream #0:0(eng): Video: hevc (Main) (hev1 / 0x31766568), vaapi(tv,
bt709, progressive), 1920x1080, q=2-31, 25 fps, 12800 tbn
Metadata:
handler_name : VideoHandle
vendor_id : [0][0][0][0]
encoder : Lavc60.31.102 hevc_vaapi
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono,
fltp, 69 kb/s
Metadata:
handler_name : SoundHandle
vendor_id : [0][0][0][0]
encoder : Lavc60.31.102 aac
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f113c00aa40] Auto-inserting h264_mp4toannexb
bitstream filterrop=8758 speed=6.01x
[in#0/concat @ 0x564257de9a80] New (null) stream with index 2 at pos:48
and DTS:1996.03s
Impossible to convert between the formats supported by the filter
'Parsed_scale_vaapi_2' and the filter 'auto_scale_1'
[vf#0:0 @ 0x564257d3a340] Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while filtering: Function not implemented
[out#0/mp4 @ 0x564257d45640] video:5894436kB audio:17237kB subtitle:0kB
other streams:0kB global headers:0kB muxing overhead: 0.025196%
frame=49900 fps=150 q=-0.0 Lsize= 5913162kB time=00:33:16.65
bitrate=24260.9kbits/s dup=11 drop=8770 speed= 6x
[aac @ 0x564258c2ddc0] Qavg: 43.147
Conversion failed!
```
ffmpeg -hwaccel vaapi -hwaccel_output_format yuv420p -vaapi_device
/dev/dri/renderD128 -f concat -safe 0 -i './vids.txt' -vf
'format=nv12,hwupload,scale_vaapi=1920:1080' -c:v hevc_vaapi -r 25
-rc_mode CQP -global_quality 22 -threads 12 out_video.mp4
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10915>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list