Commit Graph

262 Commits

Author SHA1 Message Date
Steven Liu 5702416c57 avformat/flvenc: do not attempt to write duration and filesize when not seekable
Its impossible to update the filesize & duration values if seekback is not
possible as with live streams

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-20 18:07:24 +02:00
Steven Liu c8528e54e5 avformat/flvenc: add no_sequence_end flags for flvflags
when split flv file by flv format at first, and cat flvs file
into one flv file, the flv sequence end is be used,
then the whole flv have many flv sequence end TAG.
this flags can give user an option to ignore write sequence end TAG

Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-14 15:50:07 +02:00
Michael Niedermayer e85c4a4706 avformat/flvenc: Add () around &
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-14 15:50:07 +02:00
Steven Liu 84aebfc74e avformat/flvenc: add FLVFlags for flvflags options
add FLVFlags type, be used to add new FLVFlags options

Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-14 01:45:40 +02:00
Matthieu Bouron 625eb41086 Merge commit '371df9ba71393a1c5429d5f40c76348b30e556c7'
* commit '371df9ba71393a1c5429d5f40c76348b30e556c7':
  flvenc: Provide output bytestream markers

Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2016-06-23 17:43:19 +02:00
Ivan c1f57e2f91 libavformat/flvenc: support for codec configuration change mid stream
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-11 10:54:43 +02:00
Ivan 52985768af libavformat/flvenc: refactoring: extracted method for writing codec headers
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-11 10:54:43 +02:00
Martin Storsjö 371df9ba71 flvenc: Provide output bytestream markers
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 10:36:53 +03:00
Derek Buitenhuis 6f69f7a8bf Merge commit '9200514ad8717c63f82101dc394f4378854325bf'
* commit '9200514ad8717c63f82101dc394f4378854325bf':
  lavf: replace AVStream.codec with AVStream.codecpar

This has been a HUGE effort from:
    - Derek Buitenhuis <derek.buitenhuis@gmail.com>
    - Hendrik Leppkes <h.leppkes@gmail.com>
    - wm4 <nfxjfg@googlemail.com>
    - Clément Bœsch <clement@stupeflix.com>
    - James Almer <jamrial@gmail.com>
    - Michael Niedermayer <michael@niedermayer.cc>
    - Rostislav Pehlivanov <atomnuker@gmail.com>

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-10 20:59:55 +01:00
Marton Balint 28fbdece79 avformat: use ff_standardize_creation_time for formats writing all format string metadata
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-03-03 01:37:18 +01:00
Anton Khirnov 9200514ad8 lavf: replace AVStream.codec with AVStream.codecpar
Currently, AVStream contains an embedded AVCodecContext instance, which
is used by demuxers to export stream parameters to the caller and by
muxers to receive stream parameters from the caller. It is also used
internally as the codec context that is passed to parsers.

In addition, it is also widely used by the callers as the decoding (when
demuxer) or encoding (when muxing) context, though this has been
officially discouraged since Libav 11.

There are multiple important problems with this approach:
    - the fields in AVCodecContext are in general one of
        * stream parameters
        * codec options
        * codec state
      However, it's not clear which ones are which. It is consequently
      unclear which fields are a demuxer allowed to set or a muxer allowed to
      read. This leads to erratic behaviour depending on whether decoding or
      encoding is being performed or not (and whether it uses the AVStream
      embedded codec context).
    - various synchronization issues arising from the fact that the same
      context is used by several different APIs (muxers/demuxers,
      parsers, bitstream filters and encoders/decoders) simultaneously, with
      there being no clear rules for who can modify what and the different
      processes being typically delayed with respect to each other.
    - avformat_find_stream_info() making it necessary to support opening
      and closing a single codec context multiple times, thus
      complicating the semantics of freeing various allocated objects in the
      codec context.

Those problems are resolved by replacing the AVStream embedded codec
context with a newly added AVCodecParameters instance, which stores only
the stream parameters exported by the demuxers or read by the muxers.
2016-02-23 17:01:58 +01:00
Ivan a0174f6729 avformat/flvenc: copyts in FLV muxer
The purpose of this patch is to preserve timestamps when using ffmpeg for publishing RTMP streams, e.g. ffmpeg -i rtmp://source/stream -f flv rtmp://target/stream.
There is a setting "copyts" for that purpose. Unfortunately it doesn't work with FLV muxer because it has its own timestamp correction which makes global setting "copyts" ineffective.

