Re: [FFmpeg-user] AMD screen record + h/w vaapi encode to mkv fails.
Andy Furniss wrote: Andy Furniss wrote: Haven't had time to bisect, but I can't screengrab to mkv any more. kmsgrab + playing with vsync etc. give the same error as this example, mp4 works OK. Bisected to - commit ae7df68edd79bce5c318810c6b307ee4e81cd2a6 Author: James AlmerDate: Fri Nov 24 19:42:50 2017 -0300 avformat/avc: return an error in ff_isom_write_avcc if the buffer lenght is too small Signed-off-by: James Almer I thought this was just screen rec initially, but it can be reproduced with a transcode as well. Replacing mkv with mp4 in the examples will work OK. Adding Mark to cc. ffm -vaapi_device /dev/dri/renderD128 -i ~/abc-60fps.mp4 -an -sn -vf 'format=nv12,hwupload' -c:v h264_vaapi -profile:v 578 -bf 0 -y ~/out.mkv ffmpeg version N-90242-g5ab0ecf283 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7.3.0 (GCC) configuration: --prefix=/usr --disable-doc --enable-gpl --enable-libvpx --enable-libx265 --enable-libx264 --enable-gnutls --enable-libdrm --enable-libfreetype --enable-libmp3lame libavutil 56. 8.100 / 56. 8.100 libavcodec 58. 13.102 / 58. 13.102 libavformat58. 10.100 / 58. 10.100 libavdevice58. 2.100 / 58. 2.100 libavfilter 7. 12.100 / 7. 12.100 libswscale 5. 0.102 / 5. 0.102 libswresample 3. 0.101 / 3. 0.101 libpostproc55. 0.100 / 55. 0.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/andy/abc-60fps.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.0.100 Duration: 00:01:36.00, start: 0.00, bitrate: 624 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 619 kb/s, 60 fps, 60 tbr, 15360 tbn, 120 tbc (default) Metadata: handler_name: VideoHandler Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vaapi)) Press [q] to stop, [?] for help [h264_vaapi @ 0x4062880] Warning: some packed headers are not supported (want 0xd, got 0). Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input Error initializing output stream 0:0 -- Conversion failed! ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] AMD screen record + h/w vaapi encode to mkv fails.
Andy Furniss wrote: Haven't had time to bisect, but I can't screengrab to mkv any more. kmsgrab + playing with vsync etc. give the same error as this example, mp4 works OK. Bisected to - commit ae7df68edd79bce5c318810c6b307ee4e81cd2a6 Author: James AlmerDate: Fri Nov 24 19:42:50 2017 -0300 avformat/avc: return an error in ff_isom_write_avcc if the buffer lenght is too small Signed-off-by: James Almer ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] AMD screen record + h/w vaapi encode to mkv fails.
Haven't had time to bisect, but I can't screengrab to mkv any more. kmsgrab + playing with vsync etc. give the same error as this example, mp4 works OK. ffm -loglevel debug -vaapi_device /dev/dri/renderD128 -f x11grab -video_size 1920x1080 -i :0 -vf 'format=nv12,hwupload' -c:v h264_vaapi -profile:v 578 -bf 0 -y out.mkv ffmpeg version N-90148-g0419623cdc Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7.3.0 (GCC) configuration: --prefix=/usr --disable-doc --enable-gpl --enable-libvpx --enable-libx265 --enable-libx264 --enable-gnutls --enable-libdrm --enable-libfreetype --enable-libmp3lame libavutil 56. 7.101 / 56. 7.101 libavcodec 58. 12.102 / 58. 12.102 libavformat58. 9.100 / 58. 9.100 libavdevice58. 2.100 / 58. 2.100 libavfilter 7. 12.100 / 7. 12.100 libswscale 5. 0.101 / 5. 0.101 libswresample 3. 0.101 / 3. 0.101 libpostproc55. 0.100 / 55. 0.100 Splitting the commandline. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'. Reading option '-vaapi_device' ... matched as option 'vaapi_device' (set VAAPI hardware device (DRM path or X11 display name)) with argument '/dev/dri/renderD128'. Reading option '-f' ... matched as option 'f' (force format) with argument 'x11grab'. Reading option '-video_size' ... matched as AVOption 'video_size' with argument '1920x1080'. Reading option '-i' ... matched as input url with argument ':0'. Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'format=nv12,hwupload'. Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'h264_vaapi'. Reading option '-profile:v' ... matched as option 'profile' (set profile) with argument '578'. Reading option '-bf' ... matched as AVOption 'bf' with argument '0'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option 'out.mkv' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set logging level) with argument debug. Applying option vaapi_device (set VAAPI hardware device (DRM path or X11 display name)) with argument /dev/dri/renderD128. [AVHWDeviceContext @ 0x2152640] Opened VA display via DRM device /dev/dri/renderD128. [AVHWDeviceContext @ 0x2152640] libva: VA-API version 1.1.0 [AVHWDeviceContext @ 0x2152640] libva: va_getDriverName() returns 0 [AVHWDeviceContext @ 0x2152640] libva: User requested driver 'radeonsi' [AVHWDeviceContext @ 0x2152640] libva: Trying to open /usr/lib/dri/radeonsi_drv_video.so [AVHWDeviceContext @ 0x2152640] libva: Found init function __vaDriverInit_1_1 [AVHWDeviceContext @ 0x2152640] libva: va_openDriver() returns 0 [AVHWDeviceContext @ 0x2152640] Initialised VAAPI connection: version 1.1 [AVHWDeviceContext @ 0x2152640] Format 0x3231564e -> nv12. [AVHWDeviceContext @ 0x2152640] Format 0x30313050 -> p010le. [AVHWDeviceContext @ 0x2152640] Format 0x36313050 -> unknown. [AVHWDeviceContext @ 0x2152640] Format 0x32315659 -> yuv420p. [AVHWDeviceContext @ 0x2152640] Format 0x56595559 -> unknown. [AVHWDeviceContext @ 0x2152640] Format 0x59565955 -> uyvy422. [AVHWDeviceContext @ 0x2152640] Format 0x41524742 -> bgra. [AVHWDeviceContext @ 0x2152640] Format 0x41424752 -> rgba. [AVHWDeviceContext @ 0x2152640] Format 0x58524742 -> bgr0. [AVHWDeviceContext @ 0x2152640] Format 0x58424752 -> rgb0. [AVHWDeviceContext @ 0x2152640] Unknown driver "Mesa Gallium driver 18.1.0-devel for AMD Radeon R9 200 Series (TONGA / DRM 3.25.0 / 4.16.0-rc1-g2693c7e7ca44, LLVM 7.0.0)", assuming standard behaviour. Applying option y (overwrite output files) with argument 1. Successfully parsed a group of options. Parsing a group of options: input url :0. Applying option f (force format) with argument x11grab. Successfully parsed a group of options. Opening an input file: :0. [x11grab @ 0x223ca00] Probe buffer size limit of 500 bytes reached [x11grab @ 0x223ca00] Stream #0: not enough frames to estimate rate; consider increasing probesize Input #0, x11grab, from ':0': Duration: N/A, start: 1519432751.575405, bitrate: N/A Stream #0:0, 1, 1/100: Video: rawvideo, 1 reference frame (BGR[0] / 0x524742), bgr0, 1920x1080, 0/1, 29.97 fps, 1000k tbr, 1000k tbn, 1000k tbc Successfully opened the file. Parsing a group of options: output url out.mkv. Applying option vf (set video filters) with argument format=nv12,hwupload. Applying option c:v (codec name) with argument h264_vaapi. Applying option profile:v (set profile) with argument 578. Successfully parsed a group of options. Opening an output file: out.mkv. [file @ 0x224ab40] Setting default whitelist 'file,crypto' Successfully opened the file. Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_vaapi)) Press [q] to stop, [?] for help cur_dts is invalid (this is harmless if it occurs once at the start per stream) [rawvideo @ 0x22467c0]