Commit Graph

1632 Commits

Author SHA1 Message Date
Nicolas Noirbent c949d5b15d ffmpeg.c: transcode_video(): do not go through filter network if encoding is not required
This fixes a segmentation fault when doing a transcoding and a stream
copy of the same input stream at the same time, e.g.:

ffmpeg -i in.mkv -c:v mpeg2video transcode.m2v -c copy copy.ts

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-13 15:57:34 +01:00
Stefano Sabatini 7efc6f2932 ffmpeg: clarify error message in case of bitstream filter opening failure 2012-01-13 15:51:24 +01:00
Michael Niedermayer b18e17eabf Merge remote-tracking branch 'qatar/master'
* qatar/master: (21 commits)
  utils: Check for extradata size overflows.
  ARM: rv34: fix asm syntax in dc transform functions
  avio: Fix the value of the deprecated URL_FLAG_NONBLOCK
  rv34: fix and optimise frame dependency checking
  rv34: NEON optimised dc only inverse transform
  avprobe: use avio_size() instead of deprecated AVFormatContext.file_size.
  ffmenc: remove references to deprecated AVFormatContext.timestamp.
  lavf: undeprecate read_seek().
  avserver: remove code using deprecated CODEC_CAP_PARSE_ONLY.
  lavc: replace some remaining FF_I_TYPE with AV_PICTURE_TYPE_I
  lavc: ifdef out parse_only AVOption
  nellymoserdec: SAMPLE_FMT -> AV_SAMPLE_FMT
  mpegvideo_enc: ifdef out/replace references to deprecated codec flags.
  riff: remove references to sonic codec ids
  indeo4: add some missing static and const qualifiers
  rv34: DC-only inverse transform
  avconv: use AVFrame.width/height/format instead of corresponding AVCodecContext fields
  lavfi: move version macros to a new installed header version.h
  vsrc_buffer: release the buffer on uninit.
  rgb2rgb: rgb12tobgr12()
  ...

Conflicts:
	avconv.c
	doc/APIchanges
	ffprobe.c
	libavfilter/Makefile
	libavfilter/avfilter.h
	libswscale/rgb2rgb.c
	libswscale/rgb2rgb.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-13 01:29:48 +01:00
Michael Niedermayer 0e7fc3cafe Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  rv34: frame-level multi-threading
  mpegvideo: claim ownership of referenced pictures
  aacsbr: prevent out of bounds memcpy().
  ipmovie: fix pts for CODEC_ID_INTERPLAY_DPCM
  sierravmd: fix audio pts
  bethsoftvideo: Use bytestream2 functions to prevent buffer overreads.
  bmpenc: support for PIX_FMT_RGB444
  swscale: fix crash in fast_bilinear code when compiled with -mred-zone.
  swscale: specify register type.
  rv34: use get_bits_left()
  avconv: reinitialize the filtergraph on resolution change.
  vsrc_buffer: error on changing frame parameters.
  avconv: fix -copyinkf.
  fate: Update file checksums after the mov muxer change in a78dbada55
  movenc: Don't store a nonzero creation time if nothing was set by the caller
  bmpdec: support for rgb444 with bitfields compression
  rgb2rgb: allow conversion for <15 bpp
  doc: fix stray reference to FFmpeg
  v4l2: use C99 struct initializer
  v4l2: poll the file descriptor
  ...

Conflicts:
	avconv.c
	libavcodec/aacsbr.c
	libavcodec/bethsoftvideo.c
	libavcodec/kmvc.c
	libavdevice/v4l2.c
	libavfilter/vsrc_buffer.c
	libswscale/swscale_unscaled.c
	libswscale/x86/input.asm
	tests/ref/acodec/alac
	tests/ref/acodec/pcm_s16be
	tests/ref/acodec/pcm_s24be
	tests/ref/acodec/pcm_s32be
	tests/ref/acodec/pcm_s8
	tests/ref/lavf/mov
	tests/ref/vsynth1/dnxhd_1080i
	tests/ref/vsynth1/mpeg4
	tests/ref/vsynth1/qtrle
	tests/ref/vsynth1/svq1
	tests/ref/vsynth2/dnxhd_1080i
	tests/ref/vsynth2/mpeg4
	tests/ref/vsynth2/qtrle
	tests/ref/vsynth2/svq1

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-11 02:44:43 +01:00
Marton Balint 741aca7936 libswresample: introduce int swr_set_compensation() instead of void swr_compensate()
The new version returns AVERROR(EINVAL) is the specified paramters are invalid,
and also creates the resampler if none was used so far.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-09 04:16:06 +01:00
Stefano Sabatini ceef1ee767 cmdutils: make show_usage() use av_log()
Avoid printing on stdout when show_usage is used in an error message.
2012-01-07 11:02:13 +01:00
Oana Stratulat 44cc1936be ffmpeg: Fix segfault with zzufed 4xm file.
Fixes ticket 885

Signed-off-by: Oana Stratulat <oanaandreeastratulat@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-07 02:46:30 +01:00
Oana Stratulat ee4d43ef7a ffmpeg: check if number of input and output channels are valid.
Fix Ticket887.
2012-01-06 02:05:50 +01:00
Michael Niedermayer 7f83db3124 Merge remote-tracking branch 'qatar/master'
* qatar/master: (46 commits)
  mtv: Make sure audio_subsegments is not 0
  v4l2: use V4L2_FMT_FLAG_EMULATED only if it is defined
  avconv: add symbolic names for -vsync parameters
  flvdec: Fix compiler warning for uninitialized variables
  rtsp: Fix compiler warning for uninitialized variable
  ulti: convert to new bytestream API.
  swscale: Use standard multiple inclusion guards in ppc/ header files.
  Place some START_TIMER invocations in separate blocks.
  v4l2: list available formats
  v4l2: set the proper codec_tag
  v4l2: refactor device_open
  v4l2: simplify away io_method
  v4l2: cosmetics
  v4l2: uniform and format options
  v4l2: do not force interlaced mode
  avio: exit early in fill_buffer without read_packet
  vc1dec: fix invalid memory access for small video dimensions
  rv34: fix invalid memory access for small video dimensions
  rv34: joint coefficient decoding and dequantization
  avplay: Don't call avio_set_interrupt_cb(NULL)
  ...

Conflicts:
	Changelog
	avconv.c
	doc/APIchanges
	doc/indevs.texi
	libavcodec/adxenc.c
	libavcodec/dnxhdenc.c
	libavcodec/h264.c
	libavdevice/v4l2.c
	libavformat/flvdec.c
	libavformat/mtv.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-05 02:03:12 +01:00
Jean First 12bdc7b15e ffmpeg: fix compiler warning for uninitialized variables
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 03:24:18 +01:00
Jean First 535705a489 ffmpeg: use avformat_close_input instead of av_close_input_file
Signed-off-by: Jean First <jeanfirst@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 03:19:03 +01:00
Michael Niedermayer 7d8f115843 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegenc: use avctx->slices as number of slices
  v410enc: fix undefined signed left shift caused by integer promotion
  Release notes: mention cleaned up header includes
  fix Changelog file
  Fix a bunch of typos.
  Drop some pointless void* return value casts from av_malloc() invocations.
  wavpack: fix typos in previous cosmetic clean-up commit
  wavpack: cosmetics: K&R pretty-printing
  avconv: remove the 'codec framerate is different from stream' warning
  wavpack: determine sample_fmt before requesting a buffer
  bmv audio: implement new audio decoding API
  mpegaudiodec: skip all channels when skipping granules
  mpegenc: simplify muxrate calculation

Conflicts:
	Changelog
	avconv.c
	doc/RELEASE_NOTES
	libavcodec/h264.c
	libavcodec/mpeg12.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegvideo.c
	libavformat/mpegenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 03:06:45 +01:00
