Commit Graph

1330 Commits

Author SHA1 Message Date
Alexander Strange cb48fdf67e ffmpeg: Simplify decode loop condition to not use next_pts
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:23:51 -04:00
Stefano Sabatini bc97695af8 ffmpeg: remove unused fields AVOutputStream.original_width/height
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-10 07:17:52 +02:00
Stefano Sabatini f38d900fb8 ffmpeg: remove unused variable padding_src in do_video_out()
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-10 07:17:39 +02:00
Michael Niedermayer d1991f51f3 ffmpeg: fix negative verbosity.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-10 07:17:21 +02:00
Stefano Sabatini 0420bf09f7 ffmpeg: rename configure_filters() to configure_video_filters()
Mostly useful for the audio-filters branch, to make more apparent the
distinction between configure_audio_filters() and
configure_video_filters().

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-10 07:15:06 +02:00
Stefano Sabatini 5d2c6f42d7 cmdutils: remove list_fmts(), simplify
The function was only used in opt_sample_fmt() for listing the sample
formats. Move list_fmts() functionality directly into
opt_sample_fmt().

Also fix the warning:
ffmpeg.c: In function ‘opt_audio_sample_fmt’:
ffmpeg.c:2877: warning: passing argument 1 of ‘list_fmts’ from incompatible pointer type
cmdutils.h:163: note: expected ‘void (*)(char *, int,  int)’ but argument is of type ‘char * (*)(char *, int,  enum AVSampleFormat)’

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-10 07:14:13 +02:00
Takashi Mochizuki c3e40410d4 Add missing CONFIG_AVFILTER check.
Fix configure --disable-avfilter issue.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-10 07:12:27 +02:00
Michael Niedermayer b97b4b58a6 Merge remote branch 'qatar/master'
* qatar/master:
  mpegaudiodec: group #includes more sanely
  mpegaudio: remove #if 0 blocks
  ffmpeg.c: reset avoptions after each input/output file.
  ffmpeg.c: store per-output stream sws flags.
  mpegaudio: remove CONFIG_MPEGAUDIO_HP option
  mpegtsenc: Clear st->priv_data when freeing it
  udp: Fix receiving RTP data over multicast
  rtpproto: Remove an unused variable
  regtest: fix wma tests
NOT pulled:  mpegaudio: remove CONFIG_AUDIO_NONSHORT
  regtest: separate flags for encoding and decoding

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-10 04:03:17 +02:00
Anton Khirnov 19615089a0 ffmpeg.c: reset avoptions after each input/output file.
This is consistent with how all the other options work.
2011-05-09 19:35:20 +02:00
Anton Khirnov 1435f2fa72 ffmpeg.c: store per-output stream sws flags. 2011-05-09 19:35:20 +02:00
Michael Niedermayer 6841c8c579 Merge remote branch 'qatar/master'
* qatar/master:
  log: Fix an oob array read.
  cosmetics: trim trailing whitespace in postproc
  Ban strncpy() it's too easy to misuse.
  psymodel: Remove wrapper functions.
  aacenc: Replace loop counters in aac_encode_frame() with more descriptive 'ch' and 'w'.
  regtest: remove redundant flags in jpg test
  regtest: use run_ffmpeg in do_image_formats
  regtest: simplify encoding functions
  ffmpeg.c: check for interlaced flag in the correct place.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-09 04:50:56 +02:00
Anton Khirnov 648e55ff1b ffmpeg.c: check for interlaced flag in the correct place.
In the corresponding codec context, not global options storage.
2011-05-08 10:43:24 +02:00
Stefano Sabatini 64c06615d2 vsrc_buffer: simplify av_vsrc_buffer_add_frame*() interface
Now that pix_fmt, width, and height are directly embedded in the AVFrame,
there is no need to pass these values as separate arguments.
2011-05-07 12:03:59 +02:00
Stefano Sabatini 2beac7c325 ffmpeg: rename ost->pict_tmp to ost->resample_frame
The new name is more consistent with the employed naming scheme, and
more meaningful.
2011-05-07 12:03:59 +02:00
Stefano Sabatini 04c373c1e9 ffmpeg: prefer dec/enc over ost/ist->st->codec in do_video_out()
Compact code, improve readability.
2011-05-07 12:03:58 +02:00
Stefano Sabatini a851fa7fec ffmpeg: move resample_changed check within the #if !CONFIG_AVFILTER
The check and the corresponding message in do_video_out() are
unnecessary in the libavfilter path, as a similar check and message
are performed within the buffer source.
2011-05-07 12:03:58 +02:00
Stefano Sabatini 70c24b2171 ffmpeg: remove useless intermediary variable resample_dst in do_video_out() 2011-05-07 12:03:58 +02:00
Stefano Sabatini f5a669c229 ffmpeg: simplify mid-stream reconfiguration when libavfilter is disabled
Implement lazy initialization of the image resample context, so that
the initialization code does not need to be duplicated.

Also manage the case in which resample/size change mid-stream. For
each packet the code computes if resampling is needed.

Previously the resample check was done only at the initialization, in
case size/format changed and no resample was detected at the init
stage ffmpeg was silently exiting.
2011-05-07 12:03:58 +02:00
Stefano Sabatini 566666caf3 lavfi: add libavfilter/avcodec.h and avfilter_copy_frame_props()
avfilter_copy_frame_props() avoids code duplication and increases
robustness.

The added files libavfilter/avcodec.[ch] are used for containing
utilities useful for gluing togheter libavfilter and libavcodec.
2011-05-07 12:03:49 +02:00
Michael Niedermayer b000b86e1d Merge remote branch 'qatar/master'
* qatar/master: (23 commits)
  doc: Check standalone compilation before submitting new components.
  Fix standalone compilation of pipe protocol.
  Fix standalone compilation of ac3_fixed encoder.
  Fix standalone compilation of binkaudio_dct / binkaudio_rdft decoders.
  Fix standalone compilation of IMC decoder.
  Fix standalone compilation of WTV demuxer.
  Fix standalone compilation of MXPEG decoder.
  flashsv: K&R cosmetics
  matroskaenc: fix memory leak
  vc1: make overlap filter for I-frames bit-exact.
  vc1dec: use s->start/end_mb_y instead of passing them as function args.
  Revert "VC1: merge idct8x8, coeff adjustments and put_pixels."
  Replace strncpy() with av_strlcpy().
  indeo3: Eliminate use of long.
  get_bits: make cache unsigned to eliminate undefined signed overflow.
  asfdec: fix assert failure on invalid files
  avfilter: check malloc return values.
Not pulled as reason for reindent is not pulled:  mpegvideo: reindent.
  nutenc: check malloc return values.
Not pulled due to much simpler solution in ffmpeg  *: don't av_malloc(0).
  ...

