Commit Graph

989 Commits

Author SHA1 Message Date
Jan Ekström 763e823754 movenc: add support for track names in ISML manifests
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>
2017-02-12 20:18:32 +01:00
Carl Eugen Hoyos 74c576957a lavf/movenc: Remove two unused variables. 2017-02-10 12:40:43 +01:00
Matthew Gregan 156fbbb562 avformat/movenc: Restrict experimental VP9 support to MODE_MP4.
Signed-off-by: Matthew Gregan <kinetik@flim.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-21 16:07:14 -03:00
Matthew Gregan 7dc4200c38 Add experimental muxing support for FLAC in ISO BMFF (MP4).
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>
2016-11-21 15:36:42 -03:00
Michael Niedermayer 709c87109d avformat/movenc: Check frame rate before use.
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>
2016-11-17 19:03:41 +01:00
Hendrik Leppkes 4a485daa7f Merge commit '4f7723cb3b913c577842a5bb088c804ddacac8df'
* commit '4f7723cb3b913c577842a5bb088c804ddacac8df':
  movenc: Add an option for skipping writing the mfra/tfra/mfro trailer

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-17 14:54:51 +01:00
Hendrik Leppkes 8fad4b4e25 Merge commit '785c25443b56adb6dbbb78d68cccbd9bd4a42e05'
* commit '785c25443b56adb6dbbb78d68cccbd9bd4a42e05':
  movenc: Apply offsets on timestamps when peeking into interleaving queues

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-13 22:57:02 +01:00
Carl Eugen Hoyos 222f59afd1 lavf/movenc: Do not print an error when muxing gray8 rawvideo.
This was fixed in 9a27780821
2016-11-05 00:43:31 +01:00
Rodger Combs 42cb050a05
lavf/movenc+dashenc: add automatic bitstream filtering
This is disabled by default when the empty_moov flag is enabled
2016-10-24 03:53:23 -05:00
Rodger Combs e83d5d7e58
lavf/movenc: add deinit function 2016-10-24 03:53:22 -05:00
Michael Niedermayer 18ad44d145 avformat/movenc: Skip duration check for discontinuous fragments
Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-19 13:25:21 +02:00
Michael Niedermayer ed2112fb36 avformat/movenc: Check frame rate in mov_write_uuidprof_tag()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-10 00:58:16 +02:00
Michael Niedermayer 21bffa93a6 avformat/movenc: Switch mov_write_uuidprof_tag() to avg_frame_rate
Using the stream timebase simply overflows
Fix integer overflow in psp framerate computation

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-10 00:58:16 +02:00
Carl Eugen Hoyos e84eeca577 lavf/movenc: Put correct display aspect ratio in ARES atom. 2016-09-29 15:41:17 +02:00
Jan Ekström cc725ebe48 movenc: Add support for writing language codes into ISML manifests
Streaming servers appear to ignore all other language metadata.

Signed-off-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Josh de Kock <josh@itanimul.li>
2016-09-29 10:32:03 +01:00
Jan Ekström 6c10f8fe76 movenc: use similar logic to DASH when writing bit rate to ISML
This way, in case of bit rate not being set, max_bitrate will be
used instead. This enables, for example, re-using max_bitrate
information from the input or doing transcoding with a rate
control mode that is not bit rate based.

Signed-off-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 23:45:11 +02:00
Carl Eugen Hoyos 46aae84616 lavf/movenc: Allow to disable writing the timecode track.
Fixes ticket #5492.
2016-09-26 08:50:48 +02:00
Paul B Mahol 88d79dbd16 avformat/movenc: write pasp atom even if sar.num == sar.den
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-22 23:59:46 +02:00
Michael Niedermayer 51000b9945 avformat/movenc: Make the packet check more tolerant
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-16 11:44:13 +02:00
Michael Niedermayer 2834313933 avformat/movenc: Check packet in mov_write_single_packet() too
Fixes assertion failure

Found-by: durandal117
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-16 11:43:56 +02:00
Michael Niedermayer deabcd2c05 avformat/movenc: Factor check_pkt() out
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-16 11:43:47 +02:00
Michael Niedermayer 68f4c2163e avformat/movenc: Check first DTS similar to dts difference
Fixes assertion failure
Fixes: b84b53855a0b74560e64c6f45f505a13/signal_sigabrt_7ffff6ae7c37_3837_ef4e243ea5b4fa8d0becf4afe9166604.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-10 00:50:36 +02:00
Erkki Seppälä 499e8b0952 avformat/movenc: added ability to use original stream ids as track ids instead of regenerating them
Sometimes it's useful to be able to define the exact track numbers in
the generated track, instead of always beginning at track id 1. Using
the option use_stream_ids_as_track_ids now copies the use stream ids
to track ids. Dynamically generated tracks (ie. tmcd) have their track
numbers defined as continuing from the highest numbered stream id.

Signed-off-by: Erkki Seppälä <erkki.seppala.ext@nokia.com>
Signed-off-by: OZOPlayer <OZOPL@nokia.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-01 14:56:10 +02:00
Carl Eugen Hoyos c1de1f0469 lavf/movenc: Add a missing assignment if memory allocation fails.
Fixes a warning:
libavformat/movenc.c:5947:17: warning: statement with no effect [-Wunused-value]
2016-08-24 07:38:19 +02:00
Michael Niedermayer ca906e8190 avformat/movenc: Free extradata after successfull allocation of new instead of before
This avoids erroring out with extradata lost and extradata size mismatching

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-19 16:02:16 +02:00
Umair Khan 4f6f56114e avformat/movenc: allow rewriting extradata
Signed-off-by: Umair Khan <omerjerk@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-19 15:30:52 +02:00
James Almer 0c75bd8e3c avcodec/dnxhddata: move avpriv_dnxhd_parse_header_prefix to a header
It's a small and simple function that can be inlined.

