1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

44501 Commits

Author SHA1 Message Date
Mark Thompson
ca62236a89 vaapi_encode: Add VP8 support 2017-01-30 23:03:46 +00:00
Mark Thompson
ff35aa8ca4 vaapi_encode: Pass framerate parameters to driver
Only do this when building for a recent VAAPI version - initial
driver implementations were confused about the interpretation of the
framerate field, but hopefully this will be consistent everywhere
once 0.40.0 is released.
2017-01-30 22:52:54 +00:00
Mark Thompson
eddfb57210 vaapi_h264: Enable VBR mode
Default to using VBR when a target bitrate is set, unless the max rate
is also set and matches the target.  Changes to the Intel driver mean
that min_qp is also respected in this case, so set a codec default to
unset the value rather than using the current default inherited from
the MPEG-4 part 2 encoder.
2017-01-30 22:52:54 +00:00
Mark Thompson
f033ba470f vaapi_encode: Support VBR mode
This includes a backward-compatibility hack to choose CBR anyway on
old drivers which have no CBR support, so that existing programs will
continue to work their options now map to VBR.
2017-01-30 22:52:54 +00:00
Peter Große
c5c6635417 doc: add dash muxer
Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-31 00:45:30 +02:00
Peter Große
7295b73738 dashenc: add webm support
Use webm muxer for VP8, VP9 and Opus codec, mp4 muxer otherwise.

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-31 00:45:27 +02:00
Peter Große
01f1f017d8 dashenc: use avio_dynbuf instead of packet_write callback
The dash_write function drops data, if no IOContext is initialized.

Since the mp4 muxer is used in "frag_custom" mode, data is only
written when calling av_write_frame(NULL) explicitly and thus
there will be no data loss.

To add support for webm as subordinate muxer, which doesn't have
such a mode, a dynamic buffer is required to provide an always
initialized IOContext.

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-31 00:38:29 +02:00
Peter Große
dce2929efa dashenc: copy language and role metadata from streams assigned to sets
Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-31 00:38:28 +02:00
Peter Große
ca9bc9de69 dashenc: default to one AdaptationSet per stream
Previously all mapped streams of a media type (video, audio) where assigned
to a single AdaptationSet. Using the DASH live profile it is mandatory, that
the segments of all representations are aligned, which is currently not
enforced. This leads to problems when using video streams with different
key frame intervals. So to play safe, default to one AdaptationSet per stream,
unless overwritten by explicit assignment.

To get the old assignment scheme, use

  -adaptation_sets "id=0,streams=v id=1,streams=a"

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-31 00:33:07 +02:00
Peter Große
efd2fc41b3 dashenc: allow assigning all streams of a media type to an AdaptationSet
Using the characters "v" or "a" instead of stream index numbers for assigning
streams in the adaption_set option, all streams matching that given type will
be added to the AdaptationSet.

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-31 00:24:14 +02:00
Peter Große
3d23a5f96a dashenc: add support for assigning streams to AdaptationSets
Also makes sure all streams are assigned to exactly one AdaptationSet.

This patch is originally based partially on code by Vignesh Venkatasubramanian.

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-31 00:22:00 +02:00
Peter Große
9df9309d23 dashenc: calculate stream bitrate from first segment if not available
Bandwidth information is required in the manifest, but not always
provided by the demuxer. In that case calculate the bandwith based
on the size and duration of the first segment.

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-31 00:08:21 +02:00
Peter Große
e519dcd937 dashenc: separate segments based on current segment duration
The current implementation creates new segments comparing

  pkt->pts - first_pts > nb_segs * min_seg_duration

This works fine, but if the keyframe interval is smaller than "min_seg_duration"
segments shorter than the minimum segment duration are created.

Example: keyint=50, min_seg_duration=3000000
 segment 1 contains keyframe 1 (duration=2s <  total_duration=3s)
                and keyframe 2 (duration=4s >= total_duration=3s)
 segment 2 contains keyframe 3 (duration=6s >= total_duration=6s)
 segment 3 contains keyframe 4 (duration=8s <  total_duration=9s)
                and keyframe 5 (duration=10s >= total_duration=9s)
 ...