Conflicts:
	doc/developer.texi
	libavcodec/Makefile
	libavcodec/get_bits.h
	libavcodec/mpegvideo.c
	libavformat/Makefile
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-05 03:30:24 +02:00
Alex Converse 1a5e4fd8c5 Replace strncpy() with av_strlcpy(). 2011-05-03 21:20:13 -07:00
Michael Niedermayer 707e8612e8 Merge remote branch 'qatar/master'
* qatar/master:
  Implement fate-rsync target
  Make ffmpeg support generic data stream

Conflicts:
	cmdutils.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-04 04:06:26 +02:00
Luca Barbato e3b540b424 Make ffmpeg support generic data stream
The patch is the first step to support -dcodec copy
2011-05-03 11:51:55 +02:00
Michael Niedermayer 2525821f1a Merge remote branch 'qatar/master'
* qatar/master:
  vp8: frame-multithreading.
Duplicate  Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
Duplicate  Replace deprecated av_get_pict_type_char() with av_get_picture_type_char().
Bug spoted&removed in last merge:  dpx: Do not use DPX encoder for decoding.

Conflicts:
	ffmpeg.c
	ffplay.c
	libavcodec/h264.c
	libavcodec/mpeg12.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-03 04:08:23 +02:00
Stefano Sabatini ce5e49b0c2 replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_* 2011-05-02 16:41:41 +02:00
Stefano Sabatini 301183d9be replace deprecated av_get_pict_type_char() with av_get_picture_type_char() 2011-05-02 16:41:35 +02:00
Stefano Sabatini 975a1447f7 Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 12:18:44 +02:00
Stefano Sabatini 6209669de4 Replace deprecated av_get_pict_type_char() with av_get_picture_type_char().
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 11:24:45 +02:00
Stefano Sabatini 35fe66abbc lavfi: rename AVFilterBufferRefVideoProps.pixel_aspect to sample_aspect_ratio
Improve consistency with libavcodec.

This breaks libavfilter API/ABI.

The non-sequential 2.1.0 -> 2.4.0 bump is due to the mess previously
done with the lavfi minor number.
2011-05-01 13:10:18 +02:00
Stefano Sabatini 77e9dee8ae lavc: add a sample_aspect_ratio field to AVFrame
The sample aspect ratio is a per-frame property, so it makes sense to
define it in AVFrame rather than in the codec/stream context.
Simplify application-level sample aspect ratio information extraction,
and allow further simplifications.
2011-05-01 13:10:06 +02:00
Michael Niedermayer fa1195227f FFMPEG: support demuxer specific options.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-30 22:09:15 +02:00
Michael Niedermayer 7d727f1338 LAVFAPI: avformat_alloc_output_context() / simplify usage of muxers.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-30 22:09:15 +02:00
Michael Niedermayer be315a3232 Merge remote branch 'qatar/master'
* qatar/master:
Duplicate  AMV: disable DR1 and don't override EMU_EDGE
Duplicate  lavf: inspect more frames for fps when container time base is coarse
Wrong and we have correct fix: Fix races in default av_log handler
  vorbis: Replace sized int_fast integer types with plain int/unsigned.
  Remove disabled non-optimized code variants.
NO  bswap.h: Remove disabled code.
  Remove some disabled printf debug cruft.
  Replace more disabled printf() calls by av_dlog().
NO  tests: Remove disabled code.
NO  Replace some commented-out debug printf() / av_log() messages with av_dlog().
  vorbisdec: Replace some sizeof(type) by sizeof(*variable).
NO  vf_fieldorder: Replace FFmpeg by Libav in license boilerplate.

Conflicts:
	libavcodec/h264.c
	libavcodec/vorbisdec.c
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-30 01:58:26 +02:00
Diego Biurrun 2e15305b70 Remove some disabled printf debug cruft. 2011-04-29 20:00:53 +02:00
Michael Niedermayer 0886267e3c Revert buggy hunk that leaked in from a libav merge.
This unbreaks compilation with --disable-avfilter.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 14:09:26 +02:00
Michael Niedermayer d7e5aebae7 Merge remote branch 'qatar/master'
* qatar/master: (23 commits)
  ac3enc: correct the flipped sign in the ac3_fixed encoder
  Eliminate pointless '#if 1' statements without matching '#else'.
  Add AVX FFT implementation.
  Increase alignment of av_malloc() as needed by AVX ASM.
  Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX.
  mjpeg: Detect overreads in mjpeg_decode_scan() and error out.
  documentation: extend documentation for ffmpeg -aspect option
  APIChanges: update commit hashes for recent additions.
  lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums
  aac: add headers needed for log2f()
  lavc: remove FF_API_MB_Q cruft
  lavc: remove FF_API_RATE_EMU cruft
  lavc: remove FF_API_HURRY_UP cruft
  pad: make the filter parametric
  vsrc_movie: add key_frame and pict_type.
  vsrc_movie: fix leak in request_frame()
  lavfi: add key_frame and pict_type to AVFilterBufferRefVideo.
  vsrc_buffer: add sample_aspect_ratio fields to arguments.
  lavfi: add fieldorder filter
  scale: make the filter parametric
  ...

Conflicts:
	Changelog
	doc/filters.texi
	ffmpeg.c
	libavcodec/ac3dec.h
	libavcodec/dsputil.c
	libavfilter/avfilter.h
	libavfilter/vf_scale.c
	libavfilter/vf_yadif.c
	libavfilter/vsrc_buffer.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 03:51:04 +02:00
Michael Niedermayer a38cdfde52 vsrc_buffer: Set output size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 18:16:48 +02:00
Michael Niedermayer 7a11c82fb7 vsrc_buffer: add sample_aspect_ratio fields to arguments.
This fixes aspect handling in ffmpeg.

This is based on a patch by Baptiste.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:38:24 +02:00
Michael Niedermayer 7b376b398a Merge remote branch 'qatar/master'
* qatar/master:
  Handle unicode file names on windows
  rtp: Rename the open/close functions to alloc/free
  Lowercase all ff* program names.
  Refer to ff* tools by their lowercase names.
NOT Pulled  Replace more FFmpeg instances by Libav or ffmpeg.
  Replace `` by $() syntax in shell scripts.
  patcheck: Allow overiding grep program(s) through environment variables.
NOT Pulled  Remove stray libavcore and _g binary references.
  vorbis: Rename decoder/encoder files to follow general file naming scheme.
  aacenc: Fix whitespace after last commit.
  cook: Fix small typo in av_log_ask_for_sample message.
  aacenc: Finish 3GPP psymodel analysis for non mid/side cases.
  Remove RDFT dependency from AAC decoder.
  Add some debug log messages to AAC extradata
  Fix mov debug (u)int64_t format strings.
  bswap: use native types for av_bwap16().
  doc: FLV muxing is supported.
  applehttp: Handle AES-128 encrypted streams
  Add a protocol handler for AES CBC decryption with PKCS7 padding
  doc: Mention that DragonFly BSD requires __BSD_VISIBLE set

