Commit Graph

1775 Commits

Author SHA1 Message Date
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
Michael Niedermayer 15f8941108 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Avoid C99 variable declarations within for statements.
  rtmp: Read and handle incoming packets while writing data
  doc: document THREAD_TYPE fate variable
  rtpdec: Don't require frames to start with a Mode A packet
  avconv: don't try to free threads that were not initialized.

Conflicts:
	doc/fate.texi
	ffplay.c
	libavdevice/dv1394.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-15 00:14:21 +02:00
Michael Niedermayer c7b9eab2be Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: Add a new option 'rtmp_buffer', for setting the client buffer time
  rtmp: Set the client buffer time to 3s instead of 0.26s
  rtmp: Handle server bandwidth packets
  rtmp: Display a verbose message when an unknown packet type is received
  lavfi/audio: use av_samples_copy() instead of custom code.
  configure: add all filters hardcoded into avconv to avconv_deps
  avfiltergraph: remove a redundant call to avfilter_get_by_name().
  lavfi: allow building without swscale.
  build: Do not delete tests/vsynth2 directory, which is no longer created.
  lavfi: replace AVFilterContext.input/output_count with nb_inputs/outputs
  lavfi: make AVFilterPad opaque after two major bumps.
  lavfi: add avfilter_pad_get_type() and avfilter_pad_get_name().
  lavfi: make avfilter_get_video_buffer() private on next bump.
  jack: update to new latency range API as the old one has been deprecated
  rtmp: Tokenize the AMF connection parameters manually instead of using strtok_r
  ppc: Rename H.264 optimization template file for consistency.
  lavfi: add channelsplit audio filter.
  golomb: check remaining bits during unary decoding in get_ur_golomb_jpegls()
  sws: fix planar RGB input conversions for 9/10/16 bpp.

Conflicts:
	Changelog
	configure
	doc/APIchanges
	ffmpeg.c
	libavcodec/golomb.h
	libavcodec/v210dec.h
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/asrc_anullsrc.c
	libavfilter/audio.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/avfiltergraph.c
	libavfilter/buffersrc.c
	libavfilter/formats.c
	libavfilter/version.h
	libavfilter/vf_frei0r.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/video.h
	libavfilter/vsrc_color.c
	libavformat/rtmpproto.c
	libswscale/input.c
	tests/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-13 22:43:57 +02:00
Michael Niedermayer dc1c79be1b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avfilter: Log an error if avfilter fails to configure a link.
  avconv: support only native pthreads.
  rtmp: Fix a possible access to invalid memory location when the playpath is too short.

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-12 20:44:57 +02:00
Michael Niedermayer 9ec5e956a2 ffmpeg: disable threading on mingw, it doesnt work due to dependance on internal code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-11 23:31:28 +02:00
Michael Niedermayer 0478d5f9fe ffmpeg: allow overriding framerate for stream copy
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-11 03:00:28 +02:00
Michael Niedermayer 3630a07513 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libmp3lame: add missing layout terminator
  avconv: multithreaded demuxing.
  Bump lavu minor and add an APIChanges entry for audioconvert functions.
  audioconvert: add a function for extracting the channel with the given index
  audioconvert: add a function for getting the name of a single channel.
  audioconvert: add a function for getting channel's index in layout
  audioconvert: use av_popcount64 in av_get_channel_layout_nb_channels
  vf_libopencv: add missing headers.
  iac: add missing dependency

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-10 21:34:15 +02:00
Michael Niedermayer eae983f4ff ffmpeg: fix fate breakage introduced by key=value buffersrc args.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 14:02:27 +02:00
Nicolas George 6fef82f22d ffmpeg: with filter_complex, avoid random in<->out mapping.
With complex filters, an output can come from any input,
or several inputs, including inputs of a different type.
Copying the codec parameters from the first input with
the same type does not make any sense.

This does not change anything for simple 1->1 filters,
as source_index is set in that case.
2012-06-09 08:42:50 +02:00
Nicolas George fbaa8fe6c6 ffmpeg: init icodec.
With complex filter graphs, it can end up accessed
without having been set.
2012-06-09 08:42:50 +02:00
Nicolas George 8362d734a3 ffmpeg: use the frame rate computed by lavfi.
This frame rate is more reliable than the one copied
from the input stream, so it is used in priority.
2012-06-09 08:42:50 +02:00
Nicolas George 5f281e94ba ffmpeg: add frame rate to the buffersrc arguments.
The arguments now use the key=value syntax.
2012-06-09 08:42:50 +02:00
Mike Scheutzow 1be7bfdd2b ffmpeg.c: fix erroneous "Output file is empty" message.
This message is printed whenever the RAWVIDEO codec is used, whether the
output file contains any frames or not. Test command:
./ffmpeg -i infile.y4m outfile.y4m

