| Branch: | Revision:

ffmpeg / ffmpeg.c @ 50d71404

History | View | Annotate | Download (159 KB)

# Date Author Comment
737eb597 02/15/2011 03:18 PM Reinhard Tartler

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...

c0b102ca 02/09/2011 02:17 PM Alexander Strange

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...

3a6a9cdf 02/05/2011 10:18 PM James Zern

cmdutils: fix opt_values leak

Add free to uninit_opts and relocate opt_names to same

Signed-off-by: Ronald S. Bultje <>

6b474953 02/05/2011 09:37 PM Alexander Strange

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 <>

b22dbb29 02/04/2011 04:39 PM Martin Storsjö

Use avformat_free_context for cleaning up muxers

Signed-off-by: Ronald S. Bultje <>

4359288c 02/04/2011 02:55 AM Stefano Sabatini

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 <>

87e4d9b2 02/02/2011 09:44 PM Anton Khirnov

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 <>

fa34a362 01/31/2011 12:55 PM Stefano Sabatini

Make ffmpeg warns the user when the selected sample format is ignored.

Signed-off-by: Mans Rullgard <>

a6d1bd05 01/25/2011 12:02 AM Diego Elio Pettenò

Make local variables static.

Signed-off-by: Mans Rullgard <>

07b48f8c 01/24/2011 05:30 PM Stefano Sabatini

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....

20ac9de3 01/22/2011 03:10 AM Mike Scheutzow

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...

59e2118e 01/18/2011 03:04 PM Michael Niedermayer

Update threshold to detect real timebase for stream copy.
This may fix a bug where quicktime files use 1/600 timebase.

d9c3e5f6 01/17/2011 10:22 PM Michael Niedermayer

Feed the filter chain with the sample aspect ratio from the muxer or codec layer
like it has been done prior libavfilter.

0f27e6b4 01/14/2011 10:01 PM Baptiste Coudurier

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://

6c18f1cd 01/14/2011 08:58 PM Stefano Sabatini

Make opt_audio_sample_fmt() abort in case of invalid sample format

Originally committed as revision 26335 to svn://

8e8a3cc2 01/14/2011 07:31 PM Ronald S. Bultje

Reindent after 26330.

Originally committed as revision 26331 to svn://

7f88a5bf 01/14/2011 07:30 PM Ronald S. Bultje

Introduce av_metadata_copy() to copy metadata from one struct to another.

Originally committed as revision 26330 to svn://

8a774d3d 01/12/2011 12:52 AM Baptiste Coudurier

Do not allocate unused swscale context when libavfilter is compiled in

Originally committed as revision 26317 to svn://

4618637a 01/11/2011 09:16 PM Baptiste Coudurier

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...

c961fb3c 01/11/2011 09:14 PM Baptiste Coudurier

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://

ee77f986 01/07/2011 10:16 AM Anatoly Nenashev

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://

b26847b7 01/05/2011 04:52 AM Michael Niedermayer

Fix/cleanup m/ljpeg encoding pix fmt selection code in ffmpeg.c.
Better ideas are welcome ...

Originally committed as revision 26219 to svn://

ef2b2243 01/02/2011 04:00 PM Anssi Hannula

Use AVOption for muxers in ffmpeg.

Patch by Anssi Hannula, anssi d hannula d iki d fi

Originally committed as revision 26199 to svn://

1d6233d3 12/31/2010 12:01 AM Aurelien Jacobs

use avsubtitle_free() instead of re-implementing it partially (fix a memleak)

Originally committed as revision 26175 to svn://

bb62d5c1 12/27/2010 07:46 AM Anton Khirnov

Allow output formats without any streams.

Required for future metadata format.

Originally committed as revision 26100 to svn://

f6715848 12/12/2010 04:19 PM Stefano Sabatini


Originally committed as revision 25940 to svn://

8afab686 12/12/2010 04:18 PM Stefano Sabatini

Fix encoding when the input audio format/rate/channels changes during

Fix issue #2292.

Patch sponsored by KIM Keep In Mind GmbH, srl.

Originally committed as revision 25939 to svn://

