Commit Graph

1801 Commits

Author SHA1 Message Date
Michael Niedermayer
cbb2c95e47 ffmpeg: init simple filter graph before trying to extract framerate from its output.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-30 14:17:10 +02:00
Michael Niedermayer
7d1918affe Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flvdec: remove spurious use of stream id
  lavf: deprecate r_frame_rate.
  lavf: round estimated average fps to a "standard" fps.

Conflicts:
	ffmpeg.c
	ffprobe.c
	libavformat/avformat.h
	libavformat/electronicarts.c
	libavformat/flvdec.c
	libavformat/rawdec.c
	libavformat/utils.c
	tests/ref/fate/iv8-demux

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-30 00:56:33 +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
Michael Niedermayer
3adc9c9996 ffmpeg: allow using the r_frame_rate as fundamental timebase for stream copy in avi
Fixes Ticket1434

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-28 17:43:14 +02:00
Michael Niedermayer
157f956973 ffmpeg: add code to perform ts wrap correction
Fixes ticket1385

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-28 17:05:24 +02:00
Michael Niedermayer
f5a5b4344b ffmpeg: doxyfy some comments and mention the timebase used in various timestamp fields.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-26 17:58:26 +02:00
Michael Niedermayer
1a7af514de ffmpeg: move decoded_frame->pts computation together
This clarifies the code.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-26 17:57:36 +02:00
Michael Niedermayer
c76a5365bb ffmpeg: Fix rounding errors in decoded_frame->pts computation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-26 17:56:52 +02:00
Michael Niedermayer
9b1fdb1c5a ffmpeg: fix assumed decoded_frame->pts timebase
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-26 17:56:07 +02:00
Michael Niedermayer
b616405c16 ffmpeg: reset decoded_frame->pts after rescaling.
This ensures its not used afterwards.
This commit should not change anything as it should not have been used afterwards.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-26 17:51:56 +02:00
Michael Niedermayer
55fa883b30 ffmpeg: fix units of next_?ts in debug printing routine.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-26 17:12:07 +02:00
Nicolas George
6bf87785e8 ffmpeg: warn about new streams after startup. 2012-07-26 00:30:38 +02:00
Nicolas George
3ccf22c64a ffmpeg: keep packet/frame availability in global structures.
This replaces the use of the no_packet and no_frame arrays.
2012-07-24 19:14:10 +02:00
Nicolas George
1cadab6023 ffmpeg: select input file based on output time.
Filters can change the timings, so input files must not
necessarily be read at the same rythm. This patch select
the input file to read based on the timestamp at output
instead of input. With complex filter graphs, finding the
input for a given output is done by making a request and
checking to what buffer source it has been forwarded.
2012-07-23 10:59:41 +02:00
Nicolas George
bf8ce5a5c3 ffmpeg: probe buffersinks once more after EOF.
Reap buffers stored in the buffer sinks even when
the avfilter_graph_request_oldest() loop only returns EOF.

avfilter_graph_request_oldest() can cause frames to arrive
to the sinks even when it returns EOF.
2012-07-20 10:18:45 +02:00
Nicolas George
d853ed46b1 Revert "ffmpeg: set pkt_timebase"
This reverts commit 744bd8d08c.

pkt_timebase is now set by av_codec_set_pkt_timebase.
If some demuxer set AVStream.time_base directly,
it need to be fixed. There is a warning to detect it.
2012-07-19 23:41:03 +02:00
Nicolas George
0fe8acf2d6 ffmpeg: add -(no)stdin option.
Allows to disable interaction from standard input.
Useful, for example, if ffmpeg is in the background process group.
Roughly the same result can be achieved with "ffmpeg ... < /dev/null"
but it requires a shell.
2012-07-19 16:33:02 +02:00
Nicolas George
52ab418588 ffmpeg: invert using_stdin and rename accordingly.
There are other reasons not to use stdin than having it as an input.
2012-07-19 16:32:45 +02:00
Michael Niedermayer
dece4f4693 ffmpeg: revert 3ba90d9 (cosmetics to reduce difference to qatar by about 90 lines)
This commit caused Ticket1490 (Infinity loop / lock in export image)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-18 16:35:38 +02:00
Michael Niedermayer
56ae5926f7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libopenjpeg: introduce encoding support
  libopenjpeg: rename decoder source file.
  RTMPTS protocol support
  RTMPS protocol support
  avconv: print an error message when demuxing fails.
  tscc2: DCT output should not be clipped
  rtmp: Rename rtmphttp to ffrtmphttp