Michael Niedermayer 4121148388 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: make -frames work for all types of streams, not just video.
  bfi: K&R cosmetics
  bgmc: K&R cleanup
  rawdec: Set start_time to 0 for raw audio files.
  Detect 'yuv2' as rawvideo also in avi.
  rawdec: propagate pict_type information to the output frame
  rawdec: Support more QT 1bpp rawvideo files.
  avconv: free bitstream filters
  threads: limit the number of automatic threads to MAX_AUTO_THREADS
  avplay: K&R cleanup
  fate: use rgb24 as output format for dfa tests
  threads: set thread_count to 1 when thread support is disabled
  threads: introduce CODEC_CAP_AUTO_THREADS and add it to libx264

Conflicts:
	ffplay.c
	libavcodec/avcodec.h
	libavcodec/pthread.c
	libavcodec/version.h
	tests/ref/fate/dfa1
	tests/ref/fate/dfa10
	tests/ref/fate/dfa11
	tests/ref/fate/dfa2
	tests/ref/fate/dfa3
	tests/ref/fate/dfa4
	tests/ref/fate/dfa5
	tests/ref/fate/dfa6
	tests/ref/fate/dfa7
	tests/ref/fate/dfa8
	tests/ref/fate/dfa9

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-02 03:10:30 +01:00
Michael Niedermayer 00c0465dbc Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: split off DPCM codec FATE tests into their own file
  fate: split off PCM codec FATE tests into their own file
  libvorbis: K&R reformatting cosmetics
  libmp3lame: K&R formatting cosmetics
  fate: Add a video test for xxan decoder
  mpegvideo_enc: K&R cosmetics (line 1000-2000).
  avconv: K&R cosmetics
  qt-faststart: Fix up indentation
  indeo4: remove two unused variables
  doxygen: cleanup style to support older doxy
  fate: add more tests for VC-1 decoder
  applehttpproto: Apply the same reload interval changes as for the demuxer
  applehttp: Use half the target duration as interval if the playlist didn't update
  applehttp: Use the last segment duration as reload interval
  lagarith: add decode support for arith rgb24 mode

Conflicts:
	avconv.c
	libavcodec/libmp3lame.c
	libavcodec/mpegvideo_enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-30 03:46:24 +01:00