This patch removes timestamp correction in FLV muxer. This means FLV will rely on ffmpeg timestamp correction which makes it possible to use copyts.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-26 20:56:55 +01:00
Maksym Veremeyenko acb430e4d3 avformat/flvenc: Add aac_seq_header_detect and flvflags
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-20 18:18:56 +01:00
Andreas Cadhalpun ed0b1db640 doc: fix spelling errors
Neccessary -> Necessary
formated   -> formatted
thee       -> the
eventhough -> even though
seperately -> separately

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-14 15:09:33 +02:00
Michael Niedermayer 14bc7aaa86 Revert "avformat/flvenc: Allow muxing video codecs which are not explicitly supported by the muxer"
This commit has no known use case ATM as there are no unsupported video codecs in flv and could
theoretically be use to generate broken files allthough that would be not entirely easy as
tags/codecs still get sanity checked

This reverts commit 76f4b11780.
2015-03-22 17:19:25 +01:00
Michael Niedermayer 76f4b11780 avformat/flvenc: Allow muxing video codecs which are not explicitly supported by the muxer
This allows stream copying video codecs before they are explicitly
supported. The same feature was in the past useful for audio codecs
in flv

This partly reverts the changes from 735ab7c5e0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-22 16:20:14 +01:00
Michael Niedermayer 735ab7c5e0 Merge commit 'e767c9e8f2eaa116b61b8b6881b401b54bd320f5'
* commit 'e767c9e8f2eaa116b61b8b6881b401b54bd320f5':
  flv: Validate and reject unsupported codecs

Conflicts:
	libavformat/flvenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-04 20:47:14 +01:00
Luca Barbato e767c9e8f2 flv: Validate and reject unsupported codecs
And provide a more informative message in case of failure.

CC: libav-stable@libav.org
2015-03-04 18:28:40 +01:00
Andreas Cadhalpun e8565d21c2 avformat/flvenc: check that the codec_tag fits in the available bits
flags is later written with avio_w8 and if it doesn't fit in one byte it
triggers an av_assert2.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-28 22:53:12 +01:00
Michael Niedermayer b942a71eaa avformat/flvenc: accept AVMEDIA_TYPE_SUBTITLE instead of DATA for subtitles
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-22 13:26:29 +01:00
Michael Niedermayer 58721388b8 avformat/flvenc: omit more metadata elements with specific meaning
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-05 01:45:49 +01:00
Carl Eugen Hoyos 78093cf849 Print a warning if vp6 is muxed into flv: The output is flipped.
Fixes ticket #4132.
2014-11-23 13:22:27 +01:00
Michael Niedermayer 4b68edd08a flvenc: Remove an unused variable
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-22 22:10:52 +02:00
Michael Niedermayer cc5f731541 avformat/flvenc: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 13:08:05 +01:00
Michael Niedermayer 4127d97c8d Merge commit 'c64f3615118d757dcf76040fe5407bf2b3883206'
* commit 'c64f3615118d757dcf76040fe5407bf2b3883206':
  flvenc: Send new metadata when FLAG_METADATA_UPDATED is set.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 13:01:39 +01:00
Michael Niedermayer bb7be3b763 Merge commit '4d0cd5f58c892276716f46f4b2702915e5018215'
* commit '4d0cd5f58c892276716f46f4b2702915e5018215':
  flvenc: move metadata updates into a single function

Conflicts:
	libavformat/flvenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 12:43:55 +01:00
Andrew Stone c64f361511 flvenc: Send new metadata when FLAG_METADATA_UPDATED is set.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-11-17 09:28:16 +01:00
Andrew Stone 4d0cd5f58c flvenc: move metadata updates into a single function
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-11-17 09:28:06 +01:00
Michael Niedermayer 470e116e3f avformat/flvenc: Use AVFormatContext strict_std_compliance instead of AVCodecContext
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-06 14:47:43 +01:00
Stefano Sabatini f0158e6f0c lavf/flvenc: fail in case the muxed packet is too big
Avoid the creation of files which cannot be successfully decoded by
ffmpeg, for example generated with:
ffmpeg -f lavfi -i sine -af "aselect='not(between(t,100,500))',aresample=min_comp=0.001:min_hard_comp=0.100000" -acodec pcm_s16le -t 1000 -y out_audio.flv
2014-11-03 09:31:48 +01:00
Michael Niedermayer 8cde94ec0d avformat/flvenc: fix codec_id_text check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-02 03:58:54 +02:00
Jeffrey Wescott 07de0db74b avformat/flvenc: When using "-c:d copy", don't require a codec for passing the AMF metadata through from input to output. 2014-09-30 20:27:07 +02:00
Moritz Barsnick 66d02d3ca6 align and correct messages regarding bitstream filters
The messages regarding the recommended use of bitstream filters are somewhat different.
This also adds the ":v" stream specifier to "-bsf h264_mp4toannexb".

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-19 20:18:01 +02:00
Michael Niedermayer 3f2f87cd5a Merge commit '74bc9458057f07c0820c3d3264396c4c64442e47'
* commit '74bc9458057f07c0820c3d3264396c4c64442e47':
  flvenc: Don't over-count metadata.