Conflicts:
	ffplay.c
	ffprobe.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 03:41:22 +02:00
Diego Biurrun 89b503b55f Lowercase all ff* program names. 2011-04-23 19:12:24 +02:00
Carl Eugen Hoyos 3c483620c9 Cosmetics: Rename variable daemon as run_as_daemon.
daemon() is defined in unistd.h for BSD and Cygwin.
2011-04-22 18:49:44 +02:00
Michael Niedermayer 8772156be0 Merge remote branch 'qatar/master'
* qatar/master:
  APIChanges: document git revision for CODEC_CAP_SLICE_THREADS addition.
  Introduce slice threads flag.
  FATE: allow forcing thread-type when doing threaded fate runs.
  Use av_log_ask_for_sample() where appropriate.
  error: sort, pack, and align error code and string definitions
  The stabilization period after version bumps should be one month, not one week.
  applehttp: Expose the stream bitrate via metadata
  doc: Add some initial docs on the applehttp demuxer
  Provide a fallback version of the libm function trunc
  libavdevice: Define _XOPEN_SOURCE for usleep
  lavc: provide deprecated avcodec_thread_init until next major version
  lavc: provide the opt.h header until the next bump
  error: change AVERROR_EOF value
  error: remove AVERROR_NUMEXPECTED
  error: add error code AVERROR_OPTION_NOT_FOUND, and use it in opt.c

Conflicts:
	libavcodec/h264.c
	libavutil/error.c
	libavutil/error.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-22 03:54:30 +02:00
Stefano Sabatini 7046b63e69 ffmpeg: call pre_process_video_frame() only if decoding is needed
In output_packet(), move the pre_process_video_frame() call inside the
if (ist->decoding_needed) { } block. This way
pre_process_video_frame() is not called when stream-copy has been
selected.

Also simplify.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-21 12:08:42 +02:00
Stefano Sabatini 79157f400b error: remove AVERROR_NUMEXPECTED
AVERROR_NUMEXPECTED is used only in the image muxer and demuxer, and
has a too much specific meaning, which is better explained through a
log message. Thus it can be replaced by AVERROR(EINVAL).

This breaks API.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-21 07:10:16 +02:00
Baptiste Coudurier 2c18893a91 In libx264 wrapper, correctly support 2pass log filename option. 2011-04-20 15:46:40 -07:00
Michael Niedermayer efb5fa79f5 Merge remote branch 'qatar/master'
* qatar/master: (37 commits)
  In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function.
  lavc: remove reference to opt.h from Makefile.
  prefer avio_check() over url_exist()
  avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
  lavu: remove misc disabled cruft
  lavu: remove FF_API_OLD_IMAGE_NAMES cruft
NOT PULLED  lavu: remove FF_API_OLD_EVAL_NAMES cruft
  lavc: remove misc disabled cruft.
  lavc: remove the FF_API_INOFFICIAL cruft.
  lavc: remove the FF_API_SET_STRING_OLD cruft.
  lavc: remove the FF_API_USE_LPC cruft.
  lavc: remove the FF_API_SUBTITLE_OLD cruft.
  lavc: remove the FF_API_VIDEO_OLD cruft.
  lavc: remove the FF_API_AUDIO_OLD cruft.
  lavc: remove the FF_API_OPT_SHOW cruft.
  lavc: remove the FF_API_MM_FLAGS cruft.
  lavf: remove misc disabled cruft.
  lavf: remove FF_API_INDEX_BUILT cruft
  lavf: remove FF_API_URL_CLASS cruft.
  lavf: remove FF_API_SYMVER cruft
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-20 04:48:23 +02:00
Stefano Sabatini 55815edca0 prefer avio_check() over url_exist()
The problem with url_exist() is that it tries to open a resource in
RDONLY mode. If the file is a FIFO and there is already a reading
client, the open() call will hang.

By using avio_check() with access mode of 0, the second reading
process will check if the file exists without attempting to open it,
thus avoiding the lock.

Fix issue #1663.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-19 19:48:07 +02:00
Stefano Sabatini 59d96941f0 avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
Make AVIO_FLAG_ access constants work as flags, and in particular fix
the behavior of functions (such as avio_check()) which expect them to
be flags rather than modes.

This breaks API.
2011-04-19 19:47:58 +02:00
Anton Khirnov 41d0eb1c81 lavc: remove the FF_API_SET_STRING_OLD cruft. 2011-04-19 18:41:00 +02:00
Anton Khirnov 761ad42968 lavf: remove FF_API_MAX_STREAMS cruft 2011-04-19 18:28:38 +02:00
Stefano Sabatini c438c90756 ffmpeg: reformat resample condition code in transcode()
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:59 +02:00
Stefano Sabatini 0f230c53df ffmpeg: factorize resampling condition check in do_video_out()
Simplify and improve readability.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:59 +02:00
Stefano Sabatini 6a46aab49b ffmpeg: prefer "dec" over "ist->st->codec" in do_video_out() snippet
Simplify, ease readability.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:59 +02:00
Stefano Sabatini dfc6f5ae90 ffmpeg: improve reporting if size/pixel format changes
Use av_log() rather than fprintf(stderr, ...), and show information
related to the previous size/pixel format configuration.

Consistent with the corresponding message issued in case of audio
configuration change.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:58 +02:00
Stefano Sabatini 58bc9ac5cb ffmpeg: remove unused fields AVOutputStream.original_width/height
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:58 +02:00
Stefano Sabatini b0b83973d1 ffmpeg: remove unused variable padding_src in do_video_out()
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:47 +02:00
Michael Niedermayer 39aafa5ee9 ffmpeg:Daemon mode, add -d as first option to try it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-19 01:54:58 +02:00
Michael Niedermayer 17ee7b5515 ffmpeg:Fix negative verbositiy
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-19 01:54:58 +02:00
Baptiste Coudurier abf8342aa9 ffmpeg: fix -aspect cli option
Redesign the way -aspect option is handled. This is done by making
ffmpeg read the sample aspect ratio set in the corresponding input
stream by default, and overriding it using the value specified by
-aspect.

If the output display aspect ratio is specified with -aspect, it is
set at the end of the filterchain, thus overriding the value set by
filters in the filterchain.

This implementation is more robust, since does not modify the
filterchain description (which was creating potential syntax errors).
2011-04-16 16:47:26 -07:00
Stefano Sabatini bdf3d3bf9d ffmpeg: use parse_number_and_die() when it makes sense
Prefer parse_number_or_die() over atoi()/atol() parsing for the options:
-pass, -top, -vc, and -qscale.