Stefano Sabatini 93613338fe ff* tools: move descriptions from copyright header to @file doxy 2011-12-27 12:58:08 +01:00
Michael Niedermayer f2f8632aa5 ffmpeg: Check that frames are user type before treating them as such
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-27 05:34:50 +01:00
Michael Niedermayer 80d2dddad1 ffmpeg: disable dr1 in case of resolution changes, as this does not work currently.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-27 05:22:44 +01:00
Michael Niedermayer 9971af3aa8 ffmpeg: add remaining hunks to enable dr1 support
Author: Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-27 04:01:38 +01:00
Michael Niedermayer a45880dcdb ffmpeg: fix non ANSI C for(int
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-26 04:14:50 +01:00
Michael Niedermayer 484e59a0a0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avs: call release_buffer() at the end.
  Add minor bumps and APIchanges entries for lavc/lavfi changes.
  mpegvideo.c: K&R formatting and cosmetics.
  avconv: avoid memcpy in vsrc_buffer when possible.
  avconv: implement get_buffer()/release_buffer().
  lavfi: add a new function av_buffersrc_buffer().
  lavfi: add avfilter_copy_frame_props()
  lavc: add format field to AVFrame
  lavc: add width and height fields to AVFrame
  lavc: add a sample_aspect_ratio field to AVFrame
  doxy: add website-alike style to the html output
  FAQ: add an entry for common error when using -profile

Conflicts:
	avconv.c
	cmdutils.c
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/mpegvideo.c
	libavcodec/utils.c
	libavcodec/version.h
	libavfilter/Makefile
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/src_movie.c
	libavfilter/vsrc_buffer.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-26 04:10:47 +01:00
Michael Niedermayer d1c28e3530 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  build: fix standalone compilation of OMA muxer
  build: fix standalone compilation of Microsoft XMV demuxer
  build: fix standalone compilation of Core Audio Format demuxer
  kvmc: fix invalid reads
  4xm: Add a check in decode_i_frame to prevent buffer overreads
  adpcm: fix IMA SMJPEG decoding
  options: set minimum for "threads" to zero
  bsd: use number of logical CPUs as automatic thread count
  windows: use number of CPUs as automatic thread count
  linux: use number of CPUs as automatic thread count
  pthreads: reset active_thread_type when slice thread_init returrns early
  v410dec: include correct headers
  Drop ALT_ prefix from BITSTREAM_READER_LE name.
  lavfi: always build vsrc_buffer.
  ra144enc: zero the reflection coeffs if the filter is unstable
  sws: readd PAL8 to isPacked()
  mov: Don't stick the QuickTime field ordering atom in extradata.
  truespeech: fix invalid reads in truespeech_apply_twopoint_filter()

Conflicts:
	configure
	libavcodec/4xm.c
	libavcodec/avcodec.h
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavformat/Makefile
	libswscale/swscale_internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 03:25:51 +01:00
Michael Niedermayer 452406bd5b ff*: Fix duplicatedly printed version info with -version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-20 22:23:12 +01:00
Michael Niedermayer 552ec4c9fd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  get_bits: remove A32 variant
  avconv: support stream specifiers in -metadata and -map_metadata
  wavpack: Fix 32-bit clipping
  wavpack: Clip samples after shifting
  h264: don't drop B-frames after next keyframe on POC reset.
  get_bits: remove useless pointer casts
  configure: refactor lists of tests and components into variables
  rv40: NEON optimised weak loop filter
  mpegts: replace some magic numbers with the existing define
  swscale: add unscaled packed 16 bit per component endianess conversion

Conflicts:
	libavcodec/get_bits.h
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-17 02:18:16 +01:00
Michael Niedermayer 7b92863f30 ffmpeg: Fix killing [Y/n] prompt with ctrl-c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 19:43:54 +01:00
Michael Niedermayer cf7076ee96 ffmpeg: exit() on repeated ctrl-c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 19:37:32 +01:00
Michael Niedermayer 1f273c2bf2 ffmpeg: check return code from av_vsrc_buffer_add_frame()
Fixed Ticket770
Bug found by: Diana Elena Muscalu

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-15 23:58:31 +01:00
Michael Niedermayer 6c39b3c278 ffmpeg: reset dts/pts after decoding the first subpacket
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 19:46:29 +01:00
Michael Niedermayer 8bc7fe4daf Merge remote-tracking branch 'qatar/master'
* qatar/master:
  doxygen: misc consistency, spelling and wording fixes
  vcr1: drop unnecessary emms_c() calls without MMX code
  Replace all uses of av_close_input_file() with avformat_close_input().
  lavf: add avformat_close_input().
  lavf: deprecate av_close_input_stream().
  lavf doxy: add some basic demuxing documentation.
  lavf doxy: add some general lavf information.
  lavf doxy: add misc utility functions to a group.
  lavf doxy: add av_guess_codec/format to the encoding group.
  lavf doxy: add core functions to a doxy group.
  Add basic libavdevice documentation.
  lavc: convert error_recognition to err_recognition.
  avconv: update -map option help text
  x86: Require 7 registers for the cabac asm
  x86: bswap: remove test for bswap instruction
  bswap: make generic implementation more compiler-friendly
  h264: remove useless cast
  proresdec: fix decode_slice() prototype

Conflicts:
	configure
	doc/APIchanges
	ffprobe.c
	libavcodec/avcodec.h
	libavcodec/celp_math.h
	libavcodec/h264.c
	libavfilter/src_movie.c
	libavformat/anm.c
	libavformat/avformat.h
	libavformat/version.h
	libavutil/avstring.h
	libavutil/bswap.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 00:39:48 +01:00
Michael Niedermayer ee731c1ab0 ffmpeg: fix codecids with ffserver + ffmpeg + ffm
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-12 17:30:55 +01:00
Michael Niedermayer 7fad19a63d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: cabac: replace explicit memory references with "m" operands
  avplay: don't request a stereo downmix
  wmapro: use av_float2int()
  lavc: avoid invalid memcpy() in avcodec_default_release_buffer()
  lavu: replace int/float punning functions
  lavfi: install libavfilter/vsrc_buffer.h
  Remove extraneous semicolons
  sdp: Restore the original mp4 format h264 extradata if converted
  rtpenc: Add support for mp4 format h264
  rtpenc: Simplify code by introducing a separate end pointer
  movenc: Use the actual converted sample for RTP hinting
  Fix a bunch of common typos.

Conflicts:
	doc/developer.texi
	doc/eval.texi
	doc/filters.texi
	doc/protocols.texi
	ffmpeg.c
	ffplay.c
	libavcodec/mpegvideo.h
	libavcodec/x86/cabac.h
	libavfilter/Makefile
	libavformat/avformat.h
	libavformat/cafdec.c
	libavformat/flvdec.c
	libavformat/flvenc.c
	libavformat/gxfenc.c
	libavformat/img2.c
	libavformat/movenc.c
	libavformat/mpegts.c
	libavformat/rtpenc_h264.c
	libavformat/utils.c
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-12 01:25:37 +01:00
Diego Biurrun da9cea77e3 Fix a bunch of common typos. 2011-12-11 00:32:25 +01:00
Michael Niedermayer 934fe00680 ffmpeg: better warning about loop_input
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-10 21:03:47 +01:00
Michael Niedermayer ec9d92700e ffmpeg: Use the buffer sinks poll instead of its input.
This fixes the case that the buffer sinks fifo contains frames which
would not show up on the poll from its input

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-08 21:19:27 +01:00
Michael Niedermayer 7c41995e00 ffmpeg: more exact comment about libavformat.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-08 20:21:28 +01:00
Michael Niedermayer c89488588b ffmpeg: Warn if filters poll & request frame behave wrongly.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-06 16:08:29 +01:00
Michael Niedermayer b404ab9e74 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mov: Don't av_malloc(0).
  avconv: only allocate 1 AVFrame per input stream
  avconv: fix memleaks due to not freeing the AVFrame for audio
  h264-fate: remove -strict 1 except where necessary (mr4/5-tandberg).
  misc Doxygen markup improvements
  doxygen: eliminate Qt-style doxygen syntax
  g722: Add a regression test for muxing/demuxing in wav
  g722: Change bits per sample to 4
  g722dec: Signal skipping the lower bits via AVOptions instead of bits_per_coded_sample
  api-example: update to use avcodec_decode_audio4()
  avplay: use avcodec_decode_audio4()
  avplay: use a separate buffer for playing silence
  avformat: use avcodec_decode_audio4() in avformat_find_stream_info()
  avconv: use avcodec_decode_audio4() instead of avcodec_decode_audio3()
  mov: Allow empty stts atom.
  doc: document preferred Doxygen syntax and make patcheck detect it

Conflicts:
	avconv.c
	ffplay.c
	libavcodec/mlpdec.c
	libavcodec/version.h
	libavformat/mov.c
	tests/codec-regression.sh
	tests/fate/h264.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-06 01:37:27 +01:00
Michael Niedermayer 738c603a22 ffmpeg: Avoid directly accessing AVFrame fields that differ between forks.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-05 03:22:08 +01:00
Michael Niedermayer 618fb9cc06 ffmpeg: handle stream copy timebase selection for mp4 as if it had VFPS set.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-05 03:19:28 +01:00
Michael Niedermayer 594090c6c2 ffmpeg: select best pixel format for the encoder if no exact match.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-04 15:26:52 +01:00
Michael Niedermayer 730945d941 ffmpeg: use standard duration calculation code in the stream copy case.
Fixes a.mkv non monotonic timestamps

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-03 15:15:06 +01:00
Michael Niedermayer e4de71677f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  aac_latm: reconfigure decoder on audio specific config changes
  latmdec: fix audio specific config parsing
  Add avcodec_decode_audio4().
  avcodec: change number of plane pointers from 4 to 8 at next major bump.
  Update developers documentation with coding conventions.
  svq1dec: avoid undefined get_bits(0) call
  ARM: h264dsp_neon cosmetics
  ARM: make some NEON macros reusable
  Do not memcpy raw video frames when using null muxer
  fate: update asf seektest
  vp8: flush buffers on size changes.
  doc: improve general documentation for MacOSX
  asf: use packet dts as approximation of pts
  asf: do not call av_read_frame
  rtsp: Initialize the media_type_mask in the rtp guessing demuxer
  Cleaned up alacenc.c

Conflicts:
	doc/APIchanges
	doc/developer.texi
	libavcodec/8svx.c
	libavcodec/aacdec.c
	libavcodec/ac3dec.c
	libavcodec/avcodec.h
	libavcodec/nellymoserdec.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/wmadec.c
	libavformat/asfdec.c
	tests/ref/seek/lavf_asf

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-03 03:00:30 +01:00
Carl Eugen Hoyos d9cc6bb432 Support ffmpeg -dn to disable copying data streams.
Fixes ticket #647.
2011-12-01 18:02:04 +01:00
Michael Niedermayer 67eb95ce15 ffmpeg: fix segfault with ffmpeg -h
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-01 04:32:27 +01:00
Michael Niedermayer 03b60509cb ffmpeg: fix changing sample rate handling
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-01 04:06:59 +01:00
Michael Niedermayer 54e40b9c14 ffmpeg: factorize duration calculation in transcode_video()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-01 03:49:38 +01:00
Michael Niedermayer 6e96ad8215 ffmpeg: make copy_tb tri state so the user can select either timebase or
leave it at auto

Inspired-by a change from Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-01 03:49:37 +01:00
Michael Niedermayer 9d76cf0b18 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec: Templatize the code for different g726 bitrate variants
  rv40: move loop filter to rv34dsp context
  lavf: make av_set_pts_info private.
  rtpdec: Add support for G726 audio
  rtpdec: Add an init function that can do custom codec context initialization
  avconv: make copy_tb on by default.
  matroskadec: don't set codec timebase.
  rmdec: don't set codec timebase.
  avconv: compute next_pts from input packet duration when possible.
  lavf: estimate frame duration from r_frame_rate.
  avconv: update InputStream.pts in the streamcopy case.

Conflicts:
	avconv.c
	libavdevice/alsa-audio-dec.c
	libavdevice/bktr.c
	libavdevice/fbdev.c
	libavdevice/libdc1394.c
	libavdevice/oss_audio.c
	libavdevice/v4l.c
	libavdevice/v4l2.c
	libavdevice/vfwcap.c
	libavdevice/x11grab.c
	libavformat/au.c
	libavformat/eacdata.c
	libavformat/flvdec.c
	libavformat/mpegts.c
	libavformat/mxfenc.c
	libavformat/rtpdec_g726.c
	libavformat/wtv.c
	libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-01 02:54:24 +01:00
Michael Niedermayer c40a35f8a7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  indeo3: check per-plane data buffer against input buffer bounds.
  avconv: Handle audio sync for non-S16 sample formats.
  pthread: don't increment index on zero-sized packets.

Conflicts:
	libavcodec/indeo3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-30 02:34:35 +01:00
Jean First 23b4f355bb ffmpeg.c use b:v for video bitrates using a target
it's more consistent to use -b:v instead of just -b

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-30 00:22:31 +01:00
Clément Bœsch b6ffe441cd ffmpeg: do not use a negative total_size (AVERROR) in bitrate estimation. 2011-11-29 23:07:13 +01:00
Michael Niedermayer 6d13499be0 cmdutils: pass AVCodec to filter_codec_opts()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-27 21:17:56 +01:00
Michael Niedermayer e1d48786d5 ffmpeg: Warn if output file is empty
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-25 16:17:06 +01:00
Carl Eugen Hoyos 0a4f02117b Add option -n to exit if output file exists. 2011-11-24 21:42:42 +01:00
Michael Niedermayer 957867ab13 ffmpeg: rewrite vsync / notimestamps handling
The qatar implementation makes no sense.
a muxer without timestamps is constant fps thus needs vsync.
the crc/mp5 are special cases that have timestamps yet allow any
nonsensical timestamps.
raw (yuv/rgb) video is constant fps thus needs vsync too.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-24 04:57:38 +01:00
Michael Niedermayer 8e576d5830 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libavutil: add utility functions to simplify allocation of audio buffers.
  libavutil: add planar sample formats and av_sample_fmt_is_planar()
  avconv: fix segfault at EOF with delayed pictures
  pcmdec: remove unneeded resetting of samples pointer
  avconv: remove a now unused parameter from output_packet().
  avconv: formatting fixes in output_packet()
  avconv: declare some variables in blocks where they are used
  avconv: use the same behavior when decoding audio/video/subs
  bethsoftvideo: return proper consumed size for palette packets.
  cdg: skip packets that don't contain a cdg command.
  crcenc: add flags
  avconv: use vsync 0 for AVFMT_NOTIMESTAMPS formats.
  tiffenc: add a private option for selecting compression algorithm
  md5enc: add flags
  ARM: remove needless .text/.align directives

Conflicts:
	doc/APIchanges
	libavcodec/tiffenc.c
	libavutil/avutil.h
	libavutil/samplefmt.c
	libavutil/samplefmt.h
	tests/ref/fate/bethsoft-vid
	tests/ref/fate/cdgraphics
	tests/ref/fate/film-cvid-pcm-stereo-8bit
	tests/ref/fate/mpeg2-field-enc
	tests/ref/fate/nuv
	tests/ref/fate/tiertex-seq
	tests/ref/fate/tscc-32bit
	tests/ref/fate/vmnc-32bit

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-24 03:32:24 +01:00
Michael Niedermayer b329fc346e ffmpeg: fix indention
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-23 23:20:20 +01:00
Michael Niedermayer fec2025936 ffmpeg: Fix ffmpeg.c:1874:21: warning: unused variable ‘of’ [-Wunused-variable]
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-23 23:19:59 +01:00
Michael Niedermayer 0b9a69f244 Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  aacdec: Fix PS in ADTS.
  avconv: Consistently use PIX_FMT_NONE.
  dsputil: use cpuflags in x86 emu_edge_core
  dsputil: use movups instead of movdqu in ff_emu_edge_core_sse()
  wma: initialize prev_block_len_bits, next_block_len_bits, and block_len_bits.
  mov: Remove some redundant and obsolete comments.
  Add libavutil/mathematics.h #includes for INFINITY
  doxy: structure libavformat groups
  doxy: introduce an empty structure in libavcodec
  doxy: provide a start page and document libavutil
  doxy: cleanup pixfmt.h
  regtest: split video encode/decode tests into individual targets
  ARM: add explicit .arch and .fpu directives to asm.S
  pthread: do not touch has_b_frames
  avconv: cleanup the transcoding loop in output_packet().
  avconv: split subtitle transcoding out of output_packet().
  avconv: split video transcoding out of output_packet().
  avconv: split audio transcoding out of output_packet().
  avconv: reindent.
  avconv: move streamcopy-only code out of decoding loop.
  ...

Conflicts:
	avconv.c
	libavcodec/aaccoder.c
	libavcodec/pthread.c
	libavcodec/version.h
	libavutil/audioconvert.h
	libavutil/avutil.h
	libavutil/mem.h
	tests/ref/vsynth1/dv
	tests/ref/vsynth1/mpeg2thread
	tests/ref/vsynth2/dv
	tests/ref/vsynth2/mpeg2thread

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-23 04:02:17 +01:00
Michael Niedermayer 7876f14f8b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  pthread: add some malloc failure checks
  avconv: cosmetics, reformat transcode_init()
  avconv: rename 'os' variable to 'oc'
  doc/filters: fix some typos.
  configure: add libpulse to help output

Conflicts:
	avconv.c
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-22 02:54:50 +01:00
Michael Niedermayer 70974bdb27 ffmpeg: Fix segfault when using ffmpeg with ffserver where ffmpeg does not supply all requested streams.
Fixes Ticket675

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-21 23:32:39 +01:00
Michael Niedermayer 9b62241850 ffmpeg: 10l add back show_banner() that was lost in the last merge.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-21 00:06:23 +01:00
Michael Niedermayer e161b079de Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  configure: add check for w32threads to enable it automatically
  rtmp: do not hardcode invoke numbers
  cinepack: return non-generic errors
  fate-lavf-ts: use -mpegts_transport_stream_id option.
  Add an APIchanges entry and a minor bump for avio changes.
  avio: Mark the old interrupt callback mechanism as deprecated
  avplay: Set the new interrupt callback
  avconv: Set new interrupt callbacks for all AVFormatContexts, use avio_open2() everywhere
  cinepak: remove redundant coordinate checks
  cinepak: check strip_size
  cinepak, simplify, use AV_RB24()
  cinepak: simplify, use FFMIN()
  cinepak: Fix division by zero, ask for sample if encoded_buf_size is 0
  applehttp: Fix seeking in streams not starting at DTS=0
  http: Don't use the normal http proxy mechanism for https
  tls: Handle connection via a http proxy
  http: Reorder two code blocks
  http: Add a new protocol for opening connections via http proxies
  http: Split out the non-chunked buffer reading part from http_read
  segafilm: add support for raw videos
  ...

Conflicts:
	avconv.c
	configure
	doc/APIchanges
	libavcodec/cinepak.c
	libavformat/applehttp.c
	libavformat/version.h
	tests/lavf-regression.sh
	tests/ref/lavf/ts

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-19 02:00:06 +01:00
Clément Bœsch eafa2b6005 swr: introduce a public function to customize the channel mapping. 2011-11-17 18:30:03 +01:00
Clément Bœsch 645c61fb2b swr: rename swr_alloc2() to swr_alloc_set_opts(). 2011-11-17 10:16:07 +01:00
Michael Niedermayer 8a2e768318 ffmpeg: use av_noreturn
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-11 04:24:25 +01:00
Michael Niedermayer ec3c9a3020 ffmpeg: check debug scanf() return value.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-11 04:05:25 +01:00
Michael Niedermayer 7d3982bf42 ffmpeg: get rid of deprecated warnings due to AVOption useage.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-11 03:57:46 +01:00
Michael Niedermayer 6d91045d83 Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  doc: update libavfilter documentation
  tls: Use the URLContext as logging context
  aes: Avoid illegal read and don't generate more key than we use.
  mpc7: Fix memset call in mpc7_decode_frame function
  atrac1: use correct context for av_log()
  apedec: consume the whole packet when copying to the decoder buffer.
  apedec: do not needlessly copy s->samples to nblocks.
  apedec: check output buffer size after calculating actual output size
  apedec: remove unneeded entropy decoder normalization.
  truespeech: use memmove() in truespeech_update_filters()
  vorbisdec: remove AVCODEC_MAX_AUDIO_FRAME_SIZE check
  vorbisdec: remove unneeded buf_size==0 check
  vorbisdec: return proper error codes instead of made-up ones
  http: Don't add a Range: bytes=0- header for POST
  sunrast: Check for invalid/corrupted bitstream
  http: Change the chunksize AVOption into chunked_post
  http: Add encoding/decoding flags to the AVOptions
  avconv: remove some codec-specific hacks
  crypto: add decoding flag to options.
  tls: use AVIO_FLAG_NONBLOCK instead of deprecated URL_FLAG_NONBLOCK
  ...

Conflicts:
	doc/libavfilter.texi
	libavcodec/atrac1.c
	libavcodec/sunrast.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-11 02:50:35 +01:00
Michael Niedermayer eb4fc6acfe ffmpeg: update timestamping code to handle frame threads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-10 15:27:54 +01:00
Michael Niedermayer 8892d0492d Revert commit 0bc391281a
ffmpeg: remove -psnr option.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-09 19:12:51 +01:00
Michael Niedermayer 13b7781ec8 Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits)
  x86inc: use sse versions of common macros instead of sse2 when applicable
  doc/APIchanges: add missing dates and hashes
  lavf: don't return from void av_update_cur_dts()
  Changelog: add more entries.
  Changelog: update ffmpeg/avconv incompatibility list.
  avconv: remove some redundant temporary variables.
  avconv: fix broken indentation
  avconv: move copy_initial_nonkeyframes to the options context.
  avconv: use file:stream instead of file.stream in log messages.
  doc/avconv: elaborate on basic functionality.
  doc/avconv: -sample_fmts, not -help sample_fmts prints the sample formats
  openssl: Only use CRYPTO_set_id_callback on OpenSSL < 1.0.0
  Call avformat_network_init/deinit in the programs
  Remove leftover includes of strings.h
  avutil: Don't allow using strcasecmp/strncasecmp
  Replace all usage of strcasecmp/strncasecmp
  avstring: Add locale independent implementations of strcasecmp/strncasecmp
  avstring: Add locale independent implementations of toupper/tolower
  cosmetics: insert some spaces in explicit enum value assignments
  move 8SVX audio codecs to the audio codec list part on the next bump
  ...

