summaryrefslogtreecommitdiff
path: root/libavformat/dashenc.c
Commit message (Collapse)AuthorAge
* Merge commit '2cc3936599b6fc63143036659653d1be0624360f'Michael Niedermayer2015-04-20
|\ | | | | | | | | | | | | * commit '2cc3936599b6fc63143036659653d1be0624360f': dashenc: Add a publishTime field in dynamic manifests Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: Add a publishTime field in dynamic manifestsMartin Storsjö2015-04-20
| | | | | | | | | | | | This field is mandatory in dynamic manifests. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '3041183677bda0a431b36e96a2c76617abaa8183'Michael Niedermayer2015-03-19
|\| | | | | | | | | | | | | * commit '3041183677bda0a431b36e96a2c76617abaa8183': dashenc: Heuristically fill in the duration of packets that need it Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: Heuristically fill in the duration of packets that need itMartin Storsjö2015-03-19
| | | | | | | | | | | | | | | | | | | | | | This avoids that the mp4 muxer does a similar heuristic, adjusting the timestamps in a way that the dash muxer doesn't know the actual timestamps written to the file in the end. By making sure that the mp4 muxer internal heuristic isn't applied, we know the exact timestamps written to file, so that the timestamps in manifest match the files. Signed-off-by: Martin Storsjö <martin@martin.st>
| * dashenc: Update extradata for mov muxerTimo Rothenpieler2015-03-06
| | | | | | | | | | | | | | | | | | | | | | | | The mov muxer already supports picking up extradata that wasn't present during the avformat_write_header call - we just need to propagate it. Since the dash muxer uses delay_moov, we have time up until the first segment is written to get extradata filled in. Also update the codec description string when the extradata becomes available. Signed-off-by: Martin Storsjö <martin@martin.st>
| * dashenc: Simplify code by using a local variableTimo Rothenpieler2015-03-06
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * dashenc: Simplify code by using a local variableMartin Storsjö2015-03-02
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/dashenc: Update extradata for mov muxerTimo Rothenpieler2015-03-05
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/dashenc: Update codec_str on extradata_size changeTimo Rothenpieler2015-03-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/dashenc: Use local variable instead of duplicated dereferencesTimo Rothenpieler2015-03-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a'Michael Niedermayer2015-02-25
|\| | | | | | | | | | | | | * commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a': libavformat: Use ffio_free_dyn_buf where applicable Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libavformat: Use ffio_free_dyn_buf where applicableMartin Storsjö2015-02-24
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '3a724a7f3ba7fa766c6a6f0924a15cc742031b8d'Michael Niedermayer2015-01-22
|\| | | | | | | | | | | | | * commit '3a724a7f3ba7fa766c6a6f0924a15cc742031b8d': dashenc: Use inttypes.h macros for format strings instead of %lld Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: Use inttypes.h macros for format strings instead of %lldMartin Storsjö2015-01-22
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * dashenc: Fix format string generationRodger Combs2015-01-22
| | | | | | | | | | | | | | Previously this always used the "lld" format for all parameters, not only time parameters. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/dashenc: fix format string generationRodger Combs2015-01-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '46808fdf04ab113df374157b90b506eb3110daf2'Michael Niedermayer2015-01-05
|\| | | | | | | | | | | | | * commit '46808fdf04ab113df374157b90b506eb3110daf2': movenc: Enable editlists by default if delay_moov is enabled Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Enable editlists by default if delay_moov is enabledMartin Storsjö2015-01-04
| | | | | | | | | | | | | | Being able to write editlists properly is one of the main points in the delay_moov flag. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '7a1a63e34fa46af18311c2493fdaec9a93bdb750'Michael Niedermayer2015-01-03
|\| | | | | | | | | | | | | * commit '7a1a63e34fa46af18311c2493fdaec9a93bdb750': dashenc: Use pts for MPD timeline timestamps Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: Use pts for MPD timeline timestampsMartin Storsjö2015-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should be more correct. This also should give more sensible switching between video streams with different amount of b-frame delay. The current dash.js release (1.2.0) fails to start playback of such files from the start (if the start pts is > 0), but this has been fixed in the current git version of dash.js. Also enable the use of edit lists, so that streams in many cases start at pts=0. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'c5e7ea13d2d4da0c5da91973a547afff6fe9e011'Michael Niedermayer2015-01-03
|\| | | | | | | | | | | | | * commit 'c5e7ea13d2d4da0c5da91973a547afff6fe9e011': dashenc: Use delay_moov Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: Use delay_moovMartin Storsjö2015-01-03
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '8d54bacb789c7d37ca3cf48d9ac13083ad0c1ba7'Michael Niedermayer2014-12-30
|\| | | | | | | | | | | | | * commit '8d54bacb789c7d37ca3cf48d9ac13083ad0c1ba7': dashenc: Remove some stray double spaces Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: Remove some stray double spacesMartin Storsjö2014-12-29
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'b91a5757fcbf723da99b05b298a6f820271dbc2b'Michael Niedermayer2014-12-30
|\| | | | | | | | | | | | | * commit 'b91a5757fcbf723da99b05b298a6f820271dbc2b': dashenc: Fix writing of timelines that don't start at t=0 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: Fix writing of timelines that don't start at t=0Martin Storsjö2014-12-29
| | | | | | | | | | | | | | | | When writing an explicit time, reset the cur_time variable to this value as well. This avoids writing excessive time attributes for each segment in the timeline, as long as the segments are continuous. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '456e93bfdd4cbc5e995dea415019abd0703d0e16'Michael Niedermayer2014-12-17
|\| | | | | | | | | | | | | * commit '456e93bfdd4cbc5e995dea415019abd0703d0e16': dashenc: Adjust the start time of a segment to the end of the previous segment Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: Adjust the start time of a segment to the end of the previous segmentMartin Storsjö2014-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the same adjustment that the mp4 muxer does to the start timestamp of fragments, since the timestamp of a sample in an mp4 file is implicit from the sum of earlier sample durations. This avoids gaps in the timeline (which can stop dash.js from playing it back), and makes sure the timestamp on the segmenter level matches what the mp4 muxer actually writes into the segments. This is only an issue if the AVPacket duration of the last packet of a segment doesn't point to the actual start timestamp of the next packet (the first in the next segment). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '2f628d5943c12389c07d652d23d3916997f9f0f6'Michael Niedermayer2014-12-17
|\| | | | | | | | | | | | | * commit '2f628d5943c12389c07d652d23d3916997f9f0f6': dashenc: Write segment timelines properly if the timeline has gaps Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: Write segment timelines properly if the timeline has gapsMartin Storsjö2014-12-17
| | | | | | | | | | | | | | | | | | | | | | | | Write a new start time if the duration of the previous segment didn't match the start of the next one. Check that segments actually are continuous before writing a repeat count. This makes sure timestamps deduced from the timeline actually match the real start timestamp as written in filenames (if using a template containing $Time$). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'e737a4aaafcb1d761b7f96043c2f83ce742c64ae'Michael Niedermayer2014-12-11
|\| | | | | | | | | | | | | | | | | | | | | * commit 'e737a4aaafcb1d761b7f96043c2f83ce742c64ae': dashenc: Change the duration fields to 64 bit Conflicts: libavformat/dashenc.c See: e65849a70bfb401306038d41ebd8b5750deb3cfd Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: Change the duration fields to 64 bitMartin Storsjö2014-12-10
| | | | | | | | | | | | | | | | For the last_duration field, it's mostly theoretical, but the total_duration field more probably may need to actually be 64 bit. Bug-Id: CID 1254944 Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'fa8934d6d6a0bb290010bdf16265c40b331d56fb'Michael Niedermayer2014-12-10
|\| | | | | | | | | | | | | * commit 'fa8934d6d6a0bb290010bdf16265c40b331d56fb': dashenc: log file output progress in verbose mode Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: log file output progress in verbose modeBryan Huh2014-12-10
| | | | | | | | | | | | | | As the manifest/segments are flushed to disk, log to stderr the progress, when in verbose logging mode Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/dashenc: make durations 64bitMichael Niedermayer2014-12-07
| | | | | | | | | | | | | | Fix potential integer overflow Fix CID1254944 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'fcae9f212a6001d966c52dc22cd4b22e9851b428'Michael Niedermayer2014-11-28
|\| | | | | | | | | | | | | * commit 'fcae9f212a6001d966c52dc22cd4b22e9851b428': dashenc: Avoid a VLA-like construct Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: Avoid a VLA-like constructMartin Storsjö2014-11-28
| | | | | | | | | | | | | | This fixes the build on compilers that interpreted the earlier code as a variable length array (which we intentionally disallow). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'a9d8d35e4833fc4dfbf557ce73c84e9ca6224427'Michael Niedermayer2014-11-28
|\| | | | | | | | | | | | | | | | | | | * commit 'a9d8d35e4833fc4dfbf557ce73c84e9ca6224427': dashenc: Add options to make segment names configurable Conflicts: libavformat/dashenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: Add options to make segment names configurableBryan Huh2014-11-28
| | | | | | | | | | | | | | This allows one to specify templated segment names for init-segments, media-segments, and for the base-url in the case of single-file. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '675ac56b7ee0f204963fde55295197c5df80aa91'Michael Niedermayer2014-11-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '675ac56b7ee0f204963fde55295197c5df80aa91': Revert "lavf: Don't try to update files atomically with renames on windows" Conflicts: libavformat/dashenc.c libavformat/hdsenc.c libavformat/internal.h libavformat/smoothstreamingenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Revert "lavf: Don't try to update files atomically with renames on windows"Martin Storsjö2014-11-27
| | | | | | | | | | | | | | | | | | This reverts commit b9d08c77a44390b0848c06f20bc0e9e951ba6a3c. After taking MoveFileEx into use, we can replace files with renames on windows as well. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'b9d08c77a44390b0848c06f20bc0e9e951ba6a3c'Michael Niedermayer2014-11-25
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b9d08c77a44390b0848c06f20bc0e9e951ba6a3c': lavf: Don't try to update files atomically with renames on windows Conflicts: libavformat/dashenc.c libavformat/hdsenc.c libavformat/internal.h libavformat/smoothstreamingenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Don't try to update files atomically with renames on windowsMartin Storsjö2014-11-24
| | | | | | | | | | | | | | | | | | On windows, rename(2) will fail if the target file exists. On unix this trick is used to make sure that people reading the file either will get the full previous file, or the full new version of the file, but no intermediate version. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'fe42f94ce1023f9c2f7e86404c60afcee5b078a9'Michael Niedermayer2014-11-24
|\| | | | | | | | | | | | | * commit 'fe42f94ce1023f9c2f7e86404c60afcee5b078a9': dashenc: Don't segment all video streams when one stream gets a keyframe Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: Don't segment all video streams when one stream gets a keyframeMartin Storsjö2014-11-24
| | | | | | | | | | | | | | | | | | This makes sure that segments actually start at a keyframe (and makes sure we don't split segments twice in a row, with one segment consisting of only a handful of packets), when one stream uses b-frames while another one doesn't. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'f856d9c2f314c493c672dfb9c876da182525da3d'Michael Niedermayer2014-11-23
|\| | | | | | | | | | | | | | | | | | | | | * commit 'f856d9c2f314c493c672dfb9c876da182525da3d': dashenc: Don't require the stream bitrate to be known Conflicts: libavformat/dashenc.c See: 5f8fcdd4481b3e740d76b09e10a80e3271ef47b5 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dashenc: Don't require the stream bitrate to be knownMartin Storsjö2014-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | Don't write any bitrate attribute if it isn't known. As long as one doesn't want automatic bitrate switching, playback can work just fine even if it isn't set. If strict standard compliance is requested, this is still considered an error, since the attribute is mandatory according to the spec. Based on a patch by Rodger Combs. Signed-off-by: Martin Storsjö <martin@martin.st>
* | dashenc: degrade gracefully if a stream's bitrate is unavailableRodger Combs2014-11-18
| | | | | | | | | | | | | | If a stream's bitrate is not set, this attempts to use its rc_max_rate; if neither is set, it avoids writing a bandwidth attribute at all. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'fe5e6e34c05e274f98528be4f77f3c474473f977'Michael Niedermayer2014-11-17
|/ | | | | | | | | | | | | * commit 'fe5e6e34c05e274f98528be4f77f3c474473f977': lavf: Add an MPEG-DASH ISOFF segmenting muxer Conflicts: Changelog libavformat/Makefile libavformat/allformats.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* lavf: Add an MPEG-DASH ISOFF segmenting muxerMartin Storsjö2014-11-17
This is mostly to serve as a reference example on how to segment the output from the mp4 muxer, capable of writing the segment list in four different ways: - SegmentTemplate with SegmentTimeline - SegmentTemplate with implicit segments - SegmentList with individual files - SegmentList with one single file per track, and byte ranges The muxer is able to serve live content (with optional windowing) or create a static segmented MPD. In advanced cases, users will probably want to do the segmenting in their own application code. Signed-off-by: Martin Storsjö <martin@martin.st>