SHA256
1
0
forked from pool/ffmpeg-6
ffmpeg-6/ffmpeg-codec-choice.diff
Jan Engelhardt 6f66ffe151 Accepting request 1138974 from home:iDesmI:Wayland
- Update to version 6.1.1:
  * libaribcaption decoder
  * Playdate video decoder and demuxer
  * Extend VAAPI support for libva-win32 on Windows
  * afireqsrc audio source filter
  * arls filter
  * ffmpeg CLI new option: -readrate_initial_burst
  * zoneplate video source filter
  * command support in the setpts and asetpts filters
  * Vulkan decode hwaccel, supporting H264, HEVC and AV1
  * color_vulkan filter
  * bwdif_vulkan filter
  * nlmeans_vulkan filter
  * RivaTuner video decoder
  * xfade_vulkan filter
  * vMix video decoder
  * Essential Video Coding parser, muxer and demuxer
  * Essential Video Coding frame merge bsf
  * bwdif_cuda filter
  * Microsoft RLE video encoder
  * Raw AC-4 muxer and demuxer
  * Raw VVC bitstream parser, muxer and demuxer
  * Bitstream filter for editing metadata in VVC streams
  * Bitstream filter for converting VVC from MP4 to Annex B
  * scale_vt filter for videotoolbox
  * transpose_vt filter for videotoolbox
  * support for the P_SKIP hinting to speed up libx264 encoding
  * Support HEVC,VP9,AV1 codec in enhanced flv format
  * apsnr and asisdr audio filters
  * OSQ demuxer and decoder
  * Support HEVC,VP9,AV1 codec fourcclist in enhanced rtmp protocol
  * CRI USM demuxer
  * ffmpeg CLI '-top' option deprecated in favor of the setfield filter
  * VAAPI AV1 encoder
  * ffprobe XML output schema changed to account for multiple variable-fields elements within the same parent element
  * ffprobe -output_format option added as an alias of -of
- Remove patch6 0001-avfilter-vf_libplacebo-remove-deprecated-field.diff
- Prefer libvpl to libmfx: the latter is deprecated
- Delete ffmpeg-6-private-devel package as it is only needed to build libav-tools
- Remove patch2 ffmpeg-new-coder-errors.diff

OBS-URL: https://build.opensuse.org/request/show/1138974
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-6?expand=0&rev=20
2024-01-15 16:47:28 +00:00

58 lines
2.1 KiB
Diff

From: Jan Engelhardt <jengelh@inai.de>
Edit the default codec selection such that
ffmpeg -i youtube.blah.webm foobar.mkv
without any further arguments can produce a result even on a
reduced codec selection list.
---
libavformat/matroskaenc.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
Index: ffmpeg-6.1.1/libavformat/matroskaenc.c
===================================================================
--- ffmpeg-6.1.1.orig/libavformat/matroskaenc.c
+++ ffmpeg-6.1.1/libavformat/matroskaenc.c
@@ -3538,16 +3538,25 @@ static int mkv_query_codec(enum AVCodecI
return 0;
}
+#define PREFAUDIO \
+ CONFIG_LIBOPUS_ENCODER ? AV_CODEC_ID_OPUS : \
+ CONFIG_AAC_ENCODER ? AV_CODEC_ID_AAC : \
+ CONFIG_VORBIS_ENCODER ? AV_CODEC_ID_VORBIS : \
+ AV_CODEC_ID_AC3
+
const FFOutputFormat ff_matroska_muxer = {
.p.name = "matroska",
.p.long_name = NULL_IF_CONFIG_SMALL("Matroska"),
.p.mime_type = "video/x-matroska",
.p.extensions = "mkv",
.priv_data_size = sizeof(MatroskaMuxContext),
- .p.audio_codec = CONFIG_LIBVORBIS_ENCODER ?
- AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3,
- .p.video_codec = CONFIG_LIBX264_ENCODER ?
- AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4,
+ .p.audio_codec = PREFAUDIO,
+ .p.video_codec =
+ CONFIG_LIBVPX_VP9_ENCODER ? AV_CODEC_ID_VP9 : \
+ CONFIG_LIBX264_ENCODER ? AV_CODEC_ID_H264 : \
+ CONFIG_LIBVPX_VP8_ENCODER ? AV_CODEC_ID_VP8 : \
+ CONFIG_MPEG4_ENCODER ? AV_CODEC_ID_MPEG4 : \
+ AV_CODEC_ID_THEORA,
.init = mkv_init,
.deinit = mkv_deinit,
.write_header = mkv_write_header,
@@ -3615,8 +3624,7 @@ const FFOutputFormat ff_matroska_audio_m
.p.mime_type = "audio/x-matroska",
.p.extensions = "mka",
.priv_data_size = sizeof(MatroskaMuxContext),
- .p.audio_codec = CONFIG_LIBVORBIS_ENCODER ?
- AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3,
+ .p.audio_codec = PREFAUDIO,
.p.video_codec = AV_CODEC_ID_NONE,
.init = mkv_init,
.deinit = mkv_deinit,