Segment 2 is only 2s long, shorter than min_seg_duration = 3s.

To fix this, new segments are created based on the actual written duration.
Otherwise the option name "min_seg_duration" is misleading.

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-31 00:08:21 +02:00
Peter Große
1920382aa9 dashenc: add option to provide UTC timing source
If set, adds a UTCTiming tag in the manifest.

This is part of the recommendations listed in the "Guidelines for
Implementations: DASH-IF Interoperability Points" [1][2]
Section 4.7 describes means for the Availability Time Synchronization.

A usable default is "https://time.akamai.com/?iso"

[1] http://dashif.org/guidelines/
[2] http://dashif.org/wp-content/uploads/2016/12/DASH-IF-IOP-v4.0-clean.pdf
    (current version as of writing)

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-31 00:08:09 +02:00
Diego Biurrun
ba6a49e60b configure: Clean up temporary files on interrupt 2017-01-29 20:17:46 +01:00
Michał Górny
7848982207 configure: Place all temporary files in one separate directory
Place all temporary files within a single, quasi-atomically created
temporary directory rather than relying on unsafe 'mktemp -u'. This
prevents possible race conditions in case two parallel 'mktemp -u' calls
returned the same path. Additionally, it reduces TMPDIR pollution by
keeping all test files in a single subdirectory.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-01-29 20:17:46 +01:00
Luca Barbato
11e225db31 rtmp: Account for bytes_read wraparound
Servers seem to be happy to receive the wrapped-around value as long
as they receive a report, otherwise they timeout.

Initially reported and analyzed by Thomas Bernhard.
2017-01-29 18:10:44 +01:00
Mark Thompson
ca6ae3b77a vaapi_encode: Add MPEG-2 support 2017-01-29 13:28:31 +00:00
Anton Schubert
3c2717e48d dashenc: increase buffer time hint in the manifest
to avoid rebuffering on the clientside for difficult network conditions.

Signed-off-by: Anton Schubert <ischluff@mailbox.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-27 14:34:17 +02:00
Peter Große
95f1004bdf dashenc: add mandatory id to AdaptationSet and Period in manifest
Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-27 14:27:40 +02:00
Anton Schubert
1ae6cb7d6e dashenc: fix ISO8601 UTC parsing
Appends Z to timestamp to force ISO8601 datetime parsing as UTC.
Without Z, some browsers (Chrome) interpret the timestamp as
localtime and others (Firefox) interpret it as UTC.

Signed-off-by: Anton Schubert <ischluff@mailbox.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-27 14:07:30 +02:00
Diego Biurrun
2bbb5abd87 build: Map -Wall compiler flag to -W3 for MSVC and -Wextra to -W4
These are more appropriate warning level equivalents.
2017-01-26 11:53:02 +01:00
Diego Biurrun
6151e9128c build: Detect blocks C language extension and add it as VDA dependency
Newer versions of OS X use the blocks extension in VDA-related headers.
Some compilers, like current gcc, do not support the blocks extension
and fail to compile code using those headers.
2017-01-26 11:53:02 +01:00
Martin Storsjö
f96d07f4ec configure: Add quotes around a variable which might be empty
If we only have a target compiler but no host compiler, the $type
variable will be empty once.

