aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
Commit message (Collapse)AuthorAgeFilesLines
...
* avformat/movenc: move the concatenated eac3 packet referenceJames Almer2018-03-151-4/+1
| | | | | | | Simplifies code. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: addition of flag to fragment at every frameVishwanath Dixit2018-02-201-3/+7
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: add VP8 codec supportJames Almer2018-02-061-0/+5
| | | | | | | | | | | | | Demuxing only. Muxing is disabled as altref frame handling is not defined in the spec, and there's no way to know the presence of such frames during stream initialization. Based on a patch by Steven Liu. Fixes ticket #7000 Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: migrate to AVFormatContext->urlMarton Balint2018-01-281-5/+5
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/movenc: Add support for more colorspacesSteven Robertson2017-12-151-9/+16
| | | | | | | | With FCPX 10.4, Apple has expanded the set of colorspace, primaries, and trc flags officially supported in QuickTime files. The expanded set matches the codepoints used in ffmpeg and many other specs. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/movenc: add sdtp (sample dependency) boxJohn Stebbins2017-12-021-0/+30
| | | | | | The sdtp is required by the AppleTV 4K in order to play 2160p60 video. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: write clap atom for uncompressed yuv in movDave Rice2017-11-201-0/+19
| | | | | | fixes 6145 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: correct ImageDescription for uncompressed ycbcrDave Rice2017-11-201-3/+17
| | | | | | | Per https://developer.apple.com/library/content/technotes/tn2162/_index.html Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/movenc: allow writing avc3 sample entry typeJohn Stebbins2017-11-161-0/+1
| | | | | | | The avc3 sample entry type is useful for adaptive streaming. It permits parameter sets to be written inline in the video stream. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: let avpriv_ac3_parse_header() allocate the AC3HeaderInfo structJames Almer2017-11-011-29/+43
| | | | | | | This removes sizeof(AC3HeaderInfo) from the ABI. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* movenc: add m4b to ipod format extensionsLukas Stabe2017-10-301-1/+1
| | | | | | | | m4b is commonly used as extension for m4a audiobook files. The format is exactly the same. The only thing that differs is the extension. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '50a1c66cf6ab7eb683daaa9e2da3869fa3a54609'James Almer2017-10-271-8/+9
|\ | | | | | | | | | | | | | | | | | | | | * commit '50a1c66cf6ab7eb683daaa9e2da3869fa3a54609': ac3_parser: add a public function for parsing the data required by the demuxer avpriv_ac3_parse_header() is left in place but without the GetBitContext parameter, as the mov muxer requires a lot more fields than just bitstream_id and frame_size from the AC3HeaderInfo struct. Merged-by: James Almer <jamrial@gmail.com>
| * Use bitstream_init8() where appropriateDiego Biurrun2017-02-071-2/+2
| |
| * Mark some arrays that never change as const.Anton Khirnov2017-02-011-1/+1
| |
| * mov: Convert to the new bitstream readerAlexandra Hájková2017-01-131-20/+21
| |
| * Use correct printf conversion specifiers for POSIX integer typesDiego Biurrun2016-12-231-1/+1
| |
* | movenc: take packet dts shifting into mention in check_pktJan Ekström2017-10-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | This FFmpeg-specific "fuzzer fix" was never perfect, but now it stopped encoding of actual content with a big enough DTS shift. This returns the function to its original state of results before negative CTS offsets were added. I remember dealing with this function before, but somehow had forgotten about it during VDD. The test cases not tripping this over also didn't help.
* | movenc: Add an option for enabling negative CTS offsetsMartin Storsjö2017-09-281-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | This reduces the need for an edit list; streams that start with e.g. dts=-1, pts=0 can be encoded as dts=0, pts=0 (which is valid in mov/mp4) by shifting the dts values of all packets forward. This avoids the need for edit lists for such streams (while they still are needed for audio streams with encoder delay). This eases conformance with the DASH-IF interoperability guidelines. Signed-off-by: Martin Storsjö <martin@martin.st> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: replace all uses of av_copy_packet()James Almer2017-09-251-3/+4
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/movenc: reindent after the previous commitJames Almer2017-08-091-25/+25
| |
* | lavf/movenc.c: Set sgpd and sbgp atoms to represent decoder delay for AAC.Sasi Inguva2017-08-101-7/+15
| | | | | | | | | | | | | | | | According to https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html and ISO-IEC-14496-12 Section 10.1.1.1 and 10.1.1.3 Signed-off-by: Sasi Inguva <isasi@google.com> Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/movenc: support GPMF track (gpmd) remuxingClément Bœsch2017-07-241-0/+25
| | | | | | | | | | See https://github.com/gopro/gpmf-parser for more information on the data stream itself.
* | movenc: Add 'keywords' metadataKieran O'Leary2017-07-131-0/+2
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | movenc: allow alternative hvc1 h.265 codec tagJohn Stebbins2017-07-051-0/+1
| | | | | | | | | | | | | | | | If AVCodecParameters.codec_tag is 'hvc1' use it instead of 'hev1' for h.265 streams. QuickTime (and other Apple software) requires 'hvc1'. (cherry picked from commit 84ab1cc437fa47a00532f305b9fe15b5b66c8c5e) Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | movenc: write correct format hvcc when tag is hvc1John Stebbins2017-07-051-1/+4
| | | | | | | | | | (cherry picked from commit 1ea9b7fdf99b60c0db95a2ce97b2108469bbb245) Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | movenc: move tags definitions to where they are usedJohn Stebbins2017-07-051-31/+31
| | | | | | | | | | (cherry picked from commit 1c64bae648eeb39c8d8a8d81ee142b9eec9fae7b) Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | movenc: simplify codec_tag lookupJohn Stebbins2017-07-051-53/+15
| | | | | | | | | | | | | | | | | | | | | | mux.c init_muxer() already sets codec_tag correctly in the cases simplified here. This also adds the capability to support alternative tags for the same codec_id. (cherry picked from commit f6f86f432fe51526a7aad2bdb025d6a45d239883) Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | movenc: use correct tag list for AVOutputFormat.codec_tagJohn Stebbins2017-07-041-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ff_mp4_obj_type contains the wrong type of tags for AVOutputFormat.codec_tag. AVOutputFormat.codec_tag is used to validate AVCodecParameters.codec_tag so needs to be the same type of tag. Creates new tag lists for mp4 and ismv. New tag lists support same list of codecs found in ff_mp4_obj_type. psp uses the same tag list as mp4 since these both use mp4_get_codec_tag to look up tags. (cherry picked from commit 713efb2c0d013a42be4051adb7cd90a7c2cbbb4f) Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | movenc: encryption with time code track fixerankor2017-05-281-3/+3
| | | | | | | | | | | | | | | | | | instead of deciding whether to encrypt based on the encryption scheme, decide according to whether cenc was initialized or not. mov_create_timecode_track calls ff_mov_write_packet with a track that doesn't have cenc initialized. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/movenc: always check for new extradata on a packetJames Almer2017-05-241-16/+18
| | | | | | | | | | | | | | | | Don't just look at zero sized packets, and also check for AAC extradata updates, in preparation for the following patches. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/movenc: remove experimental check for VP9 streamsJames Almer2017-05-171-7/+0
| | | | | | | | The muxer has been updated and is now complaint with the v1.0 of the spec.
* | movenc/isom: update vpcC box to version 1.0 of the specificationHendrik Leppkes2017-05-161-1/+2
| | | | | | | | | | | | | | | | | | This brings our generation of the vpcC box up to date to version 1.0 of the VP Codec ISO Media File Format Binding. Specifically, color/transfer properties are now written with values based on ISO/IEC 23001-8, which is the same reference specification the AVColor* enumerations are based on.
* | avformat/movenc: Explicitly address potential division by zero.Lucas Cooper2017-04-291-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | find_fps attempts to infer framerate from AVCodec's timebase. When this results in a frame rate that isn't explicitly marked as supported in av_timecode_check_frame_rate, find_fps returns the AVStream's avg_frame_rate, which, per avformat.h, _may_ be set (or not). mov_get_mpeg2_xdcam_codec_tag, mov_get_h264_codec_tag and find_compressor attempt to call av_q2d on the return value of find_fps, which in the above case, may result in division by zero and therefore, an undefined frame rate when NaN is converted to int. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/movenc: Fix potential leak of sgpd_entries array.Matthew Gregan2017-04-121-1/+3
| | | | | | | | | | Signed-off-by: Matthew Gregan <kinetik@flim.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/movenc: Fix mix of declaration and statementMichael Niedermayer2017-04-111-4/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/movenc: Add experimental muxing support for Opus in ISO BMFF (MP4).Matthew Gregan2017-04-111-8/+129
| | | | | | | | | | | | | | | | | | Based on the draft spec at http://vfrmaniac.fushizen.eu/contents/opus_in_isobmff.html '-strict -2' is required to create files in this format. Signed-off-by: Matthew Gregan <kinetik@flim.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/movenc: auto insert vp9_superframe bsf when neededJames Almer2017-04-101-0/+2
| | | | | | | | | | | | | | Experimental VP9 support was added to the muxer recently. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | Fix all -Wformat warnings raised by DJGPPClément Bœsch2017-03-291-3/+3
| |
* | lavf: fix usages of av_get_codec_tag_string()Clément Bœsch2017-03-291-5/+1
| |
* | avformat/movenc: allow st3d and sv3d mov atoms to be written in strict ↵James Almer2017-03-271-1/+1
| | | | | | | | | | | | | | unofficial mode They are unofficial extensions to the format for the time being, not an experimental feature.
* | avformat/movenc: restrict st3d and sv3d mov atoms to MODE_MP4James Almer2017-03-271-1/+1
| |
* | movenc: Add support for writing st3d and sv3d boxes.Aaron Colwell2017-03-271-0/+99
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat, ffmpeg: deprecate old rotation APIwm42017-03-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old "API" that signaled rotation as a metadata value has been replaced by DISPLAYMATRIX side data quite a while ago. There is no reason to make muxers/demuxers/API users support both. In addition, the metadata API is dangerous, as user tags could "leak" into it, creating unintended features or bugs. ffmpeg CLI has to be updated to use the new API. In particular, we must not allow to leak the "rotate" tag into the muxer. Some muxers will catch this properly (like mov), but others (like mkv) can add it as generic tag. Note applications, which use libavformat and assume the old rotate API, will interpret such "rotate" user tags as rotate metadata (which it is not), and incorrectly rotate the video. The ffmpeg/ffplay tools drop the use of the old API for muxing and demuxing, as all muxers/demuxers support the new API. This will mean that the tools will not mistakenly interpret per-track "rotate" user tags as rotate metadata. It will _not_ be treated as regression. Unfortunately, hacks have been added, that allow the user to override rotation by setting metadata explicitly, e.g. via -metadata:s:v:0 rotate=0 See references to trac #4560. fate-filter-meta-4560-rotate0 tests this. It's easier to adjust the hack for supporting it than arguing for its removal, so ffmpeg CLI now explicitly catches this case, and essentially replaces the "rotate" value with a display matrix side data. (It would be easier for both user and implementation to create an explicit option for rotation.) When the code under FF_API_OLD_ROTATE_API is disabled, one FATE reference file has to be updated (because "rotate" is not exported anymore). Tested-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer2017-03-211-1/+1
|\| | | | | | | | | | | | | * commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
| * lavf: fix usage of AVIOContext.seekableAnton Khirnov2016-09-301-1/+1
| | | | | | | | | | | | | | | | It is supposed to be a flag. The only currently defined value is AVIO_SEEKABLE_NORMAL, but other ones may be added in the future. However all the current lavf code treats this field as a bool (mainly for historical reasons). Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
* | movenc: add support for track names in ISML manifestsJan Ekström2017-02-121-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | This enables having multiple tracks of the same type which would be treated as different things by the media server (as opposed to different bit rate versions of the same track). According to the smooth streaming specification, just setting the systemLanguage tag is not enough to note that a track with the same attributes differs from another one. Reviewed-by: Martin Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/movenc: Remove two unused variables.Carl Eugen Hoyos2017-02-101-4/+1
| |
* | avformat/movenc: Restrict experimental VP9 support to MODE_MP4.Matthew Gregan2016-11-211-2/+5
| | | | | | | | | | Signed-off-by: Matthew Gregan <kinetik@flim.org> Signed-off-by: James Almer <jamrial@gmail.com>
* | Add experimental muxing support for FLAC in ISO BMFF (MP4).Matthew Gregan2016-11-211-3/+46
| | | | | | | | | | | | | | | | | | Based on the draft spec at https://git.xiph.org/?p=flac.git;a=blob;f=doc/isoflac.txt '-strict experimental' is required to create files in this format. Signed-off-by: Matthew Gregan <kinetik@flim.org> Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/movenc: Check frame rate before use.Michael Niedermayer2016-11-171-1/+3
| | | | | | | | | | | | | | | | | | Fixes division by 0 This is similar to how avg_frame_rate is checked elsewhere Fixes: 6d24add0455f41b1b45b7ba615cd46f3/asan_generic_dc34c3_5480_0a2ef411cae999b9871ed71a2e481b71.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>