Conflicts:
	avprobe.c
	doc/APIchanges
	ffplay.c
	ffserver.c
	libavcodec/avcodec.h
	libavdevice/bktr.c
	libavdevice/v4l.c
	libavdevice/v4l2.c
	libavformat/matroskaenc.c
	libavformat/wtv.c
	libavutil/avstring.c
	libavutil/avstring.h
	libavutil/avutil.h
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-07 03:01:43 +01:00
Martin Storsjö 776f2bb91a Call avformat_network_init/deinit in the programs
Calling the init function will become mandatory at some later
point. By calling it, more heavy network init (such as SSL/TLS
library init) can be done once at startup, instead of implicitly
when used (which could lead to it being done a number of times).

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 18:31:39 +02:00
Michael Niedermayer 0e55902324 ffmpeg: preserve avg_frame_rate on stream copy.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-06 00:09:40 +01:00
Reimar Döffinger addc64f7f9 Fix typo in warning message.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-05 11:30:46 +01:00
Clément Bœsch f5cd136f2b ffmpeg: add -map_channel option.
Based on an initial work by Baptiste Coudurier.
2011-11-04 19:40:32 +01:00
Michael Niedermayer 259a960f1b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vp6: Fix illegal read.
  avfilter: Don't copy garbage from the stack when setting up video pictures.
  avcodec: Make sure codec_type is set by avcodec_get_context_defaults2
  avcodec: Remove a misplaced and useless attribute_deprecated
  avconv: add -dump_attachment option.
  avconv: add -attach option.
  avconv: make negative mappings disable only streams from the specified file
  fmtconvert: fix int32_to_float_fmul_scalar() for windows x86_64