5d7870dc 12/10/2010 06:25 PM Justin Ruggles

Show per-codec options on FFmpeg commandline help.

Originally committed as revision 25927 to svn://

d4a9f379 12/04/2010 02:47 PM Aurelien Jacobs

cosmetic: indentation

Originally committed as revision 25885 to svn://

118ccae0 12/04/2010 02:46 PM Aurelien Jacobs

add subtitle codec autodetection

Originally committed as revision 25884 to svn://

037be76e 12/02/2010 08:12 PM Stefano Sabatini

Add avfilter_graph_create_filter().

Originally committed as revision 25862 to svn://

477b1aea 11/22/2010 07:32 AM Anton Khirnov

ffmpeg.c: copy global metadata by default

Originally committed as revision 25794 to svn://

63e8d976 11/21/2010 08:06 PM Stefano Sabatini

Use the new libavcore audio channel API.

This also allows to remove a linking dependency of libavfilter on

Originally committed as revision 25789 to svn://

7f48bfa1 11/20/2010 08:03 AM Baptiste Coudurier

Cosmetics, fix indentation

Originally committed as revision 25773 to svn://

cb2c971d 11/13/2010 01:57 PM Aurelien Jacobs

allow passing subtitles header between decoder and encoder

Originally committed as revision 25745 to svn://

8f55616f 11/13/2010 01:46 PM Aurelien Jacobs

add global header support for subtitles encoding

Originally committed as revision 25742 to svn://

5d6e4c16 11/12/2010 11:04 AM Stefano Sabatini

Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
SampleFormat with AVSampleFormat.

Originally committed as revision 25730 to svn://

09f47fa4 11/12/2010 06:56 AM Anton Khirnov

ffmpeg.c: add a forgotten break in chapter copying

only copy chapters from one file

Originally committed as revision 25729 to svn://

a9c2bf9d 11/12/2010 06:56 AM Anton Khirnov

ffmpeg.c: reindent

Originally committed as revision 25728 to svn://

91e96eba 11/12/2010 06:56 AM Anton Khirnov

ffmpeg.c: add an option for copying chapters

fixes issue 2068

Originally committed as revision 25727 to svn://

7b393736 11/08/2010 06:47 AM Anton Khirnov

ffmpeg.c: allow using negative file indices to disable metadata copying

Originally committed as revision 25706 to svn://

1e80a0ea 11/07/2010 10:56 PM Stefano Sabatini

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://

7313132b 11/07/2010 06:40 PM Stefano Sabatini

Rename AVFilterInOut field filter to filter_ctx, more semantically correct.

Originally committed as revision 25700 to svn://

6e872935 11/04/2010 11:07 PM Stefano Sabatini

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://

97dd1e4a 11/04/2010 08:34 PM Stefano Sabatini

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://

e15aeea6 11/04/2010 08:34 PM Stefano Sabatini

Implement avfilter_graph_alloc().

Originally committed as revision 25673 to svn://

ba7d6e79 11/03/2010 08:19 PM Stefano Sabatini

Remove usage of deprecated libavcodec/audioconvert.h functions.

Originally committed as revision 25668 to svn://

da1b9b88 11/02/2010 06:40 PM Stefano Sabatini

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://

45290fcd 11/02/2010 06:12 AM Anton Khirnov

ffmpeg.c: reindent

Originally committed as revision 25637 to svn://

d0abe80a 11/02/2010 06:12 AM Anton Khirnov

ffmpeg.c: don't autocopy stream/chapter metadata if manual mapping is specified

Originally committed as revision 25636 to svn://

1829e195 11/02/2010 06:01 AM Anton Khirnov

ffmpeg.c: extend map_meta_data to allow advanced mappings

i.e. to/from streams/chapters/programs.

Originally committed as revision 25635 to svn://

0422af7e 11/02/2010 12:29 AM Stefano Sabatini

Remove ffmpeg PGMYUV compatibility hack, which was deprecated since

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://

2839dc97 10/31/2010 10:48 PM Stefano Sabatini

Use AV_RL32() in opt_codec_tag().

Originally committed as revision 25618 to svn://

0d0778b0 10/31/2010 07:55 PM Ramiro Polla

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://

