Commit Graph

88 Commits

Author SHA1 Message Date
Michael Niedermayer 3adb5f8d8b Merge commit 'd9ae1031f5edbd25c8526b4cb51aba66d3bee931'
* commit 'd9ae1031f5edbd25c8526b4cb51aba66d3bee931':
  lavf: improve handling of sparse streams when muxing

Conflicts:
	doc/APIchanges
	libavformat/avformat.h
	libavformat/mux.c
	libavformat/options_table.h
	libavformat/version.h

See: 37ed5df5c5
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-05 03:19:22 +01:00
Luca Barbato d9ae1031f5 lavf: improve handling of sparse streams when muxing
Currently ff_interleave_packet_per_dts() waits until it gets a frame for
each stream before outputting packets in interleaved order.

Sparse streams (i.e. streams with much fewer packets than the other
streams, like subtitles or audio with DTX) tend to add up latency and in
specific cases end up allocating a large amount of memory.

Emit the top packet from the packet_buffer if it has a time delta
larger than a specified threshold.

Original report of the issue and initial proposed solution by
mus.svz@gmail.com.

Bug-id: 31
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-02-04 22:01:42 +01:00
Stefano Sabatini 5871ee5072 lavf: add output_ts_offset option to AVFormatContext
This option can be generally useful to set an output offset, needed when
setting an absolute index in the output.
2014-02-02 13:16:17 +01:00
James Darnley 86bee7984e AVFormatContext: add metadata_header_padding field
This field is used to store the number of bytes that should be written
as padding to a metadata header of a file.  For example:
 - The FLAC format's METADATA_BLOCK_PADDING [1]
 - The ID3v2 tag format's padding           [2]

[1] http://xiph.org/flac/format.html#metadata_block_padding
[2] http://id3.org/id3v2.3.0#ID3v2_overview

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 22:33:21 +01:00
Michael Niedermayer 2ef1e62c8d correct the AVOption documentation for AV_EF_CAREFUL
The flag was and is intended to be a sane default and thus does not enable
time consuming checks. This also matches how the flag is used in decoders and
demuxers.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-27 20:03:08 +01:00
Michael Niedermayer 7703d19c40 lavf/options_table: improve option help text
Contains text suggested by carl

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 19:47:58 +02:00
Michael Niedermayer 96e6447d62 Merge commit '596e5d4783ca951258a7c580951fd161f1785ec1'
* commit '596e5d4783ca951258a7c580951fd161f1785ec1':
  lavf: Add a flag to enable/disable per-packet flushing

Conflicts:
	libavformat/avformat.h
	libavformat/mux.c
	libavformat/version.h

This adds a 2nd API to set per packet flushing
If the user application indicates through either a non default then this non default takes
precedence over the other still default value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 12:01:35 +02:00
Luca Barbato 596e5d4783 lavf: Add a flag to enable/disable per-packet flushing
This is enabled by default and can be disabled with
"-fflags -flush_packets".

Inspired by a patch from Nicolas George <nicolas.george@normalesup.org>.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 22:11:08 +03:00
Michael Niedermayer a8e963835a Merge commit 'b5a138652ff8a5b987d3e1191e67fd9f6575527e'
* commit 'b5a138652ff8a5b987d3e1191e67fd9f6575527e':
  Give less generic names to global library option arrays

Conflicts:
	libavcodec/options_table.h
	libavfilter/avfilter.c
	libavformat/options_table.h
	libswscale/options.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 09:16:36 +02:00
Diego Biurrun b5a138652f Give less generic names to global library option arrays 2013-08-02 19:19:02 +02:00
Stefano Sabatini d06ae0d791 lavf: fix documentation for avoid_negative_ts
Prefer "non-negative" over "positive", the former is more accurate.
2013-07-05 00:58:03 +02:00
Timothy Gu a9bbf59be7 cosmetics: Fix "dont" "wont" "doesnt" typos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-29 02:31:16 +02:00
Nicolas George 4f112a8e34 lavf/mux: add the flush_packets option.
Note: a lot of muxers already do the flushing explicitly.
2013-03-24 23:19:07 +01:00
Michael Niedermayer a8e748eee5 lavf: add seek2any to allow forcing seeking to non keyframes via AVOptions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-07 21:54:41 +01:00
Stefano Sabatini 98247e3368 lavf: clarify/extend documentation for AVFormatContext::analyzeduration
"analyzeduration" is not used to detect the input duration, but to
specify the max probe data duration. Fix option description and related
doc entry accordingly.
2013-01-13 15:09:09 +01:00
Michael Niedermayer 94ecbe23c5 Merge commit 'c35f0e8495e34c2082dcde805e9323c9f6a4cb0a'
* commit 'c35f0e8495e34c2082dcde805e9323c9f6a4cb0a':
  au: Reorder code so that both muxer and demuxer are under #ifdefs
  fate: Move RALF test into lossless audio group
  cosmetics: Use consistent names for multiple inclusion guards.

