diff --git a/p/pyav/build_info.json b/p/pyav/build_info.json index aa02394c5b..18925bdc3b 100644 --- a/p/pyav/build_info.json +++ b/p/pyav/build_info.json @@ -2,7 +2,7 @@ "maintainer": "Shivansh-ibm", "package_name": "PyAV", "github_url": "https://github.com/PyAV-Org/PyAV", - "version": "v16.1.0", + "version": "v17.0.0", "wheel_build" : true, "package_dir": "p/pyav", "default_branch": "main", diff --git a/p/pyav/pyav_ubi_9.3.sh b/p/pyav/pyav_ubi_9.3.sh index 1b9b7f3b44..47c16d4640 100644 --- a/p/pyav/pyav_ubi_9.3.sh +++ b/p/pyav/pyav_ubi_9.3.sh @@ -21,7 +21,7 @@ set -e PACKAGE_NAME=PyAV -PACKAGE_VERSION=${1:-v16.1.0} +PACKAGE_VERSION=${1:-v17.0.0} PACKAGE_URL=https://github.com/PyAV-Org/PyAV CURRENT_DIR=$(pwd) PACKAGE_DIR=PyAV @@ -175,11 +175,38 @@ echo "-----------------------------------------------------Installed opus------- cd $CURRENT_DIR git clone https://github.com/FFmpeg/FFmpeg cd FFmpeg -git checkout n7.1 + +# Helper function to compare versions (moving this up so FFmpeg can use it) +version_ge() { + [ "$(printf '%s\n' "$2" "$1" | sort -V | head -n1)" = "$2" ] +} + +# Strip the 'v' from PACKAGE_VERSION for clean comparison +VERSION_STR="${PACKAGE_VERSION#v}" + +# Conditionally checkout FFmpeg based on PyAV version +if version_ge "$VERSION_STR" "17.0.0"; then + echo "PyAV version $PACKAGE_VERSION requires FFmpeg 8.0+. Checking out n8.0.1..." + git checkout n8.0.1 +else + echo "PyAV version $PACKAGE_VERSION requires legacy FFmpeg. Checking out n7.1..." + git checkout n7.1 +fi + git submodule update --init yum install -y gmp-devel freetype-devel openssl-devel +# Set version-specific FFmpeg configure flags +if version_ge "$VERSION_STR" "17.0.0"; then + echo "Applying FFmpeg 8.0 build flags..." + FFMPEG_POSTPROC_FLAG="" +else + echo "Applying FFmpeg 7.1 build flags..." + FFMPEG_POSTPROC_FLAG="--enable-postproc --enable-hardcoded-tables" +fi + + export CPU_COUNT=$(nproc) USE_NONFREE=no #the options below are set for NO @@ -188,10 +215,9 @@ USE_NONFREE=no #the options below are set for NO --cc=${CC} \ --disable-doc \ --enable-gmp \ - --enable-hardcoded-tables \ --enable-libfreetype \ --enable-pthreads \ - --enable-postproc \ + ${FFMPEG_POSTPROC_FLAG} \ --enable-pic \ --enable-pthreads \ --enable-shared \ @@ -317,8 +343,9 @@ echo "----------------------------------------------Testing pkg----------------- #Skipping few tests as they are failing because of disabling some codecs related to audio and video in ffmpeg. We disabled those codecs because of license associated with them. # test_video_remux is added in 15.0.0 release and related to some codec test : https://github.com/PyAV-Org/PyAV/commit/633f237a6916d17b85fe937f95e28af651fbaf0e , that is why disabling it will pass this script # We are skipping a small set of additional tests because they depend on FFmpeg FATE reference media, which is downloaded from the internet at test runtime. Our build environment is restricting it because of network, causing these tests to fail with HTTP 403 errors, so skipping them. +# skipp failing test_add_mux_stream_video test case newly added for 17.0.0 release -if ! (pytest --ignore=tests/test_videoframe.py --ignore=tests/test_timeout.py --ignore=tests/test_audiofifo.py --ignore=tests/test_bitstream.py --ignore=tests/test_chapters.py --ignore=tests/test_packet.py --ignore=tests/test_seek.py --ignore=tests/test_python_io.py --ignore=tests/test_open.py --ignore=tests/test_streams.py --ignore=tests/test_subtitles.py -k "not test_decoded_video_enc_params_no_flag and not test_decoded_video_enc_params and not test_subtitle_encode_mp4 and not test_video_remux and not test_attachment_stream and not test_data_types and not test_qmin_qmax and not test_profiles and not test_printing_video_stream and not test_frame_duration_matches_packet and not test_printing_video_stream2 and not test_no_side_data and not test_encoding_dnxhd and not test_encoding_dvvideo and not test_encoding_h264 and not test_encoding_mjpeg and not test_encoding_mpeg1video and not test_encoding_mpeg4 and not test_encoding_png and not test_encoding_tiff and not test_encoding_xvid and not test_mov and not test_decode_video_corrupt and not test_decoded_motion_vectors and not test_decoded_motion_vectors_no_flag and not test_decoded_time_base and not test_decoded_video_frame_count and not test_flush_decoded_video_frame_count and not test_av_stream_Stream and not test_encoding_with_pts and not test_stream_audio_resample and not test_max_b_frames and not test_container_probing and not test_stream_probing and not test_writing_to_custom_io_dash and not test_decode_half and not test_stream_seek and not test_side_data and not test_opaque and not test_reformat_pixel_format_align and not test_filter_output_parameters and not test_codec_mpeg4_decoder and not test_codec_mpeg4_encoder and not test_codec_delay and not test_codec_tag and not test_decoder_extradata and not test_decoder_gop_size and not test_decoder_timebase and not test_encoder_extradata and not test_encoder_pix_fmt and not test_parse and not test_sky_timelapse and not test_av_codec_codec_Codec and not test_av_enum_EnumFlag and not test_av_enum_EnumItem and not test_default_options and not test_encoding and not test_encoding_with_unicode_filename and not test_stream_index and not test_writing_to_buffer and not test_writing_to_buffer_broken and not test_writing_to_buffer_broken_with_close and not test_writing_to_file and not test_writing_to_pipe_writeonly and not test_bits_per_coded_sample and not test_penguin_joke and not test_decode_audio_sample_count and not test_decode_close_then_use and not test_transcode and not test_subtitle_muxing and not test_interpolation") ; then +if ! (pytest --ignore=tests/test_videoframe.py --ignore=tests/test_timeout.py --ignore=tests/test_audiofifo.py --ignore=tests/test_bitstream.py --ignore=tests/test_chapters.py --ignore=tests/test_packet.py --ignore=tests/test_seek.py --ignore=tests/test_python_io.py --ignore=tests/test_open.py --ignore=tests/test_streams.py --ignore=tests/test_subtitles.py -k "not test_add_mux_stream_video and not test_decoded_video_enc_params_no_flag and not test_decoded_video_enc_params and not test_subtitle_encode_mp4 and not test_video_remux and not test_attachment_stream and not test_data_types and not test_qmin_qmax and not test_profiles and not test_printing_video_stream and not test_frame_duration_matches_packet and not test_printing_video_stream2 and not test_no_side_data and not test_encoding_dnxhd and not test_encoding_dvvideo and not test_encoding_h264 and not test_encoding_mjpeg and not test_encoding_mpeg1video and not test_encoding_mpeg4 and not test_encoding_png and not test_encoding_tiff and not test_encoding_xvid and not test_mov and not test_decode_video_corrupt and not test_decoded_motion_vectors and not test_decoded_motion_vectors_no_flag and not test_decoded_time_base and not test_decoded_video_frame_count and not test_flush_decoded_video_frame_count and not test_av_stream_Stream and not test_encoding_with_pts and not test_stream_audio_resample and not test_max_b_frames and not test_container_probing and not test_stream_probing and not test_writing_to_custom_io_dash and not test_decode_half and not test_stream_seek and not test_side_data and not test_opaque and not test_reformat_pixel_format_align and not test_filter_output_parameters and not test_codec_mpeg4_decoder and not test_codec_mpeg4_encoder and not test_codec_delay and not test_codec_tag and not test_decoder_extradata and not test_decoder_gop_size and not test_decoder_timebase and not test_encoder_extradata and not test_encoder_pix_fmt and not test_parse and not test_sky_timelapse and not test_av_codec_codec_Codec and not test_av_enum_EnumFlag and not test_av_enum_EnumItem and not test_default_options and not test_encoding and not test_encoding_with_unicode_filename and not test_stream_index and not test_writing_to_buffer and not test_writing_to_buffer_broken and not test_writing_to_buffer_broken_with_close and not test_writing_to_file and not test_writing_to_pipe_writeonly and not test_bits_per_coded_sample and not test_penguin_joke and not test_decode_audio_sample_count and not test_decode_close_then_use and not test_transcode and not test_subtitle_muxing and not test_interpolation") ; then echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------" echo "$PACKAGE_URL $PACKAGE_NAME" echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_success_but_test_Fails"