Conflicts:
	libavcodec/options.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 01:44:06 +01:00
Michael Niedermayer f955fdc7c6 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  cmdutils: Rename read_file to cmdutils_read_file

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-01 02:02:20 +01:00
Martin Storsjö 02170990fd cmdutils: Rename read_file to cmdutils_read_file
This symbol name clashes with a symbol in gnutls, if linking
statically to that library.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-31 16:29:29 +02:00
Michael Niedermayer 4dbce51b9e ffmpeg: allow pass 3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-30 02:44:36 +01:00
Clément Bœsch 41f00e4adb ffmpeg: silence two compiler warnings. 2011-10-30 02:35:34 +02:00
Michael Niedermayer e71aaad283 ffmpeg: Fix regression where various fields where not initialized leading to segfaults
Bug introduced by:
commit f12f40b31a
Author: Anton Khirnov <anton@khirnov.net>
Date:   Tue Aug 30 04:05:20 2011 +0200

    ffmpeg: get rid of new* options.

    They are confusing, irregular and redundant -- -map already contains all
    the information.  Stream maps can now be parsed in opt_output_file().

    Add a more user-friendly default behavior in case no maps are present.

    Breaks -programid for now, but it never worked properly anyway. A better
    solution will be written soon.
2011-10-29 20:25:39 +02:00
Michael Niedermayer a18ecfeb36 ffmpeg: Fix memory corruption with ffserver
Bug has been introduced by:
commit 1cede1d011
Author: Anton Khirnov <anton@khirnov.net>
Date:   Sat Jun 25 07:43:49 2011 +0200

    ffmpeg: factor common code from new_a/v/s/d_stream to new_output_stream()
2011-10-29 20:21:59 +02:00
Michael Niedermayer 51bfaa21c8 Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  g722dec: check output buffer size before decoding
  g722dec: cosmetics: reindent/linewrap
  g722dec: remove the use of lowres for half-rate decoding.
  tta: check for extradata allocation failure in tta demuxer
  tta: check for allocation failure of decode_buffer
  tta: use correct frame_length calculation.
  tta: add support for decoding 24-bit sample format
  cosmetics: indentation
  tta: remove pointless braces
  tta: check output buffer size after adjusting frame length for last frame
  tta: fix reading of format in TTA header.
  tta: remove useless commented-out lines
  tta: check remaining bitstream size while reading unary value
  lavf: deprecate AVStream.stream_copy
  avconc: split choose_codec() to choose_decoder/choose_encoder.
  lavf: simplify by using FFMAX/FFMIN.
  mpegenc: add preload private option.
  cosmetics: simplify latm_decode_init
  latm: avoid unnecessary reinit of the aac decoder
  aacdec: initialize sbr context only in new channel elements
  ...

Conflicts:
	avconv.c
	libavcodec/resample.c
	libavcodec/tta.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-26 02:36:07 +02:00
Michael Niedermayer 4e15960c78 ffmpeg: add rmvol command line option to set swr rematrix volume.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-26 01:00:37 +02:00
Michael Niedermayer d0492578c8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  presets: rename presets directory
  lavc: make avcodec_get_context_defaults3 "officially" public
  lavf: replace av_new_stream->avformat_new_stream part II.
  lavf,lavd: replace av_new_stream->avformat_new_stream part I.
  lavf: add avformat_new_stream as a replacement for av_new_stream.
  Use correct scaling table for bwd-pred MVs in second B-field
  Ut Video decoder
  Makefile: change presets extension to .avpreset
  lavfi: add rgbtestsrc source, ported from MPlayer libmpcodecs
  lavfi: add testsrc source
  AVOptions: add documentation.
  presets: update libx264 ffpresets