Conflicts:
	tests/ref/lavf/flv_fmt
	tests/ref/vsynth/vsynth1-flashsv
	tests/ref/vsynth/vsynth1-flv
	tests/ref/vsynth/vsynth2-flashsv
	tests/ref/vsynth/vsynth2-flv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 01:44:24 +02:00
Josh Allmann 74bc945805 flvenc: Don't over-count metadata.
Over-counting occurs if framerate is not set.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-06-17 21:38:21 +02:00
Michael Niedermayer 74760883fc avformat/flvenc: Do not allow creating h263/mpeg4 in flv without unofficial format extensions being enabled.
Found-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-07 12:03:31 +02:00
Michael Niedermayer 2e532aa82d avformat/flvenc: fix assertion failure after 4h muxing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-31 01:43:41 +02:00
Michael Niedermayer e46cc1dab0 Merge commit '43e7f0797f9f821a3866a20f05e512e13c82076a'
* commit '43e7f0797f9f821a3866a20f05e512e13c82076a':
  flvenc: only write the framerate tag based on avg_frame_rate

Conflicts:
	tests/ref/lavf/flv_fmt
	tests/ref/seek/lavf-flv_fmt
	tests/ref/seek/vsynth2-flv
	tests/ref/vsynth/vsynth1-flashsv
	tests/ref/vsynth/vsynth1-flv
	tests/ref/vsynth/vsynth2-flashsv
	tests/ref/vsynth/vsynth2-flv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 13:30:12 +02:00
Anton Khirnov 43e7f0797f flvenc: only write the framerate tag based on avg_frame_rate
Do not fall back on the codec timebase, since that can be anything for
VFR video.
2014-05-29 08:01:30 +02:00
Carl Eugen Hoyos fe9f575924 Warn if s16be is muxed into flv.
Players that conform to the specification can only playback such
files correctly on big-endian hardware.
2014-01-16 00:38:27 +01:00
Michael Niedermayer 6fc9f5e0ff Merge commit 'f412b2c9f3a7add0ab8021262ec4bad249347e30'
* commit 'f412b2c9f3a7add0ab8021262ec4bad249347e30':
  flv: Use the correct type to hold the file offset

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 00:14:11 +01:00
Luca Barbato f412b2c9f3 flv: Use the correct type to hold the file offset 2013-12-20 17:44:20 +01:00
Carl Eugen Hoyos b8667bccad Revert: flvenc: Don't pretend to support muxing "plain" VP6
Muxing VP6 is used by applications and works with Flashplayer.

Reported-by: David Bertrand
2013-12-09 13:18:29 +01:00
Michael Niedermayer 7acb464f0e Merge commit 'e6ed8668597cfea25dfb350a9b4df7fb2efc1d90'
* commit 'e6ed8668597cfea25dfb350a9b4df7fb2efc1d90':
  flvenc: Write proper cropping for VP6 even if there's no extradata

Conflicts:
	libavformat/flvenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-10 12:06:17 +02:00
Michael Niedermayer c2555bcbd1 Merge commit 'be1e1373d267bae2af8a62d79eef736736f24565'
* commit 'be1e1373d267bae2af8a62d79eef736736f24565':
  flvenc: Support muxing VP6A as well

Conflicts:
	libavformat/flvenc.c

See: 42ae83c196
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-10 11:58:58 +02:00
Michael Niedermayer 0efbd98e23 Merge commit '4d7aeff9a1080e64125f3374d993b2c9c4c2751b'
* commit '4d7aeff9a1080e64125f3374d993b2c9c4c2751b':
  flvenc: Don't pretend to support muxing "plain" VP6

Conflicts:
	libavformat/flvenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-10 11:45:45 +02:00