Conflicts:
	libavformat/au.c
	tests/fate/lossless-audio.mak
	tests/fate/real.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-18 14:27:59 +01:00
Diego Biurrun 81c7c817a4 cosmetics: Use consistent names for multiple inclusion guards. 2012-12-17 17:02:22 +01:00
Harald Axmann 2d74dea84f lavf: Provide a monotonic timestamp to the outside world
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-15 21:28:45 +01:00
Reimar Döffinger 8ee14aa5c7 lavf: improve avoid_negative_ts help text
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-08 13:30:43 +01:00
Michael Niedermayer 892750b07b fix tipo
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 22:59:21 +01:00
Michael Niedermayer 656500c503 lavf: improve help text for avoid_negative_ts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 22:06:40 +01:00
Carl Eugen Hoyos d513fb1c75 Add -skip_initial_bytes option.
Fixes ticket #1909.
2012-11-20 22:04:14 +01:00
Michael Niedermayer 3ba0dab76a lavf: Add support offset timestamps on muxing.
This allows avoiding negative timestamps.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-26 15:55:16 +02:00
Michael Niedermayer d46c1c72e4 Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9'
* commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9':
  avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member

Conflicts:
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libx264.c
	libavcodec/mpeg12enc.c
	libavcodec/options_table.h
	libavcodec/snowenc.c
	libavcodec/tiffenc.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/af_asyncts.c
	libavfilter/af_join.c
	libavfilter/buffersrc.c
	libavfilter/src_movie.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawtext.c
	libavformat/http.c
	libavformat/img2dec.c
	libavformat/img2enc.c
	libavformat/movenc.c
	libavformat/mpegenc.c
	libavformat/mpegtsenc.c
	libavformat/options_table.h
	libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:33:32 +02:00
Michael Niedermayer 99de3df3d3 Merge commit 'd58dd4b5b5d31cfd4092e38a5f2c894eee2ab078'
* commit 'd58dd4b5b5d31cfd4092e38a5f2c894eee2ab078':
  avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member

Conflicts:
	libavcodec/libvpxenc.c
	libavcodec/options_table.h
	libavfilter/vf_drawtext.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:09:09 +02:00
Michael Niedermayer d5f65e9d40 Merge commit '124134e42455763b28cc346fed1d07017a76e84e'
* commit '124134e42455763b28cc346fed1d07017a76e84e':
  avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member

Conflicts:
	libavcodec/aacenc.c
	libavcodec/libopenjpegenc.c
	libavcodec/options_table.h
	libavdevice/bktr.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/vf_drawtext.c
	libavformat/movenc.c
	libavformat/options_table.h
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 13:58:11 +02:00
Martin Storsjö e6153f173a avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:44 +03:00
Martin Storsjö d58dd4b5b5 avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:38 +03:00
Martin Storsjö 124134e424 avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:32 +03:00
Michael Niedermayer 28ff17fa97 lavf: add use_wallclock_as_timestamps
This may fix Ticket730

Reviewed-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-18 19:19:47 +02:00
Michael Niedermayer 7c26761b81 Merge commit 'fe1c1198e670242f3cf9e3e1eef27cff77f3ee23'
* commit 'fe1c1198e670242f3cf9e3e1eef27cff77f3ee23':
  lavf: use dts difference instead of AVPacket.duration in find_stream_info()
  avf: introduce nobuffer option
  fate: make yadif tests consistent across systems
  vf_hqdn3d: support 9 and 10bit colordepth
  vf_hqdn3d: reduce intermediate precision
  vf_hqdn3d: simplify and optimize
  factor identical ff_inplace_start_frame out of two filters
  vf_hqdn3d: cosmetics
  avprobe/avconv: fix tentative declaration compile errors on MSVS.

Conflicts:
	doc/APIchanges
	ffmpeg.c
	ffprobe.c
	libavformat/avformat.h
	libavformat/options_table.h
	libavformat/utils.c
	libavformat/version.h
	tests/fate/filter.mak
	tests/ref/fate/filter-yadif-mode0
	tests/ref/fate/filter-yadif-mode1

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-29 23:04:49 +02:00
Luca Barbato 681ed00099 avf: introduce nobuffer option
Useful in cases where a significant analyzeduration is
still needed, while minimizing buffering before output.

An example is processing low-latency streams where all
media types won't necessarily come in if the
analyzeduration is small.