Conflicts:
	Changelog
	doc/APIchanges
	doc/ffmpeg.texi
	ffpresets/libx264-ipod320.ffpreset
	ffpresets/libx264-ipod640.ffpreset
	ffserver.c
	libavcodec/avcodec.h
	libavcodec/options.c
	libavcodec/version.h
	libavdevice/libdc1394.c
	libavfilter/avfilter.h
	libavfilter/vsrc_testsrc.c
	libavformat/flvdec.c
	libavformat/riff.c
	libavformat/version.h
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-20 02:34:51 +02:00
Michael Niedermayer fae714a9fb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: add presets
  rtsp: Expose the flag options via private AVOptions for sdp and rtp, too
  rtsp: Make the rtsp flags avoptions set via a define
  rtpenc: Set a default video codec
  avoptions: Fix av_opt_flag_is_set
  rtp: Fix ff_rtp_get_payload_type
  doc: Update the documentation on setting options for RTSP
  rtsp: Remove the separate filter_source variable
  rtsp: Accept options via private avoptions instead of URL options
  rtsp: Simplify AVOption definitions
  rtsp: Merge the AVOption lists
  lavfi: port libmpcodecs delogo filter
  lavfi: port boxblur filter from libmpcodecs
  lavfi: add negate filter
  lavfi: add LUT (LookUp Table) generic filters
  AVOptions: don't segfault on NULL parameter in av_set_options_string()
  avio: Check for invalid buffer length.
  mpegenc/mpegtsenc: add muxrate private options.
  lavf: deprecate AVFormatContext.file_size
  mov: add support for TV metadata atoms tves, tvsn and stik

Conflicts:
	Changelog
	doc/filters.texi
	doc/protocols.texi
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/avfilter.h
	libavfilter/formats.c
	libavfilter/internal.h
	libavfilter/vf_boxblur.c
	libavfilter/vf_delogo.c
	libavfilter/vf_lut.c
	libavformat/mpegtsenc.c
	libavformat/utils.c
	libavformat/version.h
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-18 01:54:40 +02:00
Carl Eugen Hoyos 6bca574a98 Allow to overwrite input stream tags. 2011-10-16 19:05:11 +02:00
Michael Niedermayer f884ef00de Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  tiffenc: initialize forgotten avctx.
  avplay: free the active audio packet at exit.
  avplay: free rdft data used for spectrogram analysis.
  log.h: make AVClass a named struct
  fix ac3 encoder documentation
  vc1: more prettyprinting cosmetics
  vc1: prettyprint some tables
  vc1: K&R formatting cosmetics
  AVOptions: bump minor and add APIchanges entry.
  cmdutils/avtools: simplify show_help() by using av_opt_child_class_next()
  AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
  Remove all uses of deprecated AVOptions API.
  AVOptions: add av_opt_next, deprecate av_next_option.
  AVOptions: add functions for evaluating option strings.
  AVOptions: split get_number().
  AVOptions: add av_opt_get*, deprecate av_get*.
  AVOptions: add av_opt_set*().
  AVOptions: add new API for enumerating children.
  rv34: move inverse transform functions to DSP context
  flvenc: Write the right metadata entry count
  ...

Conflicts:
	avconv.c
	cmdutils.c
	doc/APIchanges
	ffplay.c
	ffprobe.c
	libavcodec/ac3dec.c
	libavcodec/h264.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mpeg12enc.c
	libavcodec/options.c
	libavdevice/libdc1394.c
	libavdevice/v4l2.c
	libavfilter/vf_drawtext.c
	libavformat/flvdec.c
	libavformat/mpegtsenc.c
	libavformat/options.c
	libavutil/avutil.h
	libavutil/opt.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-13 06:00:03 +02:00
Clément Bœsch 3473639952 ffmpeg: fix two stream related comments. 2011-10-11 14:24:20 +02:00
Michael Niedermayer 0a23067ab4 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpeg4dec: use unsigned type for startcode in ff_mpeg4_decode_picture_header
  mpeg124: use sign_extend() function
  ac3dec: use get_sbits() instead of manually sign-extending
  4xm: fix signed overflow
  wmavoice: fix a signed overflow
  mpegvideo_enc: fix a signed overflow
  crc: fix signed overflow
  fate: run avconv with -nostats flag
  avtools: add -v as alias for -loglevel
  avconv: always print stats with AV_LOG_INFO
  doc/avconv: add forgotten output/per-stream info to -filter
  avconv: add -stats option to enable/disable printing encoding progress
  avconv: in output_packet() don't set decoded_data_size for video.
  avconv: remove pointless always true condition
  avconv: factorize common code in transcode_init()
  zmbv: remove memcpy() of decoded frame
  mpeg12enc: use sign_extend() function
  h264pred: use unsigned types for pixel values, fix signed overflows
  h264: fix signed overflows in x*0x01010101 expressions
  h264pred: remove unused variables

Conflicts:
	avconv.c
	tests/fate-run.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-10 03:50:58 +02:00
Michael Niedermayer e084cad45f ffmpeg: fix y/N regression so that \n is always needed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-09 02:04:54 +02:00
Michael Niedermayer 96fad826ff ffmpeg: put space back that was lost during someone reformating it.
Found-by: Ramiro
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 23:18:48 +02:00
Michael Niedermayer f3bacced24 ffmpeg: fix read_yn() if HAVE_TERMIOS_H || HAVE_KBHIT == 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 19:43:10 +02:00
Michael Niedermayer dc46692ded ffmpeg: fix setting codecs for demuxers.
Bug introduced by:
commit e3bf4e292c
Author: Anton Khirnov <anton@khirnov.net>
Date:   Tue Aug 30 04:10:54 2011 +0200

    ffmpeg: replace -vcodec/-acodec/-scodec with a better system.

    The new option doesn't depend on its placement wrt -new* options (which
    don't exist anymore) and works in a similar way as per-stream AVOptions.

    -[vas]codec remain as aliases to -codec:[vas]

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 19:21:22 +02:00
Michael Niedermayer 92ec66f983 ffmpeg: limit read_key() calls to get a tiny speed boost.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 18:37:47 +02:00
Michael Niedermayer c09abba1d9 ffmpeg: avoid multiple redundant av_gettime() calls, rather reuse the value in a iteration of the main loop.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 18:37:47 +02:00
Michael Niedermayer f3afc9d772 ffmpeg: fix run_as_daemon when HAVE_TERMIOS_H is false
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 18:37:47 +02:00
Michael Niedermayer d6c231bac1 ffmpeg: cosmetic renamings to reduce difference to qatar.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 18:37:47 +02:00
Michael Niedermayer 0732dceef1 ffmpeg: call term_init() earlier
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 18:37:47 +02:00
Michael Niedermayer 570fb660d6 ffmpeg: make q_pressed volatile, it can be changed from signal handlers.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 17:26:43 +02:00
Michael Niedermayer fb79558516 ffmpeg: dont call read_key() in decode_interrupt_cb() this can cause keys to be lost
also its slow when read_key() is slow and there are a very large number of calls

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 17:26:43 +02:00
Michael Niedermayer 481747c6f7 ffmpeg: make -a/v/sn work with -map
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-06 21:59:50 +02:00
Nicolas George 2c1c0c5024 ffmpeg: fix forced key frames.
Now that the option was moved in the per-stream context,
the parsing is done before the time_base for the stream is decided.
This patch does the parsing in AV_TIME_BASE units and rescales the
timestamps later when the correct time base is known.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-06 03:39:15 +02:00
Michael Niedermayer f9a2d0c3fe Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits)
  avconv: Reformat s16 volume adjustment.
  ARM: NEON optimised vector_fmac_scalar()
  dca: use vector_fmac_scalar from dsputil
  dsputil: add vector_fmac_scalar()
  latmenc: Fix private options
  vf_unsharp: store hsub/vsub in the filter context
  vf_unsharp: adopt a more natural order of params in apply_unsharp()
  vf_unsharp: rename method "unsharpen" to "apply_unsharp"
  vf_scale: apply the same transform to the aspect during init that is applied per frame
  vf_pad: fix "vsub" variable value computation
  vf_scale: add a "sar" variable
  lavfi: fix realloc size computation in avfilter_add_format()
  vsrc_color: use internal timebase
  lavfi: fix signature for avfilter_graph_parse() and avfilter_graph_config()
  graphparser: prefer void * over AVClass * for log contexts
  avfiltergraph: use meaningful error codes
  avconv: Initialize return value for codec copy path.
  fate: use 'run' helper for seek-test
  fate: remove seek-mpeg2reuse test
  Fix memory (re)allocation in matroskadec.c, related to MSVR-11-0080.
  ...