Conflicts:
	Changelog
	configure
	doc/general.texi
	libavcodec/libopenjpegenc.c
	libavcodec/version.h
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-18 01:27:19 +02:00
Michael Niedermayer
5dba4cbc2f ffmpeg: fix streamcopy of some mp3 in avi
Fixes Ticket1432

Thanks-to: Mike Scheutzow <mike.scheutzow@alcatel-lucent.com> for some of the bug analysis
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-16 16:56:03 +02:00
Nicolas George
7b521c52c4 ffmpeg: add -progress option.
It allows to send program-friendly (easy to parse)
progress information to a file or an URL.
2012-07-14 14:51:18 +02:00
Michael Niedermayer
825e1e2437 ffmpeg: use pkt_pts before pkt->pts for audio
This fixes the timestamp of the first packet when samples have been skiped.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-14 04:24:40 +02:00
Michael Niedermayer
744bd8d08c ffmpeg: set pkt_timebase
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-14 04:24:00 +02:00
Michael Niedermayer
1cef5a0196 ffmpeg: fix type of av_log() argument
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-13 16:24:32 +02:00
Robert Krüger
c916af995d add output for frame timestamps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-12 20:18:03 +02:00
Nicolas George
5997285d3a ffmpeg: poll filters even after -t limit.
If not, frames can still arrive to the sink and accumulate.
The frames past recording time will be ignored in do_*_out.
2012-07-06 18:33:48 +02:00
Michael Niedermayer
24823a761c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  qdm2: remove broken and disabled dump_context() debug function
  x86: h264_intrapred: use newly introduced SPLAT* and PSHUFLW macros
  x86inc: add SPLATB_LOAD, SPLATB_REG, PSHUFLW macros
  x86inc: modify ALIGN to not generate long nops on i586
  x86: h264_intrapred: port to cpuflag macros
  avplay: update input filter pointer when the filtergraph is reset.
  avconv: fix parsing of -force_key_frames option.
  h264: use templates to avoid excessive inlining
  xtea: Make the count parameter match the documentation
  blowfish: Make the count parameter match the documentation
  mpegvideo: Don't use ff_mspel_motion() for vc1
  xtea: invert branch and loop precedence
  blowfish: invert branch and loop precedence
  flvdec: optionally trust the metadata
  avconv: Set audio filter time base to the sample rate
  vp8: Add ifdef guards around the sse2 loopfilter in the sse2slow branch too

Conflicts:
	ffmpeg.c
	ffplay.c
	libavcodec/h264.c
	libavcodec/mpegvideo_common.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-05 21:55:31 +02:00
Nicolas George
2fc354f90d ffmpeg: rework checks for the -t option.
This commit is based on libav's implementation and
makes sure to compare output timestamps together.
It also reduces the differences with avconv.

The changes to the test reference files are caused
by an additional packet at the end, the timestamp
of the frame encoded by this packet is always
strictly below the limit stated by the -t option.
2012-07-04 16:20:47 +02:00
Michael Niedermayer
df3a96c497 ffmpeg: Add sanity check on frame duplication
This prevents long loops and OOM in case of damaged timestamps in some
cases

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-04 04:17:00 +02:00
Michael Niedermayer
64b25938e9 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dsputilenc_mmx: split assignment of ff_sse16_sse2 to SSE2 section.
  dnxhdenc: add space between function argument type and comment.
  x86: fmtconvert: add special asm for float_to_int16_interleave_misc_*
  attributes: Add a definition of av_always_inline for MSVC
  cmdutils: Pass the actual chosen encoder to filter_codec_opts
  os_support: Add fallback definitions for stat flags
  os_support: Rename the poll fallback function to ff_poll
  network: Check for struct pollfd
  os_support: Don't compare a negative number against socket descriptors
  os_support: Include all the necessary headers for the win32 open function
  x86: vc1: fix and enable optimised loop filter

