summaryrefslogtreecommitdiff
path: root/libavformat/dashenc.c
Commit message (Collapse)AuthorAge
* avformat: use the buffer_size_t typedef where requiredJames Almer2021-03-10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* libavformat/dashenc: Reduce confusion in par error messageChris Miceli2020-08-31
| | | | | | | | | | In ticket #8754 there is discourse surrounding the error message which is printed upon a mismatched aspect ratio in derived encodings. This should make it clearer to the user as to the issues which they are experiencing. Reviewed-by: "Jeyapal, Karthick" <kjeyapal@akamai.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavformat/dashenc.c: Support mpd update periodSiyuan Huang2020-07-09
| | | | | | According ISO 23009-1, in live cases, mpd refresh period should be configurable Signed-off-by: Siyuan Huang <saber.huang@samsung.com>
* avformat/dashenc: Calculate average bitrate for adaptation sets in static ↵Przemysław Sobala2020-06-22
| | | | | | | | | manifest If stream's bitrate is not specified: - for static manifest: an average bitrate will be calculated and used, - for dynamic manifest: first segment's bitrate will be calculated and used, as before, for bandwidth setting in adaptation sets.
* Revert "avformat/dashenc: use AVStream timebase when computing missing bitrate"Przemysław Sobala2020-06-22
| | | | This reverts commit 2a9ffd89fcb09bd69b2130da039ad2caba79cf33 as duration is always in AV_TIME_BASE units
* avformat/dashenc: Add hls_master_name optionPrzemysław Sobala2020-06-15
|
* avformat/dashenc: use AVStream timebase when computing missing bitratePrzemysław Sobala2020-06-01
|
* avformat/dashenc: remove the arbitrary restrictions for filenameLimin Wang2020-05-01
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/dashenc: use av_reallocp_array()Limin Wang2020-04-29
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/dashenc: use local variable and avoid calculate duration multiple timesLimin Wang2020-04-29
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/dashenc: cosmeticsLimin Wang2020-04-29
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat: only allow a single bitstream filter when muxingMarton Balint2020-04-26
| | | | | | | | | | | | Current muxers only use a single bitstream filter, so there is no need to maintain code which operates on a list of bitstream filters. When multiple bitstream filters are needed muxers can simply use a list bitstream filter. If there is a use case in the future when different bitstream filters should be added at subsequent packets then a new API possibly involving reconfiguring the list bitstream filter can be added knowing the exact requirements. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/dashenc: add missing startWithSap attribute to AdaptationSet elementsJames Almer2020-04-20
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: add a PlaybackRate elementJames Almer2020-04-20
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: add a maxSegmentDuration attribute to the ManifestJames Almer2020-04-20
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: fix typo in ProducerReferenceTime elementsJames Almer2020-04-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: add subtitle support in master playlist m3u8Limin Wang2020-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | Test with the following command for the webvtt subtitle: $ ./ffmpeg -y -i input_with_subtitle.mkv \ -b:v:0 5250k -c:v h264 -pix_fmt yuv420p -profile:v main -level 4.1 \ -b:a:0 256k \ -c:s webvtt -c:a mp2 -ar 48000 -ac 2 -map 0:v -map 0:a:0 -map 0:s:0 \ -f hls -var_stream_map "v:0,a:0,s:0,sgroup:subtitle" \ -master_pl_name master.m3u8 -t 300 -hls_time 10 -hls_init_time 4 -hls_list_size \ 10 -master_pl_publish_rate 10 -hls_flags \ delete_segments+discont_start+split_by_time ./tmp/video.m3u8 Check the master m3u8: $ cat tmp/master.m3u8 #EXTM3U #EXT-X-VERSION:3 #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subtitle",NAME="subtitle_0",DEFAULT=YES,URI="video_vtt.m3u8" #EXT-X-STREAM-INF:BANDWIDTH=6056600,RESOLUTION=1280x720,CODECS="avc1.4d4829,mp4a.40.33",SUBTITLES="subtitle" video.m3u8 Check the result by convert to mkv: $ ./ffmpeg -strict experimental -i ./tmp/master.m3u8 -c:v copy -c:a mp2 -c:s srt ./test.mkv Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/dashenc: use a quieter log lever when informing prft was ↵James Almer2020-02-26
| | | | | | | automatically enabled Suggested-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: always attempt to enable prft in ldash modeJames Almer2020-02-22
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: write a capture time Producer Reference Time element when ↵James Almer2020-02-22
| | | | | | | | none is provided by the encoder This way, the element will be present in any scenario when the write_prft option is used. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: write the styp box when the first frame of a segment is readyJames Almer2020-02-22
| | | | | | | This ensures it's written at the beginning of a segment in non streaming mode when segment duration differs from fragment duration. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: warn if Producer Reference Time element option is missing ↵James Almer2020-02-17
| | | | | | when ldash mode is used Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: disable Resync elements when using DVB-DASH profileJames Almer2020-02-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: always set coding_dependency to 1 if a parser isn't usedJames Almer2020-02-16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: include an availabilityTimeComplete element in all ↵James Almer2020-02-16
| | | | | | | | | streaming modes It's not exclusive for Low Latency streaming. The muxer will serve partial segments regardless of streaming mode. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: add Trick Mode support for AdaptationSetsJames Almer2020-02-16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: make AdaptationSet id an integer valueJames Almer2020-02-16
| | | | | | | Unlike Representation id, it's defined as an integer in the spec, and not as a string. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: use AV_OPT_TYPE_DICT for http_optsMarton Balint2020-02-03
| | | | | | | | This changes the separator character from comma to colon, but since this option was only added recently I think it should be done for consistency with other similar options. Signed-off-by: Marton Balint <cus@passwd.hu>
* dashenc: check pts to prevent division by zero errorAlfred E. Heggestad2020-01-31
| | | | | | | | | | | | | | | | | | this usecase will cause a division by zero trap: 1. dashenc has received one frame 2. os->max_pts and os->start_pts have same value 3. delta between max_pts and start_pts is 0 4. av_rescale_q(0, x, y) returns 0 5. this value is used as denominator in division 6. Bang! -> segfault this fix checks that max_pts > start_pts. the fix has been tested and works. Signed-off-by: Alfred E. Heggestad <alfred.heggestad@gmail.com> Reviewed-by: Jeyapal, Karthick <kjeyapal@akamai.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: use ff_rename instead of avpriv_io_moveMarton Balint2020-01-19
| | | | | | ff_rename always logs the error message. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/dashenc: add an option to write a Latency elementJames Almer2020-01-15
| | | | | | | Allows to set an intended target latency while streaming that clients can use to measure when using low latency mode. Signed-off-by: James Almer <jamrial@gmail.com>
* dashenc: support setting arbitrary HTTP protocol optionsAnton Khirnov2020-01-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: allow setting custom movflags using format_optionsJames Almer2020-01-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: implement DVB-DASH profileJames Almer2020-01-15
| | | | | | | Add new required elements and constrain presence and values for existing ones based on the spec. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: add an option to enable low latency Dash manifestJames Almer2020-01-15
| | | | | | | In combination with the streaming option it constrains the value of a few elements, to prevet clients from buffering too much data before starting presentation. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: Write a Producer Reference Time elementJames Almer2020-01-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: allow splitting fragments following P-Frame reorderingJames Almer2020-01-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: allow setting fragment durationsJames Almer2020-01-15
| | | | | | | | Implemented as as a frag_duration muxer option and key=value entry in the adaptation_sets muxer option. It has the same syntax as the seg_duration option. A new frag_type option is also introduced to select the kind of fragmentation. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: allow setting segment durations per AdaptationSetJames Almer2020-01-15
| | | | | | | | | Implemented as as a seg_duration key=value entry in the adaptation_sets muxer option. It has the same syntax as the global seg_duration option, and has precedence over it if set. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: Fix leak of AVFormatContext on errorAndreas Rheinhardt2020-01-08
| | | | | | | | | | | The Dash muxer uses submuxers and when one such submuxer has been allocated, it is initially only stored in a temporary variable. Therefore it leaks if an error happens between the allocation and storing it permanently. This commit changes this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: "Jeyapal, Karthick" <kjeyapal@akamai.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/dashenc: use AV_OPT_TYPE_DICT for format_optionsMarton Balint2020-01-01
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/dashenc: remove unused check of avformat_free_contextSteven Liu2019-12-02
| | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Jun Zhao <barryjzhao@tencent.com> Reviewed-by: Jeyapal, Karthick <kjeyapal@akamai.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/dashenc: fix writing the AV1 codec string in mp4 modeJames Almer2019-08-03
| | | | | | | | | | From https://aomediacodec.github.io/av1-isobmff/#codecsparam, the parameters sample entry 4CC, profile, level, tier, and bitDepth are all mandatory fields. All the other fields are optional, mutually inclusive (all or none). Fixes ticket #8049 Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: update stream extradata from packet side dataJames Almer2019-08-03
| | | | | | | | | codecpar->extradata is not going to change between packets. New extradata is instead propagated using packet side data. Use ff_alloc_extradata() as well. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: add descriptor which is useful to the scheme defined by ↵Leo Zhang2019-07-22
| | | | | | ISO/IEC 23009-1:2014/Amd.2:2015. Signed-off-by: leozhang <leozhang@qiyi.com>
* avformat/dashenc: split extension for MP4 into .mp4 or .m4sAlfred E. Heggestad2019-06-25
|
* avformat/hlsenc: add EXT-X-I-FRAMES-ONLY tag supportSteven Liu2019-06-14
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/dashenc: use 64bit for handling the return of avio_tell()Michael Niedermayer2019-05-17
| | | | | | | The return code is 64bit, so this is more correct, especially in case it actually would be a file of such large size Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/dashenc: Fix a bug with writing "final" manifestKarthick J2019-04-22
| | | | This bug was introduced in the commit 951561b64ee6c11f01daedd9dcf73276cc1e765b
* avformat/dashenc: Disable streaming for webm outputKarthick J2019-04-16
| | | | | Currently streaming for webm output doesn't work. Disabling explicitly will make sure that the manifest will get generated correctly.