Signed-off-by: Mike Scheutzow <mjs973@optonline.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-08 18:22:40 +02:00
Nicolas George 25e87fc5f6 ffmpeg: move keyboard interaction in a function.
It makes the transcode loop easier to read (30% less code)
and the differences with avconv easier to spot.
2012-06-07 17:13:02 +02:00
Philip Langdale 92c065f93f ffmpeg: Set duration on encoded subtitle packets.
Currently, we don't set the duration on the packet of a newly
encoded subtitle. This information may be required by the
muxer.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-06 18:49:10 +02:00
Reimar Döffinger 93147daf59 ffmpeg: avoid a confusing and easy to break if().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-06 17:13:28 +02:00
Michael Niedermayer c8a11014b6 ffmpeg: use isatty() before messing with the terminal state
This fixes terminal messup in case of crashes (like in make fate)

Reviewed-by: François Revol <revol@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-06 03:54:02 +02:00
Michael Niedermayer ad60b3b181 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vorbis: Validate that the floor 1 X values contain no duplicates.
  avprobe: Identify codec probe failures rather than calling them unsupported codecs.
  avformat: Probe codecs at score 0 on buffer exhaustion conditions.
  avformat: Factorize codec probing.
  Indeo Audio decoder
  imc: make IMDCT support stereo output
  imc: move channel-specific data into separate context
  lavfi: remove request/poll and drawing functions from public API on next bump
  lavfi: make avfilter_insert_pad and pals private on next bump.
  lavfi: make formats API private on next bump.
  avplay: use buffersrc instead of custom input filter.
  avtools: move buffer management code from avconv to cmdutils.
  avconv: don't use InputStream in the buffer management code.
  avconv: fix exiting when max frames is reached.
  mpc8: fix maximum bands handling
  aacdec: Turn PS off when switching to stereo and turn it to implicit when switching to mono.

Conflicts:
	Changelog
	cmdutils.h
	ffmpeg.c
	ffplay.c
	ffprobe.c
	libavcodec/avcodec.h
	libavcodec/mpc8.c
	libavcodec/v210dec.h
	libavcodec/version.h
	libavcodec/vorbisdec.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersrc.c
	libavfilter/formats.c
	libavfilter/src_movie.c
	libavfilter/vf_aspect.c
	libavfilter/vf_blackframe.c
	libavfilter/vf_boxblur.c
	libavfilter/vf_crop.c
	libavfilter/vf_cropdetect.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawbox.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_fifo.c
	libavfilter/vf_format.c
	libavfilter/vf_frei0r.c
	libavfilter/vf_gradfun.c
	libavfilter/vf_hflip.c
	libavfilter/vf_hqdn3d.c
	libavfilter/vf_libopencv.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_select.c
	libavfilter/vf_showinfo.c
	libavfilter/vf_transpose.c
	libavfilter/vf_unsharp.c
	libavfilter/vf_yadif.c
	libavfilter/vsrc_color.c
	libavfilter/vsrc_testsrc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-06 01:08:33 +02:00
Michael Niedermayer 944d049eaa Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Write chan atom for all audio tracks in mov mode movies.
  mpegtsenc: use avio_open_dyn_buf(), zero pointers after freeing
  doc/avconv: add some details about the transcoding process.
  avidec: make scale and rate unsigned.
  avconv: check output stream recording time before each frame returned from filters
  avconv: split selecting input file out of transcode().
  avconv: split checking for active outputs out of transcode().
  avfiltergraph: make some functions static.

Conflicts:
	ffmpeg.c
	libavfilter/avfiltergraph.c
	libavfilter/internal.h
	libavformat/mpegtsenc.c
	tests/ref/fate/acodec-alac
	tests/ref/fate/acodec-pcm-s16be
	tests/ref/fate/acodec-pcm-s24be
	tests/ref/fate/acodec-pcm-s32be
	tests/ref/fate/acodec-pcm-s8
	tests/ref/lavf/mov

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-04 22:59:32 +02:00
Clément Bœsch df03ae8dd8 ffmpeg: remove two unused variables. 2012-06-04 22:32:26 +02:00
Michael Niedermayer 02ff89a1cd ffmpeg: disable audio volume insertion on the output side.
This fixes -vol leading to 2 inserted volume filters

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-04 15:49:03 +02:00
Clément Bœsch c790ae0265 ffmpeg: add missing return carriage in error message. 2012-06-04 09:10:07 +02:00
Clément Bœsch 6b35f1a2a6 timecode: move timecode muxer options to metadata.
Some demuxers set a timecode in the format or streams metadata. The
muxers now make use of this metadata instead of a duplicated private
option.

This makes possible transparent copy of the timecode when transmuxing
and transcoding.

-timecode option for MPEG1/2 codec is also renamed to -gop_timecode. The
global ffmpeg -timecode option will set it anyway so no option change
visible for the user.
2012-06-04 07:41:22 +02:00
Stefano Sabatini f1add01d98 ffmpeg: be more verbose when printing an error in transcode()
Helps debuggability.
2012-06-04 00:55:08 +02:00
Stefano Sabatini 6a9854e8f4 ffmpeg: specify more meaningful names for the lavfi buffer sources 2012-06-04 00:55:02 +02:00
Nicolas George 8b0e173529 ffmpeg: use filter time base as codec time base. 2012-06-03 23:43:57 +02:00
Nicolas George 48b5bcb3dd ffmpeg: avoid NULL dereference with filters.
icodec can be NULL if there is no input stream
clearly associated with the output stream.
2012-06-03 23:43:57 +02:00