(Currently we fail to do a cross build if no host compiler is available
due to using the host compiler for processing option lists though.
But despite that, this comparison in configure needs quotes.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-26 12:41:53 +02:00
Luca Barbato
562ef82d6a fifo: Return the correct AVERROR value 2017-01-26 10:25:20 +01:00
Diego Biurrun
9bf262f4c6 configure: Use proper compiler-specific speed flags for hostcc 2017-01-25 13:25:02 +01:00
Diego Biurrun
bf38959a30 configure: Move optflags checks to a more sensible place 2017-01-25 12:01:02 +01:00
Alexandra Hájková
381a4e31a6 tak: Convert to the new bitstream reader 2017-01-25 11:06:58 +01:00
Diego Biurrun
2e0e150144 magicyuv: Convert to the new bitstream reader 2017-01-25 10:38:43 +01:00
Diego Biurrun
b061f298f7 truemotion2rt: Convert to the new bitstream reader 2017-01-25 09:55:36 +01:00
Alexandra Hájková
e7f24c9ffc wavpack: Convert to the new bitstream reader 2017-01-25 09:55:35 +01:00
Alexandra Hájková
6668bc80b5 mpc: Convert to the new bitstream reader 2017-01-25 09:55:33 +01:00
Diego Biurrun
b83aea7340 des-test: Pass the proper types to av_des_*() functions
Fixes a number of incompatible pointer type warnings.
2017-01-24 13:25:53 +01:00
Diego Biurrun
5c0e2b13eb swscale-test: const correctness for pointer variable
libswscale/swscale-test.c:369:20: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type [-Wincompatible-pointer-types]
libswscale/swscale.h:207:5: note: expected ‘const uint8_t * const* {aka const unsigned char * const*}’ but argument is of type ‘uint8_t ** {aka unsigned char **}’
2017-01-24 13:03:57 +01:00
Dave Yeo
7ff018c1cb OS/2: Try to commit memory above 1GB
Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-01-22 15:21:33 +01:00
Alexandra Hájková
fd8de7f2d8 dxtory: Convert to the new bitstream reader 2017-01-20 10:18:32 +01:00
Alexandra Hájková
4d49a4c550 apedec: Convert to the new bitstream reader 2017-01-20 10:18:32 +01:00
Anton Khirnov
b4a911c189 mpegvideoenc: make a table const 2017-01-19 09:52:21 +01:00
Anton Khirnov
296eff4d9d zmbvenc: get rid of a global table 2017-01-19 09:52:10 +01:00
Derek Buitenhuis
00b775dda2 hevc: Mark as having threadsafe init
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2017-01-19 09:51:15 +01:00
Alexandra Hájková
54dcd22885 als: Convert to the new bitstream reader 2017-01-17 09:52:11 +01:00
Luca Barbato
fb59f87ce7 nvenc: Explicitly push the cuda context on encoding
Make sure that NVENC does not misbehave if other cuda usages happen
in the application.
2017-01-17 07:37:12 +01:00
Alexandra Hájková
4795e4f61f alac: Convert to the new bitstream reader 2017-01-13 10:27:03 +01:00
Alexandra Hájková
b1e7394ea0 rtp: Convert to the new bitstream reader 2017-01-13 10:27:03 +01:00
Alexandra Hájková
a895292f27 mov: Convert to the new bitstream reader 2017-01-13 10:27:03 +01:00
Luca Barbato
44129e3804 avconv: Do not pass NULL to avio_tell
The null demuxer does not have a backing AVIOContext.
2017-01-13 08:42:11 +01:00
Luca Barbato
f8f7ad758d qsv: Set the correct range for la_depth
Setting an invalid range for it makes the encoder behave inconsistently.
2017-01-13 08:42:10 +01:00
Anton Khirnov
1202b71269 theora: export cropping information instead of handling it internally 2017-01-12 16:29:17 +01:00
Anton Khirnov
c3e84820d6 h264dec: export cropping information instead of handling it internally 2017-01-12 16:29:12 +01:00
Anton Khirnov
4fded0480f h264dec: be more explicit in handling container cropping
The current condition can trigger in cases where it shouldn't, with
unexpected results.
Make sure that:
- container cropping is really based on the original dimensions from the
  caller
- those dimenions are discarded on size change

The code is still quite hacky and eventually should be deprecated and
removed, with the decision about which cropping is used delegated to the
caller.
2017-01-12 16:28:05 +01:00