Conflicts:
	cmdutils.c
	cmdutils.h
	ffmpeg.c
	ffplay.c
	libavformat/os_support.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-30 22:44:18 +02:00
Nicolas George
be24f85176 ffmpeg: re-set frame_size after filter graph reset.
The filter contexts are completely cleared,
so the frame size can not be kept.
2012-06-30 21:44:25 +02:00
Nicolas George
6f5e7e8690 ffmpeg: use the more powerful version of abuffersink. 2012-06-30 14:03:54 +02:00
Nicolas George
20a8dca57f ffmpeg: fix parsing of -force_key_frames option.
Identical to commit 4f6a1c9 by Reimar Döffinger,
that was lost after the merge of 19ad567.
2012-06-30 13:49:43 +02:00
Clément Bœsch
f926d91611 ffmpeg: fix a memleak in subtitles decoding. 2012-06-29 19:13:24 +02:00
Nicolas George
8069db8633 ffmpeg: warn that -t does not work with -filter_complex. 2012-06-28 21:40:50 +02:00
Nicolas George
2c793b8501 ffmpeg: warn when -t is used for inputs.
Using -t on an input already have surprising results.
Furthermore, using it on an input or an output makes
a real difference if there are speed-altering filters.

Implementing -t for inputs will probably result in some
behavour changes.
2012-06-28 21:40:43 +02:00
Michael Niedermayer
e377208d43 ffmpeg: dont copy creation_time as the destination file is not created at that time
Fixes Ticket1439

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-28 17:09:36 +02:00
Michael Niedermayer
b536e2facf Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: add an assert to silence an uninitialized variable warning.
  avconv: shut up an uninitialized variable warning.
  avfiltergraph: shut up uninitialized variable warning.
  af_join: initialize a variable to shut up gcc warning.
  amix: fix format specifier for AVFilterLink.sample_rate.
  lavfi: make filters less verbose.
  mpc8: read APE tags.
  lavr: x86: fix ff_conv_fltp_to_flt_6ch function prototypes
  libm: provide fallback definition for cbrtf() using powf()
  network: Don't redefine error codes if they already exist in errno.h
  configure: Check for sys/time.h
  network: Include unistd.h from network.h
  avconv: don't include vsrc_buffer.h, which doesn't exist anymore
  lavfi: reorder AVFilterLink fields.
  lavfi: reorder AVFilterContext fields.
  lavfi: reorder AVFilter fields.
  lavfi: reorder AVFilterBufferRef fields.
  lavfi: reorder AVFilterBuffer fields.

Conflicts:
	configure
	libavcodec/v210dec.h
	libavfilter/asrc_anullsrc.c
	libavfilter/avfilter.h
	libavfilter/buffersrc.c
	libavfilter/src_movie.c
	libavfilter/vf_aspect.c
	libavfilter/vf_crop.c
	libavfilter/vf_drawbox.c
	libavfilter/vf_fade.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vsrc_color.c
	libavformat/network.h
	libavutil/libm.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-27 01:58:09 +02:00
Michael Niedermayer
052f4f859c Merge commit 'a5e8c41c28f907d98d2a739db08f7aef4cbfcf3a'
* commit 'a5e8c41c28f907d98d2a739db08f7aef4cbfcf3a':
  lavfi: remove 'opaque' parameter from AVFilter.init()
  mov: do not try to read total disc/track number if data atom is too short.
  avconv: fix -force_key_frames
  dxva2_h264: fix signaling of mbaff frames
  x86: fft: elf64: fix PIC build

Conflicts:
	ffmpeg.c
	libavcodec/v210dec.h
	libavfilter/asrc_anullsrc.c
	libavfilter/buffersrc.c
	libavfilter/src_movie.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_overlay.c
	libavfilter/vsrc_color.c
	libavfilter/vsrc_testsrc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-26 23:57:07 +02:00