Conflicts:
	doc/filters.texi
	libavfilter/avfilter.h
	libavfilter/avfiltergraph.c
	libavfilter/avfiltergraph.h
	libavfilter/graphparser.c
	libavfilter/vf_scale.c
	libavfilter/vsrc_color.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-29 01:11:01 +02:00
Nicolas George 1d3b280e71 ffmpeg: Replace av_realloc by av_realloc_f when relevant.
Also mark with a visible comment "FIXME realloc failure" places where
av_realloc seems to lack a proper test for failure.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-28 18:13:52 +02:00
Michael Niedermayer 2f3dd904f4 ffmpeg: fix wrong indention that leaked in from merge
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-28 03:19:22 +02:00
Michael Niedermayer 23c1db9b83 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: use different variables for decoded and filtered frame.
  avconv: add support for copying attachments.
  matroskaenc: write attachments.
  matroskadec: export mimetype of attachments as metadata.
  avconv: factorize common code from new_*_stream()
  doc/avconv: expand documentation for some options.
  doc/avconv: document -timelimit.

Conflicts:
	avconv.c
	cmdutils.c
	tests/codec-regression.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-28 02:07:44 +02:00
Lars Täuber 6c0a902d12 ffmpeg: fix typo in warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-27 14:41:09 +02:00
Michael Niedermayer 7c1aba4f01 Merge remote-tracking branch 'qatar/master'
* qatar/master: (21 commits)
  fate: allow testing with libavfilter disabled
  x86: XOP/FMA4 CPU detection support
  ws_snd: misc cosmetic clean-ups
  ws_snd: remove the 2-bit ADPCM table and just subtract 2 instead.
  ws_snd: use memcpy() and memset() instead of loops
  ws_snd: use samples pointer for loop termination instead of a separate iterator variable.
  ws_snd: make sure number of channels is 1
  ws_snd: add some checks to prevent buffer overread or overwrite.
  ws_snd: decode to AV_SAMPLE_FMT_U8 instead of S16.
  flacdec: fix buffer size checking in get_metadata_size()
  rtp: Simplify ff_rtp_get_payload_type
  rtpenc: Add a payload type private option
  rtp: Correct ff_rtp_get_payload_type documentation
  avconv: replace all fprintf() by av_log().
  avconv: change av_log verbosity from ERROR to FATAL for fatal errors.
  cmdutils: replace fprintf() by av_log()
  avtools: parse loglevel before all the other options.
  oggdec: add support for Xiph's CELT codec
  sol: return error if av_get_packet() fails.
  cosmetics: reindent and pretty-print
  ...

Conflicts:
	avconv.c
	cmdutils.c
	libavcodec/avcodec.h
	libavcodec/version.h
	libavformat/oggparsecelt.c
	libavformat/utils.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-27 02:14:37 +02:00
Michael Niedermayer eb11cca530 ffmpeg: document alternative to the lossless libx264 presets
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-26 22:06:39 +02:00
Michael Niedermayer 1edf33f7f2 ffmpeg: fix -b -ab mixes with -b overriding the audio bitrate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-26 21:04:23 +02:00
Anton Khirnov 182cbe433a avtools: parse loglevel before all the other options.
This way it can be applied to cmdutils too -- e.g. showing the banner
and printing startup messages.
2011-09-26 20:33:50 +02:00
Michael Niedermayer 537a9e5cc2 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ppc: fix some pointer to integer casts
  ppc: fix 32-bit PIC build
  vmdaudio: fix decoding of 16-bit audio format.
  lavf: do not set codec_tag for rawvideo
  h264: check for out of bounds reads in ff_h264_decode_extradata().
  flvdec: Check for overflow before allocating arrays
  avconv: use correct output stream index when checking max_frames
  avconv: remove fake coded_frame on streamcopy hack

Conflicts:
	avconv.c
	libavcodec/h264.c
	libavcodec/ppc/asm.S
	libavcodec/vmdav.c
	libavformat/flvdec.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 23:30:25 +02:00
Stefano Sabatini 01fbcc6fd6 ffmpeg: improve feedback when processing filtergraph events 2011-09-25 22:47:51 +02:00
Stefano Sabatini 68b897ef15 ffmpeg: apply misc cosmetics fixes in the filtergraph event processing code
In particular provides more consistent and expressive names,
supposedly improves readability and user feedback.
2011-09-25 22:47:51 +02:00
Michael Niedermayer d8289ff9a9 ffmpeg: increase bit_buffer_size, the header size is clearly too small for rgb48 raw based formats
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 16:43:30 +02:00
Anton Khirnov 9aa1f87dfd Revert "ffmpeg: get rid of useless AVInputStream.nb_streams."
This reverts commit 2cf8355f98.
AVInputStream.nb_streams tracks number of streams found at the
beginning, new streams may appear that ffmpeg doesn't know about. Fixes
crash in this case.
2011-09-21 14:12:00 +02:00
Michael Niedermayer b5875b9111 Add libswresample.
Similar to libswscale this does resampling and format convertion, just for audio
instead of video.
changing sampling rate, sample formats, channel layouts and sample packing all
in one with a very simple public interface.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-19 07:04:17 +02:00
Michael Niedermayer 8f5bb35f40 ffmpeg: fix video synchronization code to be exact on constant fps videos. Fixes Ticket137
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-13 17:29:23 +02:00
Clément Bœsch 677a831ec6 ffmpeg: remove unused data_codec_name. 2011-09-12 12:09:09 +02:00
Clément Bœsch 525d4852b9 ffmpeg: set {audio,video,subtitle}_codec_name const.
This fixes "assignment discards ‘const’ qualifier from pointer target
type." warnings.
2011-09-12 12:09:08 +02:00
Clément Bœsch 4b961ddfea ffmpeg: a bit more consistent prototypes. 2011-09-12 11:52:55 +02:00
Michael Niedermayer 411cc5c46a Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  audioconvert: add explanatory comments to channel_names array
  audioconvert: K&R whitespace cosmetics
  avconv: use correct index when selecting metadata to write to.
  avconv: fix inverted variable
  doc/avconv: document option types (input/output/per-stream/...)
  doc/avtools-common-opts: write a section about stream specifiers.
  doc/avconv: remove two pointless paragraphs.
  doc/avconv: document that global options should be specified first.
  doc/avconv: remove entries for nonexistent options
  doc/avconv: remove documentation for removed 'timestamp' option
  doc: cosmetics, rename fftools-common-opts to avtools-....
  avconv: move streamid_map to options context.
  avconv: extend -vf syntax
  avconv: move top_field_first to options context.
  avconv: move inter/intra matrix to options context.
  avconv: remove -psnr option.
  avconv: remove me_threshold option.
  avconv: move video_rc_override_string to options context.
  avconv: move frame pixel format to the options context.
  avconv: move frame aspect ratio to the options context.
  ...

Conflicts:
	avconv.c
	cmdutils_common_opts.h
	doc/avconv.texi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-12 00:32:54 +02:00