Additional changes by Josh Allmann <joshua.allmann@gmail.com>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-07-29 07:58:00 +02:00
Michael Niedermayer 61930bd0d7 Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  libxvid: Give more suitable names to libxvid-related files.
  libxvid: Separate libxvid encoder from libxvid rate control code.
  jpeglsdec: Remove write-only variable in ff_jpegls_decode_lse().
  fate: cosmetics: lowercase some comments
  fate: Give more consistent names to some RealVideo/RealAudio tests.
  lavfi: add avfilter_get_audio_buffer_ref_from_arrays().
  lavfi: add extended_data to AVFilterBuffer.
  lavc: check that extended_data is properly set in avcodec_encode_audio2().
  lavc: pad last audio frame with silence when needed.
  samplefmt: add a function for filling a buffer with silence.
  samplefmt: add a function for copying audio samples.
  lavr: do not try to copy to uninitialized output audio data.
  lavr: make avresample_read() with NULL output discard samples.
  fate: split idroq audio and video into separate tests
  fate: improve dependencies
  fate: add convenient shorthands for ea-vp6, libavcodec, libavutil tests
  fate: split some combined tests into separate audio and video tests
  fate: fix dependencies for probe tests
  mips: intreadwrite: fix inline asm for gcc 4.8
  mips: intreadwrite: remove unnecessary inline asm
  ...

Conflicts:
	cmdutils.h
	configure
	doc/APIchanges
	doc/filters.texi
	ffmpeg.c
	ffplay.c
	libavcodec/internal.h
	libavcodec/jpeglsdec.c
	libavcodec/libschroedingerdec.c
	libavcodec/libxvid.c
	libavcodec/libxvid_rc.c
	libavcodec/utils.c
	libavcodec/version.h
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersink.h
	tests/Makefile
	tests/fate/aac.mak
	tests/fate/audio.mak
	tests/fate/demux.mak
	tests/fate/ea.mak
	tests/fate/image.mak
	tests/fate/libavutil.mak
	tests/fate/lossless-audio.mak
	tests/fate/lossless-video.mak
	tests/fate/microsoft.mak
	tests/fate/qt.mak
	tests/fate/real.mak
	tests/fate/screen.mak
	tests/fate/video.mak
	tests/fate/voice.mak
	tests/fate/vqf.mak
	tests/ref/fate/ea-mad
	tests/ref/fate/ea-tqi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-10 02:25:41 +02:00
Alex Converse 40f81769ae options_table: Add some missing #includes to fix "make checkheaders".
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-08 20:05:20 +02:00
Reimar Döffinger a45605a1ba Add AVIO_FLAG_DIRECT.
Allows avoiding the buffer when using avio read, write and seek functions.
When using the ffmpeg executable -avioflags direct can be used to enable
this mode for input files, but has no effect on output files.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-04 20:39:33 +02:00
Michael Niedermayer 0ebd83617f Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  avconv: free packet in write_frame() when discarding due to frame number limit
  FATE: use +/- flag option syntax for vp8 emu-edge tests
  lavf: make av_interleave_packet_per_dts() private.
  lavf: deprecate av_read_packet().
  oggdec: output correct timestamps for Vorbis
  avconv: pass input stream timestamps to audio encoders
  lavc: shrink encoded audio packet size after encoding.
  xa: set correct bit rate
  xa: do not set bit_rate, block_align, or bits_per_coded_sample
  xa: fix end-of-file handling
  xa: fix timestamp calculation
  bink: fix typo in FFALIGN() argument
  bink: align plane width to 8 when calculating bundle sizes
  doc: pass -Idoc texi2html and texi2pod
  doc: texi2pod: add -I flag
  movenc: Add a min_frag_duration option
  rtsp: Set the default delay to 0.1 s for the RTSP/SDP/RTP demuxers
  libavformat: Set the default for the max_delay option to -1
  Generate manpages for AV{Format,Codec}Context AVOptions.
  doc/avconv: remove entries for AVOptions.
  ...

Conflicts:
	doc/Makefile
	doc/ffmpeg.texi
	doc/muxers.texi
	ffmpeg.c
	libavcodec/Makefile
	libavcodec/options.c
	libavcodec/vp8.c
	libavformat/options.c
	tests/fate/demux.mak
	tests/ref/fate/truemotion1-15
	tests/ref/fate/truemotion1-24

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-21 01:33:53 +01:00
Martin Storsjö 4fa57d524f libavformat: Set the default for the max_delay option to -1
Make the muxers/demuxers that use the field handle the default
-1 in the same way as 0.

This allows distinguishing an intentionally set 0 from the default
value where the user hasn't set it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-20 10:53:47 +02:00
Anton Khirnov 5626697104 Move AVFormatContext/AVCodecContext option tables to separate files.
This will allow us to automatically generate manpages for them.
2012-03-20 07:09:18 +01:00