Stefano Sabatini
43583fb85c lavfi/avcodec: deprecate avfilter_fill_frame_from_*_buffer_ref API
Deprecate functions:
avfilter_fill_frame_from_buffer_ref
avfilter_fill_frame_from_audio_buffer_ref
avfilter_fill_frame_from_video_buffer_ref

and schedule to drop them at the next API major bump.

The function avfilter_copy_buf_props() should be used instead.
2012-06-25 13:42:47 +02:00
Michael Niedermayer
244682dd08 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  log: Only include unistd.h if configure found it
  ape: create audio stream before reading tags.
  mov: make a length variable larger.
  image2: Add "start_number" private option to the demuxer
  image2: Add "start_number" private option to the muxer
  avconv: remove a forgotten debugging printf.
  avconv: use more descriptive names for hardcoded filters.
  avconv: remove redundant handling of async.
  doc/filters: fix typo.
  h264: use asm cabac reader under a generic condition

Conflicts:
	ffmpeg.c
	libavformat/img2dec.c
	libavformat/img2enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-24 21:34:54 +02:00
Michael Niedermayer
fbf03ee391 ffmpeg: fix indent of 1 line
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-24 14:16:45 +02:00
Michael Niedermayer
da728d5d2e ffmpeg: fix FF_API_OLD_VSINK_API=0 case
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-24 02:05:57 +02:00
Michael Niedermayer
caf7381d50 ffmpeg: fix mixup of old and new sinks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-24 02:05:56 +02:00
Michael Niedermayer
e847f41285 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libspeexenc: add supported sample rates and channel layouts.
  Replace usleep() calls with av_usleep()
  lavu: add av_usleep() function
  utvideo: mark interlaced frames as such
  utvideo: Fix interlaced prediction for RGB utvideo.
  cosmetics: do not use full path for local headers
  lavu/file: include unistd.h only when available
  configure: check for unistd.h
  log: include unistd.h only when needed
  lavf: include libavutil/time.h instead of redeclaring av_gettime()

Conflicts:
	configure
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	libavcodec/utvideo.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-22 22:34:02 +02:00
Clément Bœsch
492cc9bcc4 ffmpeg: remove unused buffer_size in InputFile. 2012-06-22 22:13:22 +02:00
Michael Niedermayer
2fa5d8f234 ffmpeg: print swr options in --help too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-22 03:43:29 +02:00
Michael Niedermayer
4da42ebe44 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  MS Screen 1 decoder
  aacdec: Fix popping channel layouts.
  av_gettime: support Win32 without gettimeofday()
  Use av_gettime() in various places
  Move av_gettime() to libavutil
  dct-test: use emms_c() from libavutil instead of duplicating it
  mov: fix operator precedence bug
  mathematics.h: remove a couple of math defines
  Remove unnecessary inclusions of [sys/]time.h
  lavf: remove unnecessary inclusions of unistd.h
  bfin: libswscale: add const where appropriate to fix warnings
  bfin: libswscale: remove unnecessary #includes
  udp: Properly check for invalid sockets
  tcp: Check the return value from getsockopt
  network: Use av_strerror for getting error messages
  udp: Properly print error from getnameinfo
  mmst: Use AVUNERROR() to convert error codes to the right range for strerror
  network: Pass pointers of the right type to get/setsockopt/ioctlsocket on windows
  rtmp: Reduce the number of idle posts sent by sleeping 50ms

Conflicts:
	Changelog
	configure
	libavcodec/aacdec.c
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/dct-test.c
	libavcodec/version.h
	libavformat/riff.c
	libavformat/udp.c
	libavutil/Makefile
	libswscale/bfin/yuv2rgb_bfin.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-20 20:47:46 +02:00
Nicolas George
8c3514647e ffmpeg.c: count subtitles in total size.
This avoids the "Output file is empty" warning
with subtitles-only files.
2012-06-18 09:40:01 +02:00