Michael Niedermayer 0c0ec4be6b ffmpeg: dont copy duration when -t is used
Fixes Ticket445

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-11 05:24:26 +02:00
Michael Niedermayer 7ba8e6bbae ffmpeg: replace messy duplicated tag compatibility functions by more generic solution.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-11 01:23:05 +02:00
Michael Niedermayer cec92fe49a ffmpeg: add vbsf & absf for compatibility.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-11 01:22:58 +02:00
Michael Niedermayer 7db7eb08e0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.
  avconv: move audio_channels to the options context.
  avconv: move *_disable to options context.
  avconv: remove -[vas]lang options.
  avconv: move codec tags to options context.
  cljr: init_get_bits size in bits instead of bytes
  indeo2: fail if input buffer too small
  indeo2: init_get_bits size in bits instead of bytes
  ffv1: Fixed size given to init_get_bits() in decoder.

Conflicts:
	avconv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-10 20:52:48 +02:00
Michael Niedermayer 1bb766a988 ffmpeg: fix -re
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-09 19:54:04 +02:00
Stefano Sabatini 4f7dfe12ea lavfi: rename vsink_buffer.c to sink_buffer.c, and vsink_buffer.h to buffersink.h
This is done in order to clarify the non-video-specific nature of the
buffersink code, as the result of the video/audio API unification of
the previous commit, and for improving overall consistency.
2011-09-06 18:51:09 +02:00
Stefano Sabatini c4415f6ec9 lavfi: unify asink_buffer and vsink_buffer API
The new API is more generic (no distinction between audio/video for
pulling frames), and avoids code duplication.

A backward compatibility layer is kept for avoiding tools ABI breaks
(only for the video binary interface, audio interface was never used
in the tools).
2011-09-06 18:47:04 +02:00
Michael Niedermayer d543b3bb52 ffmpeg: map subtitle stream by default when user specified -scodec
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-06 00:49:23 +02:00
Michael Niedermayer 3c54e7ed4f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ac3enc: Add channel coupling support for the fixed-point AC-3 encoder.
  ac3enc: scale floating-point coupling channel coefficients in scale_coefficients() rather than in apply_channel_coupling()
  ac3enc: fix encoding of stereo ac3 files when rematrixing is disabled.
  wavpack: fix wrong return value in wavpack_decode_block()
  avconv: fix parsing metadata specifiers.
  fate: use +frame+slice named constants instead of '3'
  mpeg12: propagate more real return values through chunk decode error return and fix some indentation
  wavpack: use context reset in appropriate places
  avconv: move mux_preload and mux_max_delay to options context
  avconv: move bitstream filters to options context.
  avconv: move rate_emu to options context.
  avconv: move max_frames to options context.
  avconv: move metadata to options context.
  avconv: move ts scale to options context.
  avconv: move chapter maps to options context.
  avconv: move metadata maps to options context.
  avconv: move codec_names to options context.

Conflicts:
	avconv.c
	tests/fate-run.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-05 22:29:16 +02:00
Michael Niedermayer 6f8b1fcd4b ffmpeg: tell reset_options() if it is used on input or output files.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-05 03:11:18 +02:00
Michael Niedermayer d2084402e6 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: fix type for thread_type option
  avconv: move format to options context
  avconv: move limit_filesize to options context
  avconv: move start_time, recording_time and input_ts_offset to options context
  avconv: add a context for options.
  cmdutils: allow storing per-stream/chapter/.... options in a generic way
  cmdutils: split per-option code out of parse_options().
  cmdutils: add support for caller-provided option context.
  cmdutils: declare only one pointer type in OptionDef
  cmdutils: move grow_array() from avconv to cmdutils.
  cmdutils: move exit_program() declaration to cmdutils from avconv
  http: Consider the stream as seekable if the reply contains Accept-Ranges: bytes
  nutenc: add namespace to the api facing functions

Conflicts:
	avconv.c
	cmdutils.c
	cmdutils.h
	ffmpeg.c
	ffplay.c
	ffprobe.c
	ffserver.c
	libavformat/http.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-05 03:10:45 +02:00
Anton Khirnov 7cc8d6385a cmdutils: add support for caller-provided option context.
This is the first step to removing the globals plague from avtools.
2011-09-04 13:12:00 +02:00
Anton Khirnov cac651c834 cmdutils: move grow_array() from avconv to cmdutils. 2011-09-04 13:12:00 +02:00
Anton Khirnov dad09ff93f cmdutils: move exit_program() declaration to cmdutils from avconv
Allows cmdutils to call each tool's own cleanup function.
2011-09-04 13:12:00 +02:00
Michael Niedermayer 1889c6724a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  AVOptions: fix av_set_string3() doxy to match reality.
  cmdutils: get rid of dummy contexts for examining AVOptions.
  lavf,lavc,sws: add {avcodec,avformat,sws}_get_class() functions.
  AVOptions: add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find().
  cpu detection: avoid a signed overflow

Conflicts:
	avconv.c
	cmdutils.c
	doc/APIchanges
	ffmpeg.c
	libavcodec/options.c
	libavcodec/version.h
	libavformat/version.h
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-04 04:11:53 +02:00
Michael Niedermayer ca4d71b149 ffmpeg: fix reading from stdin on windows
Based on code by Rolf Siegrist
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-04 02:14:39 +02:00
Anton Khirnov 20c21f8b75 cmdutils: get rid of dummy contexts for examining AVOptions.
Replace it with newly introduced libavutil API.
2011-09-03 20:58:15 +02:00
Michael Niedermayer 6233a3a153 Revert "ffmpeg: remove presets." and reimplement the needed parts that no longer exist.
Needed by libvpx

This reverts commit a0147957e7.
2011-09-03 00:50:00 +02:00
Chiranjeevi Melam e6ea4c715d ffmpeg: Fix minor memleak of input_tmp 2011-09-02 01:09:39 +02:00
Clément Bœsch df8737eb35 ffmpeg: fix two unused variables warnings. 2011-09-01 20:23:40 +02:00
Carl Eugen Hoyos c0e8bce349 Fix compilation with --disable-avfilter.
Fixes ticket #425.
2011-09-01 19:03:39 +02:00
Michael Niedermayer 3584b01e4e ffmpeg: Fix typos introduced in:
commit 630902a1e1
	Author: Anton Khirnov <anton@khirnov.net>
	Date:   Wed Jul 6 08:49:07 2011 +0200
	avconv: factor out initializing input streams.

These caused scrambled error messages to be printed and
floating point exceptions.
For example when there was no decoder available for a
stream

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-01 04:17:23 +02:00
Michael Niedermayer 76ba894eab Merge commit 'f593628e5868e52a46de666767896c6afcebdae4'
* commit 'f593628e5868e52a46de666767896c6afcebdae4':
  avconv: Replace raw picture frame swapping hack.
  RV40: reuse some H.264 motion compensation functions in RV40.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-31 00:12:05 +02:00
Michael Niedermayer 7c3f4fb42d ffmpeg: ffmpeg: fix reading commands from the keyboard
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-30 21:56:40 +02:00
Michael Niedermayer e312543c82 ffmpeg: fix reading commands from stdin
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-30 20:27:11 +02:00
Anton Khirnov 4bb2a74ffc ffmpeg: re-add nb_streams to InputFile.
It was mistakenly removed in 2cf8355f98,
not taking into account that new streams might appear in av_read_frame()
that avconv doesn't know about.

Fixes bug 24.
2011-08-30 18:10:10 +02:00
Alex Converse ff037c54b4 ffmpeg: Replace goto redo on decode fail with continue.
This checks for sigterm but otherwise is identical to the previous
behavior.
2011-08-30 18:10:10 +02:00