Improve input validation.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-16 21:47:06 +02:00
Stefano Sabatini 5381823eb6 ffmpeg: rename configure_filters() to configure_video_filters()
Mostly useful for the audio-filters branch, to make more apparent the
distinction between configure_audio_filters() and
configure_video_filters().

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-11 00:14:55 +02:00
Lou Logan f8de11cf7d Redefine sameq
I think the documentation of sameq is causing confusion and misuse of
this option.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-10 09:27:50 +02:00
Michael Niedermayer d4d09329ee Merge remote branch 'qatar/master'
* qatar/master:
  lavf: bump minor and add an APIChanges entry for avformat cleanup
  lavf: get rid of ffm-specific stuff in avformat.h
Not pulled:  avio: deprecate av_protocol_next().
  avio: add a function for iterating though protocol names.
  lavf: rename a parameter of av_sdp_create from buff->buf
  lavf: rename avf_sdp_create to av_sdp_create.
  lavf: make av_guess_image2_codec internal
  avio: make URLProtocol internal.
  avio: make URLContext internal.
  lavf: mark av_pkt_dump(_log) for remove on $next+1 bump.
  lavf: use designated initializers for all protocols
  applehttp: don't use deprecated url_ functions.
  avio: move two ff_udp_* functions from avio_internal to url.h
  asfdec: remove a forgotten declaration of nonexistent function
  avio: deprecate the typedef for URLInterruptCB

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-09 03:17:07 +02:00
Anton Khirnov 3ee53dabcf lavf: get rid of ffm-specific stuff in avformat.h 2011-04-08 20:58:19 +02:00
Anton Khirnov c3675dfe1e lavf: rename avf_sdp_create to av_sdp_create.
The new name is more consistent with the rest of the API.
2011-04-08 16:45:40 +02:00
Michael Niedermayer c88caa522c Merge remote branch 'qatar/master'
* qatar/master:
  proto: include os_support.h in network.h
  matroskaenc: don't write an empty Cues element.
  lavc: add a FF_API_REQUEST_CHANNELS deprecation macro
  avio: move extern url_interrupt_cb declaration from avio.h to url.h
  avio: make av_register_protocol2 internal.
  avio: avio_ prefix for url_set_interrupt_cb.
  avio: AVIO_ prefixes for URL_ open flags.
  proto: introduce listen option in tcp
  doc: clarify configure features
  proto: factor ff_network_wait_fd and use it on udp

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-08 02:50:13 +02:00
Anton Khirnov 80c6e238b0 avio: avio_ prefix for url_set_interrupt_cb. 2011-04-07 18:11:24 +02:00
Anton Khirnov f87b1b373a avio: AVIO_ prefixes for URL_ open flags. 2011-04-07 18:07:16 +02:00
Michael Niedermayer 6b1c886b65 Fix ticket20
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 23:21:44 +02:00
Michael Niedermayer d6c858658f Revert "ffmpeg: fix aspect ratio setting"
This reverts commit d1eb50bb29.
Reason, it breaks fate
2011-04-06 03:01:25 +02:00
Michael Niedermayer 11d78415ca Merge remote branch 'qatar/master'
* qatar/master:
  psymodel: extend API to include PE and bit allocation.
  avio: always compile dyn_buf functions
  Remove unnecessary parameter from ff_thread_init() and fix behavior
  Revert "aac_latm_dec: use aac context and aac m4ac"
  configure: tell user if libva is enabled like the rest of external libs.
  Add silence support for AV_SAMPLE_FMT_U8.
  avio: make URL_PROTOCOL_FLAG_NESTED_SCHEME internal
  avio: deprecate av_url_read_seek
  avio: deprecate av_url_read_pause
  ac3enc: NEON optimised extract_exponents

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 02:59:49 +02:00
Michael Niedermayer b5ef6f8eb4 Fix crash in ffmpeg.c with PIX_FMT_NONE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 01:09:04 +02:00
Stefano Sabatini d1eb50bb29 ffmpeg: fix aspect ratio setting
This is done by adding a setsar filter at the beginning of the
configured filterchain.

This implementation is more robust, since does not modify the
filterchain description (which was creating potential syntax errors),
but directly modifies the filterchain structure.

This also changes the ffmpeg -aspect behavior, as following filters in
the filterchain can change the DAR/SAR set by the inserted setsar
filter.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-05 15:33:38 +02:00
Alex Converse 14cf0fd2f5 Add silence support for AV_SAMPLE_FMT_U8.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-05 09:08:04 +02:00
Lou Logan 8af3167bb6 Redefine sameq
I think the documentation of sameq is causing confusion and misuse of
this option.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-05 03:21:36 +02:00
Peter Ross 100a6b7c77 ffmpeg: make 'bits_per_raw_sample' option more useful
Currently bits_per_raw_sample is exposed as an AVCodecContext option.
The option is not very useful, because ffmpeg 1) overwrites it with
a value from the upstream codec, or 2) it resets the value whenever
the video is resampled.

This patch adds the -bits_per_raw sample option to FFmpeg, and
caches the value like is done for the -pix_fmt option.

Example usage:
ffmpeg v210.avi -pix_fmt rgb48 -bits_per_raw_sample 10 out%d.dpx

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-04 00:35:58 +02:00
Michael Niedermayer 7d948dc424 Support changing pixel formats on avfilter input.
Fix issue2217
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-03 16:40:12 +02:00
Michael Niedermayer b25d931a82 Fix stream mapping regression
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-02 16:15:16 +02:00
Michael Niedermayer e7c7b0d000 Another aspect ratio fix try. This leaves the setdar addition at the end (preferred by people).
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-01 17:38:29 +02:00
Peter Ross 6408529b5d Increase ffmpeg video encoding buffer size to permit encoding of DPX images
The header generated by the DPX encoder is 1664 bytes.
2011-04-01 23:11:54 +11:00
Michael Niedermayer 859676dd42 Insert setdar at the begin of a filter chain instead the end.
This fixes -vf setsar

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-01 02:14:46 +02:00
Michael Niedermayer 8b8bf89e52 Revert "Do no modify terminal parameters using termios.h"
This reverts commit cb48e245e6.

Reason being we like pressing "q" to quit ffmpeg.

Conflicts:

	ffmpeg.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-31 00:22:29 +02:00
Stefano Sabatini 2ee85c0671 ffmpeg: warns the user when the selected pixel format is ignored 2011-03-27 15:53:45 +02:00
Stefano Sabatini 0c55c6d30e cmdutils: remove list_fmts(), simplify
The function was only used in opt_sample_fmt() for listing the sample
formats. Move list_fmts() functionality directly into
opt_sample_fmt().

