1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-03 05:10:03 +02:00
Go to file
Sasi Inguva 93db5e3fc4 lavf/mov.c: offset index timestamps by the minimum pts to make first pts zero
If the videos starts with B frame, then the minimum composition time
as computed by stts + ctts will be non-zero. Hence we need to shift
the DTS, so that the first pts is zero. This was the intention of that
code-block. However it was subtracting by the wrong amount.

For example, for one of the videos in the bug nonFormatted.mp4 we have

stts:
sample_count  duration
960           1001

ctts:
sample_count  duration
1             3003
2             0
1             3003
....

The resulting composition times are :  3003, 1001, 2002, 6006, ...

The minimum composition time or PTS is 1001, which should be used to
offset DTS. However the code block was wrongly using ctts[0] which is
3003. Hence the PTS was negative. This change computes the minimum pts
encountered while fixing the index, and then subtracts it from all the
timestamps after the edit list fixes are applied.

Samples files available from:

https://bugs.chromium.org/p/chromium/issues/detail?id=721451
https://bugs.chromium.org/p/chromium/issues/detail?id=723537

fate-suite/h264/twofields_packet.mp4 is a similar file starting with 2
B frames. Before this change the PTS of first two B-frames was -6006
and -3003, and I am guessing one of them got dropped when being decoded
and remuxed  to the framecrc before, and now it is not being dropped.

Signed-off-by: Sasi Inguva <isasi@google.com>
2017-06-09 18:13:33 +02:00
compat compat/cuda: make cuvidGetDecoderCaps optional 2017-06-01 12:39:06 +02:00
doc avfilter/af_sofalizer: switch to libmysofa 2017-06-08 22:02:26 +02:00
ffbuild build: remove --enable-raise-major configure option 2017-05-17 22:52:59 -03:00
libavcodec lavc: add mpeg2 mediacodec decoder 2017-06-08 19:16:09 +02:00
libavdevice Use AVOnce as a static variable consistently 2017-05-22 12:36:32 +02:00
libavfilter vf_colorspace: Add a pixdesc API alias name for bt2020nc color space 2017-06-09 10:44:11 -04:00
libavformat lavf/mov.c: offset index timestamps by the minimum pts to make first pts zero 2017-06-09 18:13:33 +02:00
libavresample Merge commit '92db5083077a8b0f8e1050507671b456fd155125' 2017-05-04 19:59:30 -03:00
libavutil x86inc: Remove argument from WIN64_RESTORE_XMM 2017-06-09 13:43:01 +02:00
libpostproc Merge commit '92db5083077a8b0f8e1050507671b456fd155125' 2017-05-04 19:59:30 -03:00
libswresample Merge commit '92db5083077a8b0f8e1050507671b456fd155125' 2017-05-04 19:59:30 -03:00
libswscale Merge commit '92db5083077a8b0f8e1050507671b456fd155125' 2017-05-04 19:59:30 -03:00
presets
tests lavf/mov.c: offset index timestamps by the minimum pts to make first pts zero 2017-06-09 18:13:33 +02:00
tools tools/target_dec_fuzzer: Move the hwaccel check outside the initialization if 2017-05-29 03:40:47 +02:00
.gitattributes
.gitignore build: add support for building .cu files via nvcc 2017-05-15 11:46:50 +02:00
.travis.yml
Changelog avfilter/af_sofalizer: switch to libmysofa 2017-06-08 22:02:26 +02:00
cmdutils_opencl.c cmdutils_opencl: Fix read of uinitialized cl_mem 2017-05-11 13:02:12 +02:00
cmdutils.c avformat, ffmpeg: deprecate old rotation API 2017-03-27 13:20:27 +02:00
cmdutils.h Merge commit '122de16dd8108a59a55d30543c9f28b5f61b02d1' 2017-05-05 14:04:30 +02:00
configure avfilter/af_sofalizer: switch to libmysofa 2017-06-08 22:02:26 +02:00
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
ffmpeg_cuvid.c
ffmpeg_dxva2.c
ffmpeg_filter.c ffmpeg: check for unconnected outputs 2017-05-05 00:15:15 +02:00
ffmpeg_opt.c ffmpeg: remove bsf extradata propagation hack 2017-05-24 20:28:00 -03:00
ffmpeg_qsv.c
ffmpeg_vaapi.c
ffmpeg_vdpau.c
ffmpeg_videotoolbox.c ffmpeg_videotoolbox: fix usage of av_get_codec_tag_string() 2017-03-29 14:49:29 +02:00
ffmpeg.c ffmpeg: remove bsf extradata propagation hack 2017-05-24 20:28:00 -03:00
ffmpeg.h ffmpeg: remove bsf extradata propagation hack 2017-05-24 20:28:00 -03:00
ffplay.c Merge commit '122de16dd8108a59a55d30543c9f28b5f61b02d1' 2017-05-05 14:04:30 +02:00
ffprobe.c ffprobe: Use pixdesc API to provide color space names 2017-06-05 12:18:27 -04:00
ffserver_config.c
ffserver_config.h
ffserver.c Merge commit '122de16dd8108a59a55d30543c9f28b5f61b02d1' 2017-05-05 14:04:30 +02:00
INSTALL.md
LICENSE.md Merge commit '4fef648d10bf3bcfd4b8fa5755c1128966a2427c' 2017-03-15 22:07:47 +01:00
MAINTAINERS MAINTAINERS: Add Manojkumar Bhosale for MIPS, remove myself. 2017-06-08 01:25:15 +02:00
Makefile build: remove --enable-raise-major configure option 2017-05-17 22:52:59 -03:00
README.md
RELEASE Bump minor versions for master after release/3.3 branchpoint 2017-03-31 13:21:06 +02:00

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides a mean to alter decoded Audio and Video through chain of filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • ffserver is a multimedia streaming server for live broadcasts.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.