b67f3d65 10/29/2010 02:54 PM Rocky Cardwell

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://

ec1ca41c 10/29/2010 02:48 PM Carl Eugen Hoyos

Move new_output_stream() up for upcoming fix for issue 2317.

Originally committed as revision 25602 to svn://

63e856df 10/28/2010 08:28 PM Anton Khirnov

ffmpeg.c: dynamically allocate metadata maps

Originally committed as revision 25599 to svn://

d0242e74 10/28/2010 01:20 PM Stefano Sabatini

Factorize: opt_{audio,video,subtitle}_tag() -> opt_codec_tag().

Originally committed as revision 25596 to svn://

96ea6ad2 10/20/2010 09:45 AM Stefano Sabatini

Remove unused variables picture_crop_temp and picture_pad_temp.

Originally committed as revision 25530 to svn://

4ad08021 10/18/2010 09:47 PM Nicolas George

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,...

ff0652e5 10/18/2010 01:57 PM Stefano Sabatini

Implement a common get_filtered_video_frame(), shared between ffplay.c
and ffmpeg.c.

Originally committed as revision 25520 to svn://

16b26913 10/18/2010 01:43 PM Stefano Sabatini

Make help message for the -crop* options consistent with that of the
-pad* options and more direct.

Originally committed as revision 25519 to svn://

5879ea6d 10/18/2010 01:34 PM Stefano Sabatini

Remove -crop* options.

Users are required to use the libavfilter crop filter.

Originally committed as revision 25518 to svn://

3f2a7e42 10/16/2010 08:57 PM Stefano Sabatini

Cosmetics: use a more compact notation, improve readability and reduce
line count.

Originally committed as revision 25510 to svn://

dbabc277 10/16/2010 04:16 PM Stefano Sabatini

Reset metadata after opt_output_file(), fix the previous commit.

Spotted by elenril on irc.

Originally committed as revision 25509 to svn://

4bf65e2a 10/16/2010 03:25 PM Stefano Sabatini

Use an AVMetadata struct for storing metadata, simplify.

Originally committed as revision 25508 to svn://

a7e5a832 10/16/2010 01:04 PM Anton Khirnov

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://

2a24df93 10/16/2010 10:20 AM Stefano Sabatini

Add avfilter_graph_config().

Originally committed as revision 25502 to svn://

0b6d358a 10/16/2010 10:06 AM Nicolas George

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://

9fdf4b58 10/16/2010 10:06 AM Nicolas George

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 <>.

Originally committed as revision 25500 to svn://

f7ead94c 10/12/2010 06:40 PM Stefano Sabatini

Factorize definition of the output_filter defined in both ffplay.c and
Replace it with a more generic definition which can be shared.

Originally committed as revision 25453 to svn://

94498ec9 10/12/2010 06:40 PM Stefano Sabatini

Extend buffer source to accept the time base for the output PTS.

Originally committed as revision 25451 to svn://

0ff4f0c0 10/10/2010 02:17 AM Alexander Strange

ffmpeg: Use guess_correct_pts() to set decoded picture timestamps

Originally committed as revision 25431 to svn://

fd0368e7 10/08/2010 10:01 PM Aurelien Jacobs

move av_find_stream_info() info struct to AVStream to avoid messy (re)allocation

Originally committed as revision 25418 to svn://

ca8064d2 10/07/2010 07:25 PM Aurelien Jacobs

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://

2dec2bb8 10/07/2010 01:57 AM Michael Niedermayer

Pass RC parameters on stream copy to the muxer.

Originally committed as revision 25384 to svn://

1136850d 10/06/2010 06:54 PM Aurelien Jacobs

cosmetic: break long line

Originally committed as revision 25377 to svn://

6d342149 10/05/2010 09:05 PM Aurelien Jacobs

ffmpeg: Fix prototype of some OPT_FUNC2 functions. They must return an int.

Originally committed as revision 25358 to svn://

59ac1da2 10/03/2010 08:23 PM Aurelien Jacobs

cosmetic: break long line

Originally committed as revision 25329 to svn://