Als fix the warning:
ffmpeg.c: In function ‘opt_audio_sample_fmt’:
ffmpeg.c:2877: warning: passing argument 1 of ‘list_fmts’ from incompatible pointer type
cmdutils.h:163: note: expected ‘void (*)(char *, int,  int)’ but argument is of type ‘char * (*)(char *, int,  enum AVSampleFormat)’
2011-03-26 14:40:30 +01:00
Michael Niedermayer 27ef7b1bcd Merge remote-tracking branch 'newdev/master'
* newdev/master:
  mov: set audio service type for AC-3 from bitstream mode in the 'dac3' atom.
  Get audio_service_type for AC-3 based on bitstream mode in the AC-3 parser and decoder, and vice-versa for the AC-3 encoder.
  Use audio_service_type to set stream disposition.
  Add APIchanges entry for audio_service_type.
  Add audio_service_type field to AVCodecContext for encoding and reporting of the service type in the audio bitstream.
  configure: in check_ld, place new -l flags before existing ones
  support @heading, @subheading, @subsubheading, and @subsubsection in texi2pod.pl
  doc: update build system documentation
  aacenc: indentation
  aacenc: fix the side calculation in search_for_ms
  vp8.c: rename EDGE_* to VP8_EDGE_*.

Conflicts:
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/version.h
	libavcodec/vp8.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-26 03:06:30 +01:00
Justin Ruggles 34b47d7cbc Add audio_service_type field to AVCodecContext for encoding and reporting
of the service type in the audio bitstream.
2011-03-25 16:51:53 -04:00
Stefano Sabatini 4ffc79e7a0 ffmpeg: include conditionally the sws_flags variable
The variable is not used when libavfilter is enabled.
Fix the warning:
ffmpeg.c: At top level:
ffmpeg.c:242: warning: ‘sws_flags’ defined but not used
2011-03-25 18:42:51 +01:00
Michael Niedermayer 6dfb4ab8c8 Make multiple Ctrl-C capable to kill stuck protocols.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-25 02:26:49 +01:00
Michael Niedermayer 4fa0e24736 Merge remote-tracking branch 'newdev/master'
* newdev/master: (33 commits)
  Fix an infinite loop when RoQ encoded generated a frame with a size greater than the maximum valid size.
  Add kbdwin.o to AC3 decoder
  Detect byte-swapped AC-3 and support decoding it directly.
  cosmetics: indentation
  Always copy input data for AC3 decoder.
  ac3enc: make sym_quant() branch-free
  cosmetics: indentation
  Add a CPU flag for the Atom processor.
  id3v2: skip broken tags with invalid size
  id3v2: don't explicitly skip padding
  Make sure kbhit() is in conio.h
  fate: update wmv8-drm reference
  vc1: make P-frame deblock filter bit-exact.
  configure: Add the -D parameter to the dlltool command
  amr: Set the AVFMT_GENERIC_INDEX flag
  amr: Set the pkt->pos field properly to the start of the packet
  amr: Set the codec->bit_rate field based on the last packet
  rtsp: Specify unicast for TCP interleaved streams, too
  Set the correct target for mingw64 dlltool
  applehttp: Change the variable for stream position in seconds into int64_t
  ...

Conflicts:
	ffmpeg.c
	ffplay.c
	libavcodec/ac3dec.c
	libavformat/avio.h
	libavformat/id3v2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-23 02:42:56 +01:00
Dave Yeo b58b9fa3b5 Make sure kbhit() is in conio.h
Conio.h is a non-standard header and may not have kbhit()
prototyped. This fixes compile on OS/2 where the EMX version (we're
using a fork) of conio.h only has getch() and getche().

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-22 11:07:46 +00:00
Michael Niedermayer d4a50a2100 Merge remote-tracking branch 'newdev/master'
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-21 03:33:28 +01:00
Panagiotis H.M. Issaris cb48e245e6 Do no modify terminal parameters using termios.h
Remove usage of tcgetattr and tcsetattr to modify terminal
parameters, and rely on ctrl-c to stop instead of pressing 'q'.
On systems with conio.h, keep the old behavior.

Changing the terminal settings causes problems if multiple instances
are running asynchronously on the same terminal, such as during a
parallel FATE run, or if the process crashes before restoring the
terminal.  In both cases, the terminal state is messed up requiring
a manual reset.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-20 21:13:26 +00:00
Stefano Sabatini 17a4ec8e7e ffmpeg: modify help text for the map option
Change "file:stream[:syncfile:syncstream]" to
"file.stream[:syncfile.syncstream]", the latter syntax is more
consistent with the stream identifier form printed by
av_dump_format(), and more readable. Both syntaxes are currently
accepted by the opt_map() code.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-20 21:07:03 +01:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Thierry Foucu a7844c580d Fix compilation error when CONFIG_AVFILTER is not defined.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-17 01:35:08 +01:00
Michael Niedermayer 27efa296c2 Merge branch 'master' of git://git.ffmpeg.org/ffmpeg
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-12 17:55:59 +01:00
Stefano Sabatini 5dbe78bf91 ffmpeg: remove unused variable in ffmpeg_exit()
Fix the warning:
ffmpeg.c: In function ‘ffmpeg_exit’:
ffmpeg.c:509: warning: unused variable ‘j’

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-12 14:08:27 +00:00
Carl Eugen Hoyos 0de8ebf491 Do not use AVFMT_FLAG_NONBLOCK for the output file.
Allows to use output device alsa.
2011-03-08 20:45:26 +01:00
Anton Khirnov db44ea960d avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 76aa876e69)
2011-03-08 02:09:21 +01:00
Michael Niedermayer 8993b5969a Make sure the first q press doesnt f*ck up the protocols and thus written files.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-07 17:25:38 +01:00
Michael Niedermayer 9055240761 Fix seting of decode_interrupt_cb()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-07 17:23:32 +01:00
Anton Khirnov 76aa876e69 avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 11:03:39 -05:00
Anton Khirnov 384c9c2fa7 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a2704c9712)
2011-03-05 02:29:31 +01:00
Anton Khirnov a2704c9712 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:26:57 -05:00
Martin Storsjö d34ffd3ce9 ffmpeg: Use av_pkt_dump_log2
This makes dumped packet timestamps proper for streams with
timebases other than AV_TIME_BASE.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 5e33e7bdac)
2011-03-03 14:15:11 +01:00
Martin Storsjö 5e33e7bdac ffmpeg: Use av_pkt_dump_log2
This makes dumped packet timestamps proper for streams with
timebases other than AV_TIME_BASE.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-02 11:29:38 +01:00
Anton Khirnov ebb92e0768 avio: rename url_fopen/fclose -> avio_open/close.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 22a3212e32)
2011-02-23 18:22:03 +01:00
Anton Khirnov 22a3212e32 avio: rename url_fopen/fclose -> avio_open/close.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 10:18:55 -05:00
Michael Niedermayer 5c20c81bfa Fix issue2619.
regression introduced in 1762d9ced7

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-02-19 17:31:10 +01:00
Anton Khirnov 0ebf475494 lavf: add av_ prefix to dump_format()
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 610219a598)
2011-02-18 19:52:28 +01:00
Anton Khirnov 610219a598 lavf: add av_ prefix to dump_format()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 23:39:56 +00:00
Reinhard Tartler 7ffe76e540 Merge libavcore into libavutil
Done to keep ABI compatible. Otherwise this is just silly
2011-02-16 23:00:30 +01:00
Reinhard Tartler 737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Michael Niedermayer 1762d9ced7 Restructure video filter implemenattion in ffmpeg.c.
This fixes several bugs like multiple outputs and -aspect mixed with -vf

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-02-14 23:03:13 +01:00
Alexander Strange 043d2ff267 Deprecate avcodec_thread_init()
As a side effect of the last commit, avcodec_open() now calls it automatically,
so there is no longer any need for clients to call it.
Instead they should set AVCodecContext.thread_count.

