summaryrefslogtreecommitdiff
path: root/libavformat/flvenc.c
Commit message (Collapse)AuthorAge
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | avformat: use ff_standardize_creation_time for formats writing all format ↵Marton Balint2016-03-03
| | | | | | | | | | | | | | string metadata Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/flvenc: copyts in FLV muxerIvan2016-01-26
| | | | | | | | | | | | | | | | | | 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>
* | avformat/flvenc: Add aac_seq_header_detect and flvflagsMaksym Veremeyenko2015-11-20
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | doc: fix spelling errorsAndreas Cadhalpun2015-06-14
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Revert "avformat/flvenc: Allow muxing video codecs which are not explicitly ↵Michael Niedermayer2015-03-22
| | | | | | | | | | | | | | | | | | | | 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 76f4b117807c30a528539fc5c7a7e35cb288cfcf.
* | avformat/flvenc: Allow muxing video codecs which are not explicitly ↵Michael Niedermayer2015-03-22
| | | | | | | | | | | | | | | | | | | | | | | | 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 735ab7c5e04e2316afbd56643c13de17a7ac89cd Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e767c9e8f2eaa116b61b8b6881b401b54bd320f5'Michael Niedermayer2015-03-04
|\| | | | | | | | | | | | | | | | | | | * commit 'e767c9e8f2eaa116b61b8b6881b401b54bd320f5': flv: Validate and reject unsupported codecs Conflicts: libavformat/flvenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flv: Validate and reject unsupported codecsLuca Barbato2015-03-04
| | | | | | | | | | | | And provide a more informative message in case of failure. CC: libav-stable@libav.org
| * flvenc: Remove an unused variableMichael Niedermayer2014-11-22
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/flvenc: check that the codec_tag fits in the available bitsAndreas Cadhalpun2015-02-28
| | | | | | | | | | | | | | 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>
* | avformat/flvenc: accept AVMEDIA_TYPE_SUBTITLE instead of DATA for subtitlesMichael Niedermayer2015-01-22
| | | | | | | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/flvenc: omit more metadata elements with specific meaningMichael Niedermayer2015-01-05
| | | | | | | | | | Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Print a warning if vp6 is muxed into flv: The output is flipped.Carl Eugen Hoyos2014-11-23
| | | | | | | | Fixes ticket #4132.
* | avformat/flvenc: remove unused variableMichael Niedermayer2014-11-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c64f3615118d757dcf76040fe5407bf2b3883206'Michael Niedermayer2014-11-17
|\| | | | | | | | | | | | | * commit 'c64f3615118d757dcf76040fe5407bf2b3883206': flvenc: Send new metadata when FLAG_METADATA_UPDATED is set. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flvenc: Send new metadata when FLAG_METADATA_UPDATED is set.Andrew Stone2014-11-17
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '4d0cd5f58c892276716f46f4b2702915e5018215'Michael Niedermayer2014-11-17
|\| | | | | | | | | | | | | | | | | | | * commit '4d0cd5f58c892276716f46f4b2702915e5018215': flvenc: move metadata updates into a single function Conflicts: libavformat/flvenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flvenc: move metadata updates into a single functionAndrew Stone2014-11-17
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avformat/flvenc: Use AVFormatContext strict_std_compliance instead of ↵Michael Niedermayer2014-11-06
| | | | | | | | | | | | AVCodecContext Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/flvenc: fail in case the muxed packet is too bigStefano Sabatini2014-11-03
| | | | | | | | | | | | 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
* | avformat/flvenc: fix codec_id_text checkMichael Niedermayer2014-10-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/flvenc: When using "-c:d copy", don't require a codec for passing ↵Jeffrey Wescott2014-09-30
| | | | | | | | the AMF metadata through from input to output.
* | align and correct messages regarding bitstream filtersMoritz Barsnick2014-08-19
| | | | | | | | | | | | | | 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>
* | Merge commit '74bc9458057f07c0820c3d3264396c4c64442e47'Michael Niedermayer2014-06-18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * flvenc: Don't over-count metadata.Josh Allmann2014-06-17
| | | | | | | | | | | | Over-counting occurs if framerate is not set. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avformat/flvenc: Do not allow creating h263/mpeg4 in flv without unofficial ↵Michael Niedermayer2014-06-07
| | | | | | | | | | | | | | format extensions being enabled. Found-by: Jean-Baptiste Kempf <jb@videolan.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/flvenc: fix assertion failure after 4h muxingMichael Niedermayer2014-05-31
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '43e7f0797f9f821a3866a20f05e512e13c82076a'Michael Niedermayer2014-05-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * flvenc: only write the framerate tag based on avg_frame_rateAnton Khirnov2014-05-29
| | | | | | | | | | Do not fall back on the codec timebase, since that can be anything for VFR video.
* | Warn if s16be is muxed into flv.Carl Eugen Hoyos2014-01-16
| | | | | | | | | | Players that conform to the specification can only playback such files correctly on big-endian hardware.
* | Merge commit 'f412b2c9f3a7add0ab8021262ec4bad249347e30'Michael Niedermayer2013-12-21
|\| | | | | | | | | | | | | * commit 'f412b2c9f3a7add0ab8021262ec4bad249347e30': flv: Use the correct type to hold the file offset Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flv: Use the correct type to hold the file offsetLuca Barbato2013-12-20
| |
* | Revert: flvenc: Don't pretend to support muxing "plain" VP6Carl Eugen Hoyos2013-12-09
| | | | | | | | | | | | Muxing VP6 is used by applications and works with Flashplayer. Reported-by: David Bertrand
* | Merge commit 'e6ed8668597cfea25dfb350a9b4df7fb2efc1d90'Michael Niedermayer2013-10-10
|\| | | | | | | | | | | | | | | | | | | * 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>
| * flvenc: Write proper cropping for VP6 even if there's no extradataMartin Storsjö2013-10-10
| | | | | | | | | | | | This keeps cropping when remuxing from F4V to FLV. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'be1e1373d267bae2af8a62d79eef736736f24565'Michael Niedermayer2013-10-10
|\| | | | | | | | | | | | | | | | | | | | | * commit 'be1e1373d267bae2af8a62d79eef736736f24565': flvenc: Support muxing VP6A as well Conflicts: libavformat/flvenc.c See: 42ae83c196d5747e8a87772a50a02a7b3f2855c3 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flvenc: Support muxing VP6A as wellMartin Storsjö2013-10-10
| | | | | | | | | | | | Handle it in the same way as VP6F, except for the codec tag. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '4d7aeff9a1080e64125f3374d993b2c9c4c2751b'Michael Niedermayer2013-10-10
|\| | | | | | | | | | | | | | | | | | | * commit '4d7aeff9a1080e64125f3374d993b2c9c4c2751b': flvenc: Don't pretend to support muxing "plain" VP6 Conflicts: libavformat/flvenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flvenc: Don't pretend to support muxing "plain" VP6Martin Storsjö2013-10-10
| | | | | | | | | | | | | | | | The plain VP6 format is vertically flipped compared to VP6F/VP6A. Support for the plain VP6 format was added in 09d8c0ae831 (which also introduced support for muxing VP6F properly in general). Signed-off-by: Martin Storsjö <martin@martin.st>
| * lavf: Don't explicitly flush after each written packet in muxersClément Bœsch2013-09-16
| | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-04-16
|\| | | | | | | | | | | | | | | * 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>
| * flvenc: do not mux more than one stream per typeRafaël Carré2013-04-16
| | | | | | | | | | | | FLV does not support multiple audio or video streams. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | flvenc: dont call avio_flush() unconditionalMichael Niedermayer2013-04-08
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Only test the first frame for missing aac_adtstoasc bistream filter.Carl Eugen Hoyos2013-03-26
| | | | | | | | | | | | | | 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.
* | Merge commit 'a925f723a915bc0255e2673f8817af5212131763'Michael Niedermayer2012-12-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * flvenc: Check whether seeking back to the header succeededBjörn Axelsson2012-12-20
| | | | | | | | | | | | | | | | 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>
* | Fix "bistream" typo and add a check in tools/patcheck.Clément Bœsch2012-12-18
| |
* | flvenc: don't write random data if seek failsBjörn Axelsson2012-12-13
| | | | | | | | | | | | | | | | 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>