Martin Storsjö e6ed866859 flvenc: Write proper cropping for VP6 even if there's no extradata
This keeps cropping when remuxing from F4V to FLV.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-10 10:42:28 +03:00
Martin Storsjö be1e1373d2 flvenc: Support muxing VP6A as well
Handle it in the same way as VP6F, except for the codec tag.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-10 10:42:10 +03:00
Martin Storsjö 4d7aeff9a1 flvenc: Don't pretend to support muxing "plain" VP6
The plain VP6 format is vertically flipped compared to VP6F/VP6A.
Support for the plain VP6 format was added in 09d8c0ae83 (which
also introduced support for muxing VP6F properly in general).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-10 10:41:44 +03:00
Clément Bœsch 7308439158 lavf: Don't explicitly flush after each written packet in muxers
Since 596e5d4783, this is not necessary anymore. It also allows to
actually disable the flushing, improving write performance (but
possibly giving worse latency in real-time streaming).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 22:17:33 +03:00
Michael Niedermayer 0ea97a1c5b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  cmdutils: Fix build with lavfi disabled
  flvenc: do not mux more than one stream per type

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-16 23:23:16 +02:00
Rafaël Carré 5b27c307e7 flvenc: do not mux more than one stream per type
FLV does not support multiple audio or video streams.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-04-16 10:31:38 +02:00
Michael Niedermayer 7cfaf727a1 flvenc: dont call avio_flush() unconditional
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-08 13:31:53 +02:00
Carl Eugen Hoyos 1741fece70 Only test the first frame for missing aac_adtstoasc bistream filter.
Many players ignore broken aac frames, so don't abort mov or flv
muxing when encountering one, just print a warning instead.

Fixes ticket #2380.
2013-03-26 15:16:07 +01:00
Michael Niedermayer 29707f5ba6 Merge commit 'a925f723a915bc0255e2673f8817af5212131763'
* commit 'a925f723a915bc0255e2673f8817af5212131763':
  rtp: Don't read priv_data unless it is allocated
  flvenc: Check whether seeking back to the header succeeded
  sapenc: Pass the title on to the chained muxers

Conflicts:
	libavformat/flvenc.c
	libavformat/sapenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-21 14:06:42 +01:00
Björn Axelsson 1eaff98c83 flvenc: Check whether seeking back to the header succeeded
The FLV muxer tries to update the header in write_trailer, which is
impossible if writing to a pipe or network stream. Don't write header
data if seeking to the header fails.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-20 12:37:42 +02:00
Clément Bœsch 8b63744f48 Fix "bistream" typo and add a check in tools/patcheck. 2012-12-18 02:47:34 +01:00
Björn Axelsson 2947e7b7a7 flvenc: don't write random data if seek fails
The FLV muxer tries to update the header in write_trailer, which is
impossible if writing to a pipe or network stream. Don't write header
data if seek to header fails.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-13 21:54:35 +01:00
Michael Niedermayer 31ab1575e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec: Convert some commented-out printf/av_log instances to av_dlog
  avcodec: Drop silly and/or broken printf debug output
  avcodec: Drop some silly commented-out av_log() invocations
  avformat: Convert some commented-out printf/av_log instances to av_dlog
  avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
  Remove some silly disabled code.
  ac3dec: ensure get_buffer() gets a buffer for the correct number of channels

Conflicts:
	libavcodec/dnxhddec.c
	libavcodec/ffv1.c
	libavcodec/h264.c
	libavcodec/h264_parser.c
	libavcodec/mjpegdec.c
	libavcodec/motion_est_template.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/put_bits.h
	libavcodec/ratecontrol.c
	libavcodec/wmaenc.c
	libavdevice/timefilter.c
	libavformat/asfdec.c
	libavformat/avidec.c
	libavformat/avienc.c
	libavformat/flvenc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-01 16:12:38 +02:00
