summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* fftools/ffmpeg: fix -t inaccurate recording timeShiwang.Xie2021-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if input start time is not 0 -t is inaccurate doing stream copy, will record extra duration according to input start time. it should base on following cases: input video start time from 60s, duration is 300s, 1. stream copy: ffmpeg -ss 40 -t 60 -i in.mp4 -c copy -y out.mp4 open_input_file() will seek to 100 and set ts_offset to -100, process_input() will offset pkt->pts with ts_offset to make it 0, so when do_streamcopy() with -t, exits when ist->pts >= recording_time. 2. stream copy with -copyts: ffmpeg -ss 40 -t 60 -copyts -i in.mp4 -c copy -y out.mp4 open_input_file() will seek to 100 and set ts_offset to 0, process_input() will keep raw pkt->pts as ts_offset is 0, so when do_streamcopy() with -t, exits when ist->pts >= (recording_time+f->start_time+f->ctx->start_time). 3. stream copy with -copyts -start_at_zero: ffmpeg -ss 40 -t 60 -copyts -start_at_zero -i in.mp4 -c copy -y out.mp4 open_input_file() will seek to 120 and set ts_offset to -60 as start_to_zero option, process_input() will offset pkt->pts with input file start time, so when do_streamcopy() with -t, exits when ist->pts >= (recording_time+f->start_time). 0 60 40 60 360 |_______|_____|_______|_______________________| start -ss -t This fixes ticket #9141. Signed-off-by: Shiwang.Xie <shiwang.xie666@outlook.com>
* avformat/subtitles: Deduplicate subtitles' read_(packet|seek|close)Andreas Rheinhardt2021-07-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: remove AVStreamInternal.orig_codec_idJames Almer2021-07-17
| | | | | | | It's a write only field. Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_v360: avoid doubles in fov_from_dfov()Paul B Mahol2021-07-17
|
* ffmpeg: add option readrateGyan Doshi2021-07-17
| | | | | | | Allows to read inputs at arbitrary rates. -re is equivalent to -readrate 1 Tested with -copyts {+ start_at_zero}, -ss, streamcopied & decoded streams.
* avfilter/vf_chromanr: add also euclidean distance for calculationsPaul B Mahol2021-07-17
|
* avfilter/vf_v360: fix visibility test for fisheye projectionDaniel Playfair Cal2021-07-17
| | | | | Previously the visibility test referred to a circle in the input. This changes it so that it refers accurately to the entire area in the input.
* tools/target_dec_fuzzer: Fuzz FF_DEBUG_*Michael Niedermayer2021-07-17
| | | | | | This should increase coverage Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Fuzz AV_CODEC_FLAG2_EXPORT_MVSMichael Niedermayer2021-07-17
| | | | | | This should increase coverage Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Set extradata for the parserMichael Niedermayer2021-07-17
| | | | | | This should improve coverage Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Fuzz skip_frameMichael Niedermayer2021-07-17
| | | | | | Should allow coverage of related code Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: do not ignore errors in mov_metadata_hmmt()Michael Niedermayer2021-07-17
| | | | | | | | Fixes: Timeout Fixes: 35637/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6311060272447488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: Check size for shrinkingMichael Niedermayer2021-07-17
| | | | | | | | | av_shrink_packet() takes int size, so size must fit in int Fixes: out of array access Fixes: 35607/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4875541323841536 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: Check uncompressed_size against max_pixelsMichael Niedermayer2021-07-17
| | | | | | | | | Fixes: Timeout Fixes: 35286/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-6557139802914816 Fixes: 31253/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-4901782326214656 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/cmdutils.c: Add cmd line option to override detection of cpu count.Thilo Borgmann2021-07-16
|
* lavu/cpu.c: Add av_force_cpu_count() to override auto-detection.Thilo Borgmann2021-07-16
|
* fftools/ffmpeg: Add new variant source_no_drop to the force_key_frames optionKeyun Tong2021-07-16
| | | | Suggested-By: ffmpeg@fb.com
* avfilter/[vf_nnedi, vf_estdif]: check interlaced flag on correct frameKacper Michajłow2021-07-16
| | | | | | | Fixes regression in vf_nnedi after 24dc6d386c6f7edb8f6945319f53a7f0b1642bb8 and vf_estdif while at it. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* avfilter/vf_nnedi: fix time base for large denominatorsPaul B Mahol2021-07-16
|
* avfilter/vf_estdif: fix time base for large denominatorsPaul B Mahol2021-07-16
|
* avfilter/vf_w3fdif: fix time base for large denominatorsPaul B Mahol2021-07-16
|
* ffprobe: use quotation marks in the xml header outputJames Almer2021-07-15
| | | | | | | | xmllint (silently) replaces the ' with " when fixing and validating the output of ffprobe in fate-ffprobe_xsd. Reviewed-by: Tobias Rapp <t.rapp@noa-archive.com> Signed-off-by: James Almer <jamrial@gmail.com>
* configure: use the correct header for the fallback libxext checkJames Almer2021-07-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* configure: clean up and fix xlib checksJames Almer2021-07-15
| | | | | | Split them into separate checks per library. Signed-off-by: James Almer <jamrial@gmail.com>
* mov: Don't export unknown/unhandled metadata types as if they were UTF8Martin Storsjö2021-07-15
| | | | | | | They can be other incompatible text encodings (such as UTF-16), or even binary data. Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Pick up "com.apple.quicktime.artwork" as cover artMartin Storsjö2021-07-15
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* configure: use pkg-config for xlib/XvTimo Rothenpieler2021-07-14
|
* avcodec/libdav1d: parse sequence headers in extradata if availableJames Almer2021-07-14
| | | | | | | This allows the decoder context to be initialized with all stream parameters before a packet is parsed. Signed-off-by: James Almer <jamrial@gmail.com>
* Fix double write of DASH manifest in streaming modeKevin LaFlamme2021-07-14
| | | | | | | When streaming mode is enabled, the DASH manifest is written on the first packet for the segment so that the segment can be advertised immediately to clients. It was also still writing the manifest at the end of the segment leading to two duplicate writes.
* avfilter/af_astats: Only print header lines when values are to be printedTobias Rapp2021-07-14
| | | | | | | | Avoids empty "Channel" or "Overall" header lines added to log output when measurement is restricted to one scope using "measure_perchannel=none" or "measure_overall=none". Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* fate/ffprobe: Verify ffprobe XML output against schema fileTobias Rapp2021-07-13
| | | | | | | | | | | Adds schema validation for ffprobe XML output so that updating the ffprobe.xsd file upon changes to ffprobe is not forgotten. This was suggested by Marton Balint in: http://ffmpeg.org/pipermail/ffmpeg-devel/2021-March/278428.html The schema FATE test is only run if xmllint command is available. Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* libavformat/rtsp.c: Reply to GET_PARAMETER requestsHayden Myers2021-07-12
| | | | | | | | | | | | | | Some encoders send GET_PARAMETER requests as a keep-alive mechanism. If the client doesn't reply with an OK message, the encoder will close the session. This was encountered with the impath i5110 encoder, when the RTSP Keep-Alive checkbox is enabled under streaming settings. Alternatively one may set the X-No-Keepalive: 1 header, but this is more of a workaround. It's better practice to respond to an encoder's keep-alive request, than disable the mechanism which may be manufacturer specific. Signed-off-by: Hayden Myers <hmyers@skylinenet.net> Signed-off-by: Martin Storsjö <martin@martin.st>
* lavfi/vf_scale: forward errors from swscaleAnton Khirnov2021-07-12
|
* lavfi/vf_scale: pass only the private context to scale_slice()Anton Khirnov2021-07-12
| | | | | Not the input link. The function does nothing with the link except extract the private context from it.
* {configure,avcodec/libx264}: remove separate x264_csp_bgr checkJan Ekström2021-07-12
| | | | | | We already require X264_BUILD >= 118, which includes an unconditional definition of X264_CSP_BGR in itself, thus making this check effectively always true.
* configure: move x264_csp_bgr check under general libx264 checksJan Ekström2021-07-12
| | | | | | | | | | | | This makes the libx264rgb check work when pkg-config is utilized and x264.h is not part of the standard include path (as is often with cross-compilation, or when you just have a custom prefix in general in f.ex. your home directory). The X264_BUILD >= 118 required by configure since 2011 should have X264_CSP_BGR defined unconditionally (it was added a few X264_BUILD updates earlier), but as 134cba728bc6f4e3c5caec98b800faad244d8cfb added this additional check, I have kept it for now.
* fate/oggvorbis: Fix tests after fixing AV_PKT_DATA_SKIP_SAMPLESGuangyu Sun2021-07-12
| | | | | | | | | | | | | | | | | | | | | | After fixing AV_PKT_DATA_SKIP_SAMPLES for reading vorbis packets from ogg, the actual decoded samples become fewer. Three fate tests are failing: fate-vorbis-20: The samples in 6.ogg are not frame aligned. 6.pcm file was generated by ffmpeg before the fix. After the fix, the decoded pcm file does not match anymore. Ideally the ref file 6.pcm should be updated but it is probably not worth it including another copy of the same file, only smaller. SIZE_TOLERANCE is added for this test case. fate-webm-dash-chapters: The original vorbis_chapter_extension_demo.ogg is transmuxed to dash-webm. The ref file webm-dash-chapters needs to be updated. fate-vorbis-encode: This exposes another bug in the vorbis encoder that initial_padding is not correctly set. It is fixed in the previous patch. Signed-off-by: Guangyu Sun <gsun@roblox.com>
* libavcodec/vorbisenc: Add missing initial_paddingGuangyu Sun2021-07-12
| | | | | | | | | | | Vorbis has priming samples at the beginning. If the initial_padding is not set in the encoder, the total sample count will be one frame fewer than it should be. The result is that we get a truncated version of encoding. initial_padding should be set to the frame_size used in vorbis_encode_frame(). Signed-off-by: Guangyu Sun <gsun@roblox.com>
* avformat/oggparsevorbis: Update end_trimming for the last packetGuangyu Sun2021-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without end_trimming, the last packet will contain unexpected samples used for padding. This commit partially fixes #6367 when the audio length is long enough. dd if=/dev/zero of=./silence.raw count=20 bs=500 oggenc --raw silence.raw --output=silence.ogg oggdec --raw --output silence.oggdec.raw silence.ogg ffmpeg -codec:a libvorbis -i silence.ogg -f s16le -codec:a pcm_s16le silence.libvorbis.ffmpeg.raw ffmpeg -i silence.ogg -f s16le -codec:a pcm_s16le silence.native.ffmpeg.raw ls -l *.raw The original test case in #6367 is still not fixed due to a remaining issue. The remaining issue is that ogg_stream->private is not kept during ogg_save()/ogg_restore(). Field final_duration in the private data is important to calculate end_trimming. Some common operations such as avformat_open_input() and avformat_find_stream_info() before reading packet will trigger ogg_save() and ogg_restore(). Luckily, final_duration will not get updated until the last ogg page. The save/restore mentioned above will not change final_duration most of the time. But if the audio length is short, those reads may be performed on the last ogg page, causing trouble keeping the correct value of final_duration. We probably need a more complicated patch to address this issue. Signed-off-by: Guangyu Sun <gsun@roblox.com>
* cafenc: fill in avg. packet size later if unknownRoman Beranek2021-07-12
| | | | | | | | | | | | | | | | | Frame size of Opus stream was previously presumed here to be 960 samples (20ms), however sizes of 120, 240, 480, 1920, and 2880 are also allowed. It can also alter on a per-packet basis and even multiple frames may be present in a single packet according to the specification, for the sake of simplicity however, let us assume that this doesn't occur. Because the mFramesPerPacket field, representing the number of samples per packet in the ffmpeg terminilogy, is the key factor in calculating packet durations and all that follows from that (index, bitrate, ...), it is crucial to get right. Therefore, if the packet size is not available ahead of time (as it is in the case of Opus), calculate an average from the stream duration once we know how many packets there are and update the filed in the header.
* avcodec/qsvenc: clip global_quality for ICQ modes.Gyan Doshi2021-07-12
| | | | | | Allowed range is 1 to 51. Ref: https://software.intel.com/content/www/us/en/develop/articles/advanced-bitrate-control-methods-in-intel-media-sdk.html
* lavfi/dnn_backend_tf: Error HandlingShubhanshu Saxena2021-07-11
| | | | | | | This commit adds handling for cases where an error may occur, clearing the allocated memory resources. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: Separate function for Completion CallbackShubhanshu Saxena2021-07-11
| | | | | | | This commit rearranges the existing code to create a separate function for the completion callback in execute_model_tf. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: Separate function for filling RequestItemShubhanshu Saxena2021-07-11
| | | | | | | This commit rearranges the existing code to create separate function for filling request with execution data. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: Request-based ExecutionShubhanshu Saxena2021-07-11
| | | | | | | | This commit uses TFRequestItem and the existing sync execution mechanism to use request-based execution. It will help in adding async functionality to the TensorFlow backend later. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: Add TFInferRequest and TFRequestItemShubhanshu Saxena2021-07-11
| | | | | | | | This commit introduces a typedef TFInferRequest to store execution parameters for a single call to the TensorFlow C API. This typedef is used in the TFRequestItem. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: TaskItem Based InferenceShubhanshu Saxena2021-07-11
| | | | | | | This commit uses the common TaskItem and InferenceItem typedefs for execution in TensorFlow backend. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* ffmpeg: add option recast_mediaGyan Doshi2021-07-11
| | | | | Allows forcing decoders of different media type. Needed to decode media data muxed as data streams.
* lavc:libsvtav1: Update SVT-AV1 new repoJun Zhao2021-07-10
| | | | | | SVT-AV1 moved the repo from github to gitlab. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avformat/udp: fix check for pthread_cond_wait return valueZhao Zhili2021-07-10
| | | | | | | | POSIX errno is positive. We have strict_pthread_cond_wait to handle error code during development. Signed-off-by: zhilizhao <zhilizhao@tencent.com> Reviewed-by: Jun Zhao <barryjzhao@tencent.com>