ffmpeg -encoders |grep h264
ffmpeg version 4.2.2-1+b1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9 (Debian 9.2.1-28)
configuration: --prefix=/usr --extra-version=1+b1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
V..... libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
V..... libx264rgb libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)
V..... h264_omx OpenMAX IL H.264 video encoder (codec h264)
V..... h264_v4l2m2m V4L2 mem2mem H.264 encoder wrapper (codec h264)
V..... h264_vaapi H.264/AVC (VAAPI) (codec h264)
#!/bin/bash
OUTPUT=~/MAGNETO
[ -d "$OUTPUT" ] || mkdir "$OUTPUT"
theRegex='^card.*\ ([0-9]+):.*\ ([0-9]+):'
cards=($(while read -r; do [[ $REPLY =~ $theRegex ]] \
&& printf "hw:${BASH_REMATCH[1]},${BASH_REMATCH[2]} "; \
done <<< $(LANG=C aplay -l)))
titleHeight=92
lineHeight=23
boxHeight=$((($titleHeight+$lineHeight+(${#cards[@]}*$lineHeight))))
lstForZen=(${cards[@]/hw:/FALSE hw:})
lstForZen[0]="TRUE"
choice=$(zenity --list --radiolist --width=218 --height=$boxHeight \
--title "Capture" \
--text="Sélectionnez un périphérique" \
--column="Choix" --column="Périphériques" ${lstForZen[@]})
# https://www.cyberciti.biz/faq/bash-shell-find-out-if-a-variable-has-null-value-or-not/
condition="$choice"
if [ -z "$condition" ]
then
echo "\$condition is NULL"
exit 0
else
echo "\$condition is NOT NULL"
size=$(slop -f "-s %wx%h -i :0.0+%x,%y")
ffmpeg -guess_layout_max 0 -f alsa -thread_queue_size 512 -ac 2 -i $choice \
-f x11grab -thread_queue_size 512 -probesize 42M $size -filter:v fps=60 \
-acodec libmp3lame -c:v h264_vaapi -preset llhq -loglevel repeat+verbose \
"$OUTPUT/CAPTURE-[Le $(date +%d-%m-%y) à $(date +%H:%M:%S)].mkv"
fi
condition is NOT NULL
ffmpeg version 4.2.2-1+b1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9 (Debian 9.2.1-28)
configuration: --prefix=/usr --extra-version=1+b1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, alsa, from 'hw:0,0':
Duration: N/A, start: 1590396530.781130, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Input #1, x11grab, from ':0.0+119,552':
Duration: N/A, start: 1590396530.815023, bitrate: N/A
Stream #1:0: Video: rawvideo, 1 reference frame (BGR[0] / 0x524742), bgr0, 1025x740, 29.97 fps, 29.97 tbr, 1000k tbn, 1000k tbc
Codec AVOption preset (Configuration preset) specified for output file #0 (/home/alain/MAGNETO/CAPTURE-[Le 25-05-20 à 10:48:50].mkv) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Stream mapping:
Stream #1:0 -> #0:0 (rawvideo (native) -> h264 (h264_vaapi))
Stream #0:0 -> #0:1 (pcm_s16le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[Parsed_fps_0 @ 0x55c320c834c0] fps=60/1
[graph 0 input from stream 1:0 @ 0x55c320c83a80] w:1025 h:740 pixfmt:bgr0 tb:1/1000000 fr:30000/1001 sar:0/1 sws_param:flags=2
[auto_scaler_0 @ 0x55c320c87600] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x55c320c84100] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_fps_0' and the filter 'format'
Impossible to convert between the formats supported by the filter 'Parsed_fps_0' and the filter 'auto_scaler_0'
[Parsed_fps_0 @ 0x55c320c834c0] 0 frames in, 0 frames out; 0 frames dropped, 0 frames duplicated.
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #1:0
[AVIOContext @ 0x55c320c67a80] Statistics: 0 seeks, 0 writeouts
Conversion failed!
Dernière modification par Debian Alain (25-05-2020 09:56:58)