Diego Biurrun 11d4e92ed9 avformat: Remove non-compiling and/or silly commented-out printf/av_log statements 2012-10-01 10:24:28 +02:00
Benjamin Larsson 6a08955c10 flvenc: silence bogus warning
The compiler fails to figure out that enc->codec_type can only
have 3 different values.
Thus when an if/else is encountered it triggers on the possibility
of the else case has not initialized the flags variable.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-09-18 10:31:04 +02:00
Stefano Sabatini e592fd0ed1 lavf/flvenc: convert commented debug log to an av_dlog call
Also add some additional info (DTS and DTS time).
2012-09-11 18:58:19 +02:00
Stefano Sabatini da2ea7c33c lavf/flvenc: apply various log fixes/clarifications
Should improve user feedback in case of errors.
2012-09-06 23:39:57 +02:00
Stefano Sabatini 1bd6b0c927 lavf/flvenc: return meaningful error codes 2012-09-06 23:39:57 +02:00
Michael Niedermayer 5e363bb9b3 flvenc: kill a uninitialized variable warning.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-30 05:20:51 +02:00
Michael Niedermayer 7a72695c05 Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'
* commit '36ef5369ee9b336febc2c270f8718cec4476cb85':
  Replace all CODEC_ID_* with AV_CODEC_ID_*
  lavc: add AV prefix to codec ids.

Conflicts:
	doc/APIchanges
	doc/examples/decoding_encoding.c
	doc/examples/muxing.c
	ffmpeg.c
	ffprobe.c
	ffserver.c
	libavcodec/8svx.c
	libavcodec/avcodec.h
	libavcodec/dnxhd_parser.c
	libavcodec/dvdsubdec.c
	libavcodec/error_resilience.c
	libavcodec/h263dec.c
	libavcodec/libvorbisenc.c
	libavcodec/mjpeg_parser.c
	libavcodec/mjpegenc.c
	libavcodec/mpeg12.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pcm.c
	libavcodec/r210dec.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/version.h
	libavdevice/alsa-audio-dec.c
	libavdevice/bktr.c
	libavdevice/v4l2.c
	libavformat/asfdec.c
	libavformat/asfenc.c
	libavformat/avformat.h
	libavformat/avidec.c
	libavformat/caf.c
	libavformat/electronicarts.c
	libavformat/flacdec.c
	libavformat/flvdec.c
	libavformat/flvenc.c
	libavformat/framecrcenc.c
	libavformat/img2.c
	libavformat/img2dec.c
	libavformat/img2enc.c
	libavformat/ipmovie.c
	libavformat/isom.c
	libavformat/matroska.c
	libavformat/matroskadec.c
	libavformat/matroskaenc.c
	libavformat/mov.c
	libavformat/movenc.c
	libavformat/mp3dec.c
	libavformat/mpeg.c
	libavformat/mpegts.c
	libavformat/mxf.c
	libavformat/mxfdec.c
	libavformat/mxfenc.c
	libavformat/nsvdec.c
	libavformat/nut.c
	libavformat/oggenc.c
	libavformat/pmpdec.c
	libavformat/rawdec.c
	libavformat/rawenc.c
	libavformat/riff.c
	libavformat/sdp.c
	libavformat/utils.c
	libavformat/vocenc.c
	libavformat/wtv.c
	libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-07 22:45:46 +02:00
Anton Khirnov 36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Michael Niedermayer d1dad7c824 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpc8: return more meaningful error codes.
  mpc: return more meaningful error codes.
  wv,mpc8: don't return apetag data in packets.
  rtmp: do not warn about receiving metadata packets
  x86: h264dsp: Adjust YASM #ifdefs
  x86: yadif: Mark mmxext optimizations as such
  h264: convert loop filter strength dsp function to yasm.
  Improve descriptiveness of a number of codec and container long names

Conflicts:
	libavcodec/flvdec.c
	libavcodec/libopenjpegdec.c
	libavformat/apetag.c
	libavformat/mp3dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-31 22:41:00 +02:00
Diego Biurrun 0177b7d23a Improve descriptiveness of a number of codec and container long names 2012-07-30 20:46:55 +02:00
Michael Niedermayer 7d1918affe Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flvdec: remove spurious use of stream id
  lavf: deprecate r_frame_rate.
  lavf: round estimated average fps to a "standard" fps.

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-30 00:56:33 +02:00
Anton Khirnov aba232cfa9 lavf: deprecate r_frame_rate.
According to its description, it is supposed to be the LCM of all the
frame durations. The usability of such a thing is vanishingly small,
especially since we cannot determine it with any amount of reliability.
Therefore get rid of it after the next bump.

Replace it with the average framerate where it makes sense.

FATE results for the wtv and xmv demux tests change. In the wtv case
this is caused by the file being corrupted (or possibly badly cut) and
containing invalid timestamps. This results in lavf estimating the
framerate wrong and making up wrong frame durations.
In the xmv case the file contains pts jumps, so again the estimated
framerate is far from anything sane and lavf again makes up different
frame durations.