a5c33faa 10/02/2010 08:44 AM Reimar Döffinger

Add init and uninit functions to cmdutils, reduces code duplication
between ffmpeg and ffplay and avoids a valgrind error by freeing

Originally committed as revision 25309 to svn://

84fd51e5 10/01/2010 09:56 PM Aurelien Jacobs

ffmpeg: replace MAX_STREAMS by an arbitrary sanity check

Originally committed as revision 25304 to svn://

620a67d5 10/01/2010 09:54 PM Aurelien Jacobs

ffmpeg: dynamically allocate bitstream_filters

Originally committed as revision 25303 to svn://

3a8e8824 10/01/2010 09:52 PM Aurelien Jacobs

ffmpeg: dynamically allocate stream_maps

Originally committed as revision 25302 to svn://

0a6d97b3 10/01/2010 09:51 PM Aurelien Jacobs

ffmpeg: dynamically allocate output_codecs

Originally committed as revision 25301 to svn://

311e223f 10/01/2010 09:41 PM Aurelien Jacobs

ffmpeg: dynamically allocate input_codecs

Originally committed as revision 25300 to svn://

2c6958aa 10/01/2010 09:36 PM Aurelien Jacobs

ffmpeg: dynamically allocate input_files_ts_scale

Originally committed as revision 25299 to svn://

e640f261 10/01/2010 09:34 PM Aurelien Jacobs

ffmpeg: dynamically allocate streamid_map

Originally committed as revision 25298 to svn://

dba249ab 10/01/2010 09:29 PM Aurelien Jacobs

ffmpeg: add a grow_array() helper function

Originally committed as revision 25297 to svn://

b64b4134 10/01/2010 01:55 PM Måns Rullgård

Rename libavutil/assert.h to avassert.h

This avoids conflicts with the system assert.h.

Originally committed as revision 25284 to svn://

b926b628 09/30/2010 09:57 PM Michael Niedermayer

av_assert() system.
With this the developer can now choose if he wants an assert always enabled or at which
compile time assert level. This can thus replace the #define NDEBUG hacks

Originally committed as revision 25278 to svn://

0093ebc2 09/29/2010 11:06 PM Michael Niedermayer

User application side of Codec specific parameters.

Originally committed as revision 25266 to svn://

d04247a1 09/27/2010 07:59 PM Janne Grunau

use strict_std_complience from avcodec_opts[AVMEDIA_TYPE_*]

Options are not yet set for video encoders and for codec specific
defaults it is desireable to set the codec options only after the codec
is known.

Originally committed as revision 25230 to svn://

2bc05d35 09/24/2010 11:14 PM Stefano Sabatini

Change the syntax of the crop filter from x:y:w:h to w:h:x:y.

Slightly more intuitive and required by a pending changes for making
the filter parametric.

Originally committed as revision 25184 to svn://

3f07e8db 09/24/2010 03:40 PM Michael Niedermayer

Doxy consistency cosmetics

Originally committed as revision 25176 to svn://

6b6bca64 09/24/2010 03:39 PM Michael Niedermayer

Enable AV_LOG_SKIP_REPEATED to maintain previous behavior.

Originally committed as revision 25175 to svn://

e44c0156 09/24/2010 12:51 AM Stefano Sabatini

Deprecate av_opt_show() in favor of a new function av_opt_show2(),
which allows to specify only a subset of all the options to show.

Originally committed as revision 25166 to svn://

1790d3b3 09/20/2010 09:48 PM Stefano Sabatini

Move log_callback_help to cmdutils.[hc], for allowing sharing.

Originally committed as revision 25149 to svn://

ff19d16b 09/18/2010 08:19 PM Justin Ruggles

10l: error in last commit. use decoder channels not encoder channels.

Originally committed as revision 25144 to svn://

37f5a713 09/18/2010 08:16 PM Justin Ruggles

Change remaining ost->st->codec and ist->st->codec to enc and dec in

Originally committed as revision 25143 to svn://

2dfa7c72 09/09/2010 08:58 PM Martin Storsjö

Update the audio sample rate when doing lowres audio decoding, before opening the decoder

Originally committed as revision 25090 to svn://