avcodec_thread_free() is deprecated, and will be removed from avcodec.h at the
next MAJOR libavcodec bump.

Rename the functions to ff_thread_init/free, since they are now internal.
Wrappers are provided to maintain API compatibility.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit c0b102ca03)
2011-02-11 02:54:08 +01:00
Alexander Strange c0b102ca03 Deprecate avcodec_thread_init()
As a side effect of the last commit, avcodec_open() now calls it automatically,
so there is no longer any need for clients to call it.
Instead they should set AVCodecContext.thread_count.

avcodec_thread_free() is deprecated, and will be removed from avcodec.h at the
next MAJOR libavcodec bump.

Rename the functions to ff_thread_init/free, since they are now internal.
Wrappers are provided to maintain API compatibility.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-09 09:17:28 -05:00
Nicolas George 76ad67cae7 Implement guessed_pts in avcodec_decode_video2
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-02-07 19:32:07 +01:00
James Zern ba3517aa6f cmdutils: fix opt_values leak
Add free to uninit_opts and relocate opt_names to same

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 3a6a9cdf5b)
2011-02-06 20:31:45 +01:00
Alexander Strange fd0ae17aaf Adopt pkt_dts/pkt_pts in lavc clients
No behavior change; this makes DTS reliable with the next patch.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 6b47495397)
2011-02-06 20:31:45 +01:00
Martin Storsjö 42f97696ae Use avformat_free_context for cleaning up muxers
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b22dbb291d)
2011-02-06 20:31:45 +01:00
Stefano Sabatini ab543afe47 Make avfilter_graph_free() free the graph.
Make avfilter_graph_free() free not only the internal structures, but
also the allocated graph, and set the graph pointer to NULL for
increased safety.

Simplify usage.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 4359288c56)
2011-02-06 20:31:42 +01:00
James Zern 3a6a9cdf5b cmdutils: fix opt_values leak
Add free to uninit_opts and relocate opt_names to same

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-05 17:18:45 -05:00
Alexander Strange 6b47495397 Adopt pkt_dts/pkt_pts in lavc clients
No behavior change; this makes DTS reliable with the next patch.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-05 16:37:43 -05:00
Martin Storsjö b22dbb291d Use avformat_free_context for cleaning up muxers
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-04 11:39:55 -05:00
Stefano Sabatini 4359288c56 Make avfilter_graph_free() free the graph.
Make avfilter_graph_free() free not only the internal structures, but
also the allocated graph, and set the graph pointer to NULL for
increased safety.

Simplify usage.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-04 02:55:11 +00:00
Anton Khirnov 4a908866a1 ffmpeg.c: rename map_meta_data option to map_metadata
It's consistent with the -metadata option and easier to write.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 87e4d9b252)
2011-02-04 03:10:09 +01:00
Anton Khirnov 87e4d9b252 ffmpeg.c: rename map_meta_data option to map_metadata
It's consistent with the -metadata option and easier to write.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-02 22:44:37 +01:00
Michael Niedermayer 7b3ea5507c Add sample_aspect_ratio fields to vsrc_buffer arguments.
This fixes aspect handling in ffmpeg
This is based on a patch by baptiste
2011-01-31 21:32:06 +01:00
Stefano Sabatini 5a8d1075ec Make ffmpeg warns the user when the selected sample format is ignored.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit fa34a3626c)
2011-01-31 18:25:46 +01:00
Stefano Sabatini fa34a3626c Make ffmpeg warns the user when the selected sample format is ignored.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-31 12:55:38 +00:00
Diego Elio Pettenò 41727b8522 Make local variables static.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit a6d1bd05c9)
2011-01-26 03:43:29 +01:00
Stefano Sabatini 0f16f72552 Do not set audio_resample to 0 if audio_sync_method is > 1.
If audio_sync_method is >1 the resampler is used for audio drift
compensation, and do_audio_out() was causing an assert failure because
audio_resample was not set.

Fix issue 2516, which was introduced by SVN r25939.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 07b48f8c7a)
2011-01-26 03:43:28 +01:00
Diego Elio Pettenò a6d1bd05c9 Make local variables static.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-25 00:02:41 +00:00
Stefano Sabatini 07b48f8c7a Do not set audio_resample to 0 if audio_sync_method is > 1.
If audio_sync_method is >1 the resampler is used for audio drift
compensation, and do_audio_out() was causing an assert failure because
audio_resample was not set.

Fix issue 2516, which was introduced by SVN r25939.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-24 17:30:33 +00:00
Mike Scheutzow ba0dd9e8ff streamid does not work with newaudio, newvideo, newsubtitle
fixes issue2465.

The problem is that the ffmpeg (the app) -streamid option did not work
with -newaudio/-newvideo/-newsubtitle.

The cause was a conflict between the feature where streamid values were
reset to default for each output filename, and the implementation of
-new*, which requires that the -new* option be specified after the
target filename.

My patch changes the ffmpeg behavior so that user-specified streamid
values apply to all the following output files on the command line
(rather than just the next output filename.)

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 20ac9de3df)
2011-01-23 19:32:07 +01:00
Mike Scheutzow 20ac9de3df streamid does not work with newaudio, newvideo, newsubtitle
fixes issue2465.

The problem is that the ffmpeg (the app) -streamid option did not work
with -newaudio/-newvideo/-newsubtitle.

The cause was a conflict between the feature where streamid values were
reset to default for each output filename, and the implementation of
-new*, which requires that the -new* option be specified after the
target filename.

My patch changes the ffmpeg behavior so that user-specified streamid
values apply to all the following output files on the command line
(rather than just the next output filename.)

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-22 04:10:22 +01:00
Michael Niedermayer 59e2118e97 Update threshold to detect real timebase for stream copy.
This may fix a bug where quicktime files use 1/600 timebase.
2011-01-18 16:04:33 +01:00
Michael Niedermayer d9c3e5f6d8 Feed the filter chain with the sample aspect ratio from the muxer or codec layer
like it has been done prior libavfilter.
2011-01-17 23:22:42 +01:00
Baptiste Coudurier 0f27e6b4c2 New "copytb" ffmpeg cli option to copy input stream time base when stream copying.
This should avoid non monotone timestamps for video streams with vfr.

Originally committed as revision 26340 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 22:01:49 +00:00
Stefano Sabatini 6c18f1cda2 Make opt_audio_sample_fmt() abort in case of invalid sample format
name.

Originally committed as revision 26335 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 20:58:51 +00:00
Ronald S. Bultje 8e8a3cc221 Reindent after 26330.
Originally committed as revision 26331 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 19:31:20 +00:00
Ronald S. Bultje 7f88a5bf9b Introduce av_metadata_copy() to copy metadata from one struct to another.
Originally committed as revision 26330 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 19:30:55 +00:00
Baptiste Coudurier 8a774d3deb Do not allocate unused swscale context when libavfilter is compiled in
Originally committed as revision 26317 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-12 00:52:47 +00:00
Baptiste Coudurier 4618637aca Fix warnings:
ffmpeg.c: In function ‘new_video_stream’:
ffmpeg.c:3701:18: warning: ‘codec_id’ may be used uninitialized in this function
ffmpeg.c: In function ‘new_audio_stream’:
ffmpeg.c:3848:18: warning: ‘codec_id’ may be used uninitialized in this function
ffmpeg.c: In function ‘new_subtitle_stream’:
ffmpeg.c:3926:18: warning: ‘codec_id’ may be used uninitialized in this function

Originally committed as revision 26313 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-11 21:16:00 +00:00
Baptiste Coudurier c961fb3cbb Change 'arg' type in parse_meta_type, fix warning:
ffmpeg.c: In function ‘parse_meta_type’:
ffmpeg.c:3323:13: warning: assignment discards qualifiers from pointer target type

Originally committed as revision 26312 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-11 21:14:11 +00:00
Anatoly Nenashev ee77f986a2 Fix lowres > 0 with --enable-avfilter..
Fixes issue 2072 and issue 2421.

Patch by Anatoly Nenashev, anatoly d nenashev a ovsoft d ru

Originally committed as revision 26252 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 10:16:00 +00:00
Michael Niedermayer b26847b710 Fix/cleanup m/ljpeg encoding pix fmt selection code in ffmpeg.c.
Better ideas are welcome ...

Originally committed as revision 26219 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 04:52:32 +00:00
Anssi Hannula ef2b2243dc Use AVOption for muxers in ffmpeg.
Patch by Anssi Hannula, anssi d hannula d iki d fi

Originally committed as revision 26199 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 16:00:47 +00:00
Aurelien Jacobs 1d6233d315 use avsubtitle_free() instead of re-implementing it partially (fix a memleak)
Originally committed as revision 26175 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-31 00:01:37 +00:00
Anton Khirnov bb62d5c1f0 Allow output formats without any streams.
Required for future metadata format.

Originally committed as revision 26100 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-27 07:46:44 +00:00
Stefano Sabatini f671584845 Reindent.
Originally committed as revision 25940 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-12 16:19:40 +00:00
Stefano Sabatini 8afab68605 Fix encoding when the input audio format/rate/channels changes during
transcoding.

Fix issue #2292.

Patch sponsored by KIM Keep In Mind GmbH, srl.

Originally committed as revision 25939 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-12 16:18:50 +00:00
Justin Ruggles 5d7870dc76 Show per-codec options on FFmpeg commandline help.
Originally committed as revision 25927 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-10 18:25:02 +00:00
Aurelien Jacobs d4a9f37938 cosmetic: indentation
Originally committed as revision 25885 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 14:47:13 +00:00
Aurelien Jacobs 118ccae030 add subtitle codec autodetection
Originally committed as revision 25884 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 14:46:13 +00:00
Stefano Sabatini 037be76e15 Add avfilter_graph_create_filter().
Originally committed as revision 25862 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-02 20:12:27 +00:00
Anton Khirnov 477b1aeac9 ffmpeg.c: copy global metadata by default
Originally committed as revision 25794 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-22 07:32:23 +00:00
Stefano Sabatini 63e8d9760f Use the new libavcore audio channel API.
This also allows to remove a linking dependency of libavfilter on
libavcodec.

Originally committed as revision 25789 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 20:06:22 +00:00
Baptiste Coudurier 7f48bfa1e3 Cosmetics, fix indentation
Originally committed as revision 25773 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-20 08:03:58 +00:00
Aurelien Jacobs cb2c971d91 allow passing subtitles header between decoder and encoder
Originally committed as revision 25745 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-13 13:57:49 +00:00
Aurelien Jacobs 8f55616fac add global header support for subtitles encoding
Originally committed as revision 25742 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-13 13:46:36 +00:00
Stefano Sabatini 5d6e4c160a Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
SampleFormat with AVSampleFormat.

Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 11:04:40 +00:00
Anton Khirnov 09f47fa44e ffmpeg.c: add a forgotten break in chapter copying
only copy chapters from one file

Originally committed as revision 25729 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 06:56:26 +00:00
Anton Khirnov a9c2bf9dc1 ffmpeg.c: reindent
Originally committed as revision 25728 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 06:56:23 +00:00
Anton Khirnov 91e96ebafb ffmpeg.c: add an option for copying chapters
fixes issue 2068

Originally committed as revision 25727 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 06:56:19 +00:00
Anton Khirnov 7b3937360e ffmpeg.c: allow using negative file indices to disable metadata copying
Originally committed as revision 25706 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-08 06:47:41 +00:00
Stefano Sabatini 1e80a0eaa4 Remove graphparser.h header, move AVFilterInOut and
avfilter_graph_parse() declaration to libavfilter/avfiltergraph.h.

Simplify, and less confusing for the user.

Originally committed as revision 25705 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 22:56:29 +00:00
Stefano Sabatini 7313132bcc Rename AVFilterInOut field filter to filter_ctx, more semantically correct.
Originally committed as revision 25700 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 18:40:18 +00:00
Stefano Sabatini 6e872935db Implement get_preset_file() in cmdutils.h and use it to factorize code
from ffmpeg.c and ffserver.c.

Originally committed as revision 25679 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-04 23:07:04 +00:00
Stefano Sabatini 97dd1e4a87 Rename avfilter_graph_destroy() to avfilter_graph_free().
The new name is shorter and more consistent with the rest of the API.

This change breaks libavfilter API/ABI.

Originally committed as revision 25674 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-04 20:34:24 +00:00
Stefano Sabatini e15aeea656 Implement avfilter_graph_alloc().
Originally committed as revision 25673 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-04 20:34:19 +00:00
Stefano Sabatini ba7d6e798e Remove usage of deprecated libavcodec/audioconvert.h functions.
Originally committed as revision 25668 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-03 20:19:34 +00:00
Stefano Sabatini da1b9b88a5 Fix timestamp computation when the timebase changes during filtering.
The timestamps for all the buffered frames are scaled against
AV_TIME_BASE_Q, and need to be scaled back to AV_TIME_BASE_Q when they
are extracted from the filterchain.

Originally committed as revision 25646 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 18:40:59 +00:00
Anton Khirnov 45290fcdf0 ffmpeg.c: reindent
Originally committed as revision 25637 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 06:12:56 +00:00
Anton Khirnov d0abe80aa4 ffmpeg.c: don't autocopy stream/chapter metadata if manual mapping is specified
Originally committed as revision 25636 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 06:12:54 +00:00
Anton Khirnov 1829e19528 ffmpeg.c: extend map_meta_data to allow advanced mappings
i.e. to/from streams/chapters/programs.

Originally committed as revision 25635 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 06:01:28 +00:00
Stefano Sabatini 0422af7e49 Remove ffmpeg PGMYUV compatibility hack, which was deprecated since
ages.

The user is requested to specify "-f image2" in place of "-f pgmyuv"
for reading/writing PGMYUV files, as for the other image formats.

Originally committed as revision 25629 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 00:29:13 +00:00
Stefano Sabatini 2839dc974d Use AV_RL32() in opt_codec_tag().
Originally committed as revision 25618 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-31 22:48:44 +00:00
Ramiro Polla 0d0778b060 ffmpeg: fix opt_codec_tag() return value
opt_codec_tag() is now used under OPT_FUNC2, which must return a value.

Originally committed as revision 25616 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-31 19:55:13 +00:00
Rocky Cardwell b67f3d6575 Fix ffserver-related regression (and crash) introduced in r25500.
Fixes issue 2317.

Patch by Rocky Cardwell, rocky d cardwell a lifespringschool d org

Originally committed as revision 25603 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-29 14:54:18 +00:00
Carl Eugen Hoyos ec1ca41cef Move new_output_stream() up for upcoming fix for issue 2317.
Originally committed as revision 25602 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-29 14:48:38 +00:00
Anton Khirnov 63e856df0a ffmpeg.c: dynamically allocate metadata maps
Originally committed as revision 25599 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-28 20:28:22 +00:00
Stefano Sabatini d0242e741d Factorize: opt_{audio,video,subtitle}_tag() -> opt_codec_tag().
Originally committed as revision 25596 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-28 13:20:26 +00:00
Stefano Sabatini 96ea6ad2a7 Remove unused variables picture_crop_temp and picture_pad_temp.
Originally committed as revision 25530 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-20 09:45:50 +00:00
Nicolas George 4ad08021e8 Add a -force_key_frames option to ffmpeg.
The option is useful to ensure that there is a seek point exactly at a
place the user will probably want to jump precisely sometime, the
major example would be the end of an opening and the beginning of a
chapter. The scene change detection system will often make it happen,
but not always for example if there is a fade-in.

See the thread:
Subject: [FFmpeg-devel] [PATCH] -force_key_frames option
Date: Tue, 12 Oct 2010 15:16:26 +0200

Patch by Nicolas George -mail nicolas,george,normalesup,org.

Originally committed as revision 25526 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-18 21:47:15 +00:00
Stefano Sabatini ff0652e503 Implement a common get_filtered_video_frame(), shared between ffplay.c
and ffmpeg.c.

Originally committed as revision 25520 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-18 13:57:11 +00:00
Stefano Sabatini 16b2691346 Make help message for the -crop* options consistent with that of the
-pad* options and more direct.

Originally committed as revision 25519 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-18 13:43:07 +00:00
Stefano Sabatini 5879ea6d27 Remove -crop* options.
Users are required to use the libavfilter crop filter.

Originally committed as revision 25518 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-18 13:34:46 +00:00
Stefano Sabatini 3f2a7e4277 Cosmetics: use a more compact notation, improve readability and reduce
line count.

Originally committed as revision 25510 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-16 20:57:55 +00:00
Stefano Sabatini dbabc2773a Reset metadata after opt_output_file(), fix the previous commit.
Spotted by elenril on irc.

Originally committed as revision 25509 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-16 16:16:01 +00:00
Stefano Sabatini 4bf65e2a4d Use an AVMetadata struct for storing metadata, simplify.
Originally committed as revision 25508 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-16 15:25:02 +00:00
Anton Khirnov a7e5a832c4 ffmpeg.c/ffprobe.c: remove all uses of av_metadata_conv()
patch by Anton Khirnov  anton _at_ khirnov _dot_ net

Originally committed as revision 25503 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-16 13:04:27 +00:00
Stefano Sabatini 2a24df9357 Add avfilter_graph_config().
Originally committed as revision 25502 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-16 10:20:53 +00:00
Nicolas George 0b6d358a09 Place the bitstream_filters variable in the AVOutputStream, thus
greatly simplifying its handling and reducing code duplication.

Patch by Nicolas George -bsf nicolas*george|normalesup+org.

Originally committed as revision 25501 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-16 10:06:13 +00:00
Nicolas George 9fdf4b5817 Move the allocation of the AVOutputStream structure earlier in the
code flow, in the new_video_stream() / new_audio_stream() /
new_subtitle_stream() functions.

Patch by Nicolas George <$name.$surname@normalesup.org>.

Originally committed as revision 25500 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-16 10:06:10 +00:00
Stefano Sabatini f7ead94c69 Factorize definition of the output_filter defined in both ffplay.c and
ffmpeg.c.
Replace it with a more generic definition which can be shared.

Originally committed as revision 25453 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-12 18:40:26 +00:00
Stefano Sabatini 94498ec98a Extend buffer source to accept the time base for the output PTS.
Originally committed as revision 25451 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-12 18:40:20 +00:00
Alexander Strange 0ff4f0c0fc ffmpeg: Use guess_correct_pts() to set decoded picture timestamps
Originally committed as revision 25431 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-10 02:17:26 +00:00
Aurelien Jacobs fd0368e7ca move av_find_stream_info() info struct to AVStream to avoid messy (re)allocation
Originally committed as revision 25418 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-08 22:01:19 +00:00
Aurelien Jacobs ca8064d2d1 fix bitstream filter option mapping when using -newvideo and friends
There was an off-by-one when addressing bitstream_filters[] in this situation.

Originally committed as revision 25398 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-07 19:25:48 +00:00