This removes one private symbol and should reduce object dependencies with the next
major bump

Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-25 12:19:39 -03:00
Mark Reid e47981dab7 libavformat/movenc: add dnxhr compatibility for apple players
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-23 13:54:12 +02:00
Martin Storsjö 4f7723cb3b movenc: Add an option for skipping writing the mfra/tfra/mfro trailer
When writing a fragmented file, we by default write an index pointing
to all the fragments at the end of the file. This causes constantly
increasing memory usage during the muxing. For live streams, the
index might not be useful at all.

A similar fragment index is written (but at the start of the file) if
the global_sidx flag is set. If ism_lookahead is set, we need to keep
data about the last ism_lookahead+1 fragments.

If no fragment index is to be written, we don't need to store information
about all fragments, avoiding increasing the memory consumption
linearly with the muxing runtime.

This fixes out of memory situations with long live mp4 streams.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-08 14:11:15 +03:00
Martin Storsjö 785c25443b movenc: Apply offsets on timestamps when peeking into interleaving queues
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-06-28 14:16:06 +03:00
David Murmann 0296b4b8d8 avformat/movenc: add option to use keys/mdta atoms for metadata
Add -movflags use_metadata_tags to the mov muxer. This will cause
the muxer to write all metadata to the file in the keys and mtda
atoms.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-25 14:38:14 +02:00
Clément Bœsch 1e9b79b2db movenc: mark astronomical_body const string as static 2016-06-25 10:30:28 +02:00
Michael Niedermayer 46a60fe184 avformat: Fix ff_interleaved_peek()
Fixes assertion failures in movenc

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-25 03:04:55 +02:00
Clément Bœsch 2c45254a77 Merge commit 'b84f3a40034d28828c4ca639d012479a7eaace28'
* commit 'b84f3a40034d28828c4ca639d012479a7eaace28':
  movenc: Write 'loci' geotag metadata for 3gp and mp4

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-24 11:08:33 +02:00
Clément Bœsch 7a1785014b Merge commit 'f12a705ee570e16ca692c66b62821a2dbdf82566'
* commit 'f12a705ee570e16ca692c66b62821a2dbdf82566':
  movenc: Factorize a function for finding a metadata entry and the associated language

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-24 11:01:40 +02:00
Matthieu Bouron 7e4e8fdd34 Merge commit '72d621069fc301b431fac36b5281699a362562f2'
* commit '72d621069fc301b431fac36b5281699a362562f2':
  movenc: Add a missed const

Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2016-06-23 22:30:37 +02:00
Matthieu Bouron b1e1da52fe Merge commit 'e1eb0fc960163402bbb4e630185790488f7d28ed'
* commit 'e1eb0fc960163402bbb4e630185790488f7d28ed':
  movenc: Use packets in interleaving queues for the duration at the end of fragments

Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2016-06-23 22:02:31 +02:00
Matthieu Bouron 4e7a921282 Merge commit 'dbbaad32e36b9046cd19d6e3329e2ca7ab49b401'
* commit 'dbbaad32e36b9046cd19d6e3329e2ca7ab49b401':
  movenc: Provide output bytestream markers for fragmented content

Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2016-06-23 17:52:14 +02:00
Clément Bœsch 8df1dbd798 Merge commit '5afb94c817abffad030c6b94d7003dca8aace3d5'
* commit '5afb94c817abffad030c6b94d7003dca8aace3d5':
  Mark read-only tables as static

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 22:09:35 +02:00
Clément Bœsch 8ef57a0d61 Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
  cosmetics: Fix spelling mistakes

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Kongqun Yang 54327c2b34 Add experimental support for vp9 in iso-bmff
Implemented according to the draft specification
"VP Codec ISO Media File Format Binding":
http://www.webmproject.org/vp9/#draft-vp-codec-iso-media-file-format-binding

'-strict -2' is required to use this feature.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2016-06-17 10:36:09 -04:00
Michael Niedermayer 5a8b41b4a7 avformat/movenc: Skip unsupported video tracks in timecode generation
Fixes Ticket5414

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-06 01:30:48 +02:00
Marton Balint 0d0b9397d6 avformat/movenc: remove useless if and reindent
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-05-31 00:35:16 +02:00
Marton Balint 15005701b5 avformat/movenc: propagate shift_data errors properly
The second one is not explicitly needed, as res is not reset, but it is there
for consistency.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-05-31 00:35:16 +02:00
Mark Reid d74cc61574 libavformat/movenc: remove unnecessary null check
Fixes CID1361955

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-30 02:33:06 +02:00
Michael Niedermayer dac030d3aa avformat/movenc: Fix potential track width/height overflows
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-29 04:42:04 +02:00
Michael Niedermayer 17d320800b avformat/movenc: Avoid integer overflow
Fixes: CID1361947

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-29 03:56:23 +02:00
Michael Niedermayer 86d703fd55 avformat/movenc: Fix memleak of reshuffled packet
Fixes CID1361952

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-28 03:13:14 +02:00
Michael Niedermayer 5db111757c avformat/movenc: Rename reshuffles return variable to ensure it is not mixed up
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-28 02:55:33 +02:00
Martin Storsjö b84f3a4003 movenc: Write 'loci' geotag metadata for 3gp and mp4
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:55 +03:00