In some other tests lavf starts making up frame durations from different
frame.
2012-07-29 08:06:30 +02:00
Michael Niedermayer 2cb4d51654 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  v410dec: Implement explode mode support
  zerocodec: fix direct rendering.
  wav: init st to NULL to avoid a false-positive warning.
  wavpack: set bits_per_raw_sample for S32 samples to properly identify 24-bit
  h264: refactor NAL decode loop
  RTMPTE protocol support
  RTMPE protocol support
  rtmp: Add ff_rtmp_calc_digest_pos()
  rtmp: Rename rtmp_calc_digest to ff_rtmp_calc_digest and make it global
  swscale: add missing HAVE_INLINE_ASM check.
  lavfi: place x86 inline assembly under HAVE_INLINE_ASM.
  vc1: Add a test for interlaced field pictures
  swscale: Mark all init functions as av_cold
  swscale: x86: Drop pointless _mmx suffix from filenames
  lavf: use conditional notation for default codec in muxer declarations.
  swscale: place inline assembly bilinear scaler under HAVE_INLINE_ASM.
  dsputil: ppc: cosmetics: pretty-print
  dsputil: x86: add SHUFFLE_MASK_W macro
  configure: respect CC_O setting in check_cc

Conflicts:
	Changelog
	configure
	libavcodec/v410dec.c
	libavcodec/zerocodec.c
	libavformat/asfenc.c
	libavformat/version.h
	libswscale/utils.c
	libswscale/x86/swscale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-23 21:25:09 +02:00
Ronald S. Bultje fd48721849 lavf: use conditional notation for default codec in muxer declarations.
This removes the use of macro nesting in these code constructs, which
makes it easier to parse in pre-processors.
2012-07-22 16:10:21 -07:00
Michael Niedermayer 4453f6b861 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flv: add support for G.711
  doc: git: Add checklist with test steps to perform before pushing
  flvenc: K&R formatting cosmetics
  movenc: Add channel layouts for PCM.

Conflicts:
	libavformat/flvenc.c
	tests/ref/fate/acodec-pcm-s16be
	tests/ref/fate/acodec-pcm-s24be
	tests/ref/fate/acodec-pcm-s32be
	tests/ref/fate/acodec-pcm-s8

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-28 23:57:31 +02:00
Damien Fetis b92c7ee662 flv: add support for G.711
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-06-28 16:53:09 +02:00
Luca Barbato 1cb34ea4fe flvenc: K&R formatting cosmetics 2012-06-28 13:05:43 +02:00
Michael Niedermayer d9a9518fba flvenc: use av_assert instead of assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-11 20:14:22 +02:00
Michael Niedermayer 7d82020fcb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  librtmp: return AVERROR_UNKNOWN instead of -1.
  librtmp: don't abuse a variable for two unrelated things.
  librtmp: add rtmp_app and rtmp_playpath private options.
  bmv: add stricter checks for invalid decoded length
  avpacket: fix duplicating side data.
  flv: support stream text data as onTextData

Conflicts:
	libavcodec/bmv.c
	libavformat/flvdec.c
	libavformat/flvenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-04 00:33:42 +02:00
Luca Barbato 21e2dc9fb7 flv: support stream text data as onTextData
Adobe specifies onTextData as the standard message to use to deliver
text information.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-06-03 03:36:01 +02:00
Michael Niedermayer 938adb7abc Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dwt: K&R prettyprinting cosmetics
  Remove libnut wrapper
  fate: change name of FATE samples location environment variable
  avformat: Add a flag to mark muxers that allow (non strict) monotone timestamps.
  http: Factorize the code by adding http_read_header()

Conflicts:
	configure
	doc/APIchanges
	doc/fate.texi
	libavcodec/dwt.c
	libavcodec/dwt.h
	libavformat/Makefile
	libavformat/avformat.h
	libavformat/libnut.c
	libavformat/matroskaenc.c
	libavformat/utils.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-21 23:53:39 +02:00
James Zern e9cef89702 avformat: Add a flag to mark muxers that allow (non strict) monotone timestamps.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-05-20 19:50:32 -04:00
Michael Niedermayer b4178a3f13 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: Support 'rtmp_live', an option which specifies if the media is a live stream.
  av_samples_fill_array: Mark unmodified function argument as const.
  lagarith: add YUY2 decoding support
  Support decoding unaligned rgb24 lagarith.
  dv: Split profile handling code into a separate file.
  flvenc: use AVFormatContext, not AVCodecContext for logging.
  mov: Remove write-only variable in mov_read_chan().
  fate: Change the probe-format refs to match the final text format committed.
  fate: Add avprobe as a make dependency
  Add probe fate tests to test for regressions in detecting media types.
  fate: Add oneline comparison method
  qdm2: clip array indices returned by qdm2_get_vlc().
  avplay: properly close/reopen AVAudioResampleContext on channel layout change
  avcodec: do not needlessly set packet size to 0 in avcodec_encode_audio2()
  avcodec: for audio encoding, reset output packet when it is not valid
  avcodec: refactor avcodec_encode_audio2() to merge common branches
  avcodec: remove fallbacks for AVCodec.encode() in avcodec_encode_audio2()

Conflicts:
	ffplay.c
	libavcodec/Makefile
	libavcodec/dvdata.c
	libavcodec/dvdata.h
	libavcodec/qdm2.c
	libavcodec/utils.c
	libavformat/flvenc.c
	libavformat/mov.c
	tests/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-08 22:02:59 +02:00
Anton Khirnov 0a3ad7ff80 flvenc: use AVFormatContext, not AVCodecContext for logging.
Encoder tag being used for muxer messages is confusing.
2012-05-07 21:28:40 +02:00
Michael Niedermayer 2e0c360abd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  cosmetics: Align muxer/demuxer declarations
  mpeg12: Do not change frame_pred_frame_dct flag and demote error into a warning
  avcodec: remove avcodec_guess_channel_layout()
  avutil: Add av_get_default_channel_layout()

Conflicts:
	doc/APIchanges
	libavcodec/mpeg12.c
	libavformat/cdg.c
	libavformat/matroskaenc.c
	libavformat/mpegts.c
	libavformat/nuv.c
	libavformat/wav.c
	libavutil/audioconvert.c
	libavutil/audioconvert.h
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-06 22:52:01 +02:00
Martin Storsjö 20234a4bd7 cosmetics: Align muxer/demuxer declarations
Also add missing trailing commas, break long codec_tag lines and
add spaces in codec_tag declarations.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 19:19:59 +03:00
Michael Niedermayer b0a0e83aee Revert "flvenc: Remove apparently unneeded AAC check."
According to video_file_format_spec_v10_1.pdf flv stores AAC RAW
thanks to Baptiste Coudurier for pointing that out

thanks to Aℓex Converse for explaining:
	This can't be at the start of a non-ADTS payload. 111 is the
	EndOfFrame syntax element.

Together these proof that the check was correctly rejecting ADTS which
is not supposed to be in flv. Many players are able to play such ADTS
in flv though but its better if we conform to the spec as this should
ensure that not many but all players can play files generated by ffmpeg.

This reverts commit 3c9a86df0e.
2012-03-12 20:42:25 +01:00
C Chatterjee 3c9a86df0e flvenc: Remove apparently unneeded AAC check.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-12 05:21:59 +01:00
Carl Eugen Hoyos 42ae83c196 Allow muxing VP6A into flv.
Reviewed-by: James Zern
2012-02-05 17:42:26 +01:00
Michael Niedermayer 175cc378b3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Rudimentary IODs support.
  v410enc: fix output buffer size check
  v410enc: include correct headers
  fate: add -pix_fmt rgb48le to r210 test
  flvenc: Support muxing 16 kHz nellymoser
  configure: refactor list of programs into a variable
  fate: add r210 decoder test
  fate: split off Indeo FATE tests into their own file
  fate: split off ATRAC FATE tests into their own file
  fate: Add FATE tests for v410 encoder and decoder
  ARM: fix external symbol refs in rv40 asm
  westwood: Make sure audio header info is present when parsing audio packets
  libgsm: Reset the MS mode of GSM in the flush function
  libgsm: Set options on the right object
  ARM: dca: disable optimised decode_blockcodes() for old gcc

Conflicts:
	configure
	libavformat/movenc.c
	libavformat/movenc.h
	tests/fate2.mak
	tests/ref/acodec/alac
	tests/ref/vsynth1/mpeg4
	tests/ref/vsynth2/mpeg4

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 01:23:15 +01:00
Martin Storsjö bd2ff1a8bc flvenc: Support muxing 16 kHz nellymoser
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-15 16:53:54 +02: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
Mans Rullgard 3383a53e7d lavu: replace int/float punning functions
The existing functions defined in intfloat_readwrite.[ch] are
both slow and incorrect (infinities are not handled).

This introduces a new header with fast, inline conversion
functions using direct union punning assuming an IEEE-754
system, an assumption already made throughout the code.

The one use of Intel/Motorola extended 80-bit format is
replaced by simpler code sufficient under the present
constraints (positive normal values).

The old functions are marked deprecated and retained for
compatibility.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-11 18:47:19 +00:00
Diego Biurrun da9cea77e3 Fix a bunch of common typos. 2011-12-11 00:32:25 +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
Anton Khirnov c3f9ebf743 lavf: make av_set_pts_info private.
It's supposed to be called only from (de)muxers.
2011-11-30 20:34:45 +01:00
Joseph Wecker d31c68a7ed removes spurious warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-30 05:28:07 +01:00
Michael Niedermayer 988f585fcb Merge remote-tracking branch 'qatar/master'
* qatar/master: (44 commits)
  replacement Indeo 3 decoder
  gsm demuxer: do not allocate packet twice.
  flvenc: use first packet delay as global delay.
  ac3enc: doxygen update.
  imc: return error codes instead of 0 for error conditions.
  imc: return meaningful error codes instead of -1
  imc: do not set channel layout for stereo
  imc: validate channel count
  imc: check for ff_fft_init() failure
  imc: check output buffer size before decoding
  imc: use DSPContext.bswap16_buf() to byte-swap packet data
  rtsp: add allowed_media_types option
  libgsm: add flush function to reset the decoder state when seeking
  libgsm: simplify decoding by using a loop
  gsm: log error message when packet is too small
  libgsmdec: do not needlessly set *data_size to 0
  gsmdec: do not needlessly set *data_size to 0
  gsmdec: add flush function to reset the decoder state when seeking
  libgsmdec: check output buffer size before decoding
  gsmdec: log error message when output buffer is too small.
  ...

Conflicts:
	Changelog
	ffplay.c
	libavcodec/indeo3.c
	libavcodec/mjpeg_parser.c
	libavcodec/vp3.c
	libavformat/cutils.c
	libavformat/id3v2.c
	libavutil/parseutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-03 02:16:26 +01:00
Justin Ruggles 905de11907 flvenc: use first packet delay as global delay.
This keeps the streams sychronized. The packets must be interleaved per-DTS.
2011-11-02 19:26:44 -04:00
Michael Niedermayer aedc908601 Merge remote-tracking branch 'qatar/master'
* qatar/master: (35 commits)
  flvdec: Do not call parse_keyframes_index with a NULL stream
  libspeexdec: include system headers before local headers
  libspeexdec: return meaningful error codes
  libspeexdec: cosmetics: reindent
  libspeexdec: decode one frame at a time.
  swscale: fix signed shift overflows in ff_yuv2rgb_c_init_tables()
  Move timefilter code from lavf to lavd.
  mov: add support for hdvd and pgapmetadata atoms
  mov: rename function _stik, some indentation cosmetics
  mov: rename function _int8 to remove ambiguity, some indentation cosmetics
  mov: parse the gnre atom
  mp3on4: check for allocation failures in decode_init_mp3on4()
  mp3on4: create a separate flush function for MP3onMP4.
  mp3on4: ensure that the frame channel count does not exceed the codec channel count.
  mp3on4: set channel layout
  mp3on4: fix the output channel order
  mp3on4: allocate temp buffer with av_malloc() instead of on the stack.
  mp3on4: copy MPADSPContext from first context to all contexts.
  fmtconvert: port float_to_int16_interleave() 2-channel x86 inline asm to yasm
  fmtconvert: port int32_to_float_fmul_scalar() x86 inline asm to yasm
  ...

Conflicts:
	libavcodec/arm/h264dsp_init_arm.c
	libavcodec/h264.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_ps.c
	libavcodec/h264dsp_template.c
	libavcodec/h264idct_template.c
	libavcodec/h264pred.c
	libavcodec/h264pred_template.c
	libavcodec/x86/h264dsp_mmx.c
	libavdevice/Makefile
	libavdevice/jack_audio.c
	libavformat/Makefile
	libavformat/flvdec.c
	libavformat/flvenc.c
	libavutil/pixfmt.h
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-22 01:16:41 +02:00
Justin Ruggles ef74e39799 flvenc: store delay and last_ts per-stream. 2011-10-21 09:43:11 -04:00