summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-01-28vp8enc/vp8enc: set 1 for the default value of VP8E_SET_STATIC_THRESHOLDJulien Isorce1-3/+6
In Google webrtc, the setting VP8E_SET_STATIC_THRESHOLD is set to 1 (except when the content is known to be static very often in which case it is set to 100, i.e. when sharing screen with Google Hangouts). The cpu usage drops a lot when using 1 for above setting because it allows the encoder to skip static/low content blocks. The current 0 default value uses too much cpu and confuses the user regarding the cpu usage expectations. User expects vp8enc to use low cpu by default. Documentation of VP8E_SET_STATIC_THRESHOLD: https://github.com/webmproject/libvpx/blob/master/vpx/vp8cx.h#L188 chromium/webrtc: https://chromium.googlesource.com/external/webrtc/+/b484ec0082948ae086c2ba4142b4d2bf8bc4dd4b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc#822 Closes #58
2019-07-09matroskademux: Fix mismatched transfer characteristicSeungha Yang1-1/+13
TransferCharacteristics(18) should be ARIB STD-B67 (HLG) See https://www.webmproject.org/docs/container/#TransferCharacteristics Also map more color primaries indexes which have been handled by matroska-mux.
2019-02-02webmmux: allow resolutions above 4096Christopher Snowhill1-2/+2
Modify the caps string to allow width and height greater than 4096. There is no need to restrict it since the matroska format allows the width and height values to be up to eight bytes long, and this also applies to the webm subset of the format. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/550
2018-10-03matroska: Add the WebM encrypted content support in matroskademuxYacine Bandou5-19/+586
This commit: 1. Reads the WebM and Matroska ContentEncryption subelements. 2. Creates a GST_PROTECTION event for each ContentEncryption, which will be sent before pushing the first source buffer. The DRM system id field in this event is set to GST_PROTECTION_UNSPECIFIED_SYSTEM_ID, because it isn't specified neither by Matroska nor by the WebM spec. 3. Reads the protection information of encrypted Block/SimpleBlock and extracts the IV and the partitioning format (subsamples). 4. Creates the metadata protection for each encrypted Block/SimpleBlock, with those informations: KeyID (extracted from ContentEncryption element), IV and partitioning format. 5. Adds a new caps for WebM encrypted content named "application/x-webm-enc", with the following new fields: "encryption-algorithm": The encryption algorithm used. values: "None", "DES", "3DES", "Twofish", "Blowfish", "AES". "encoding-scope": The field that describes which Elements have been modified. Values: "frame", "codec-data", "next-content". "cipher-mode": The cipher mode used in the encryption. Values: "None", "CTR". https://bugzilla.gnome.org/show_bug.cgi?id=765275
2018-09-21matroskademux: Allow Matroska headers to be read more than onceAlicia Boya García1-0/+5
This is necessary for MSE, where a new MSE initialization segment may be appended at any point. These MSE initialization segments consist of an entire WebM file until the first Cluster element (not included). [1] Note that track definitions are ignored on successive headers, they must match, but this is not checked by matroskademux (look for `(!demux->tracks_parsed)` in the code). Source pads are not altered when the new headers are read. This patch has been splitted from the original patch from eocanha in [2]. [1] https://www.w3.org/TR/mse-byte-stream-format-webm/ [2] https://bug334082.bugzilla-attachments.gnome.org/attachment.cgi?id=362212 https://bugzilla.gnome.org/show_bug.cgi?id=793333
2018-05-21qtdemux: add context for a preferred protectionXabier Rodriguez Calvar2-7/+197
qtdemux selected the first system corresponding to a working GStreamer decryptor. With this change, before selecting that decryptor, qtdemux will check if it has context (a preferred decryptor id) and if not, it will request it. The request includes track-id, available key system ids for the available decryptors and even the events so that the init data is accessible. [eocanha@igalia.com: select the preferred protection system even if not available] Test "4. ClearKeyVideo" in YouTube leanback EME conformance tests 2016 for H.264[1] uses a media file[2] with cenc encryption which embeds 'pssh' boxes with the init data for the Playready and Widevine encryption systems, but not for the ClearKey encryption system (as defined by the EMEv0.1b spec[3] and with the encryption system id defined in [4]). Instead, the ClearKey encryption system is manually selected by the web page code (even if not originally detected by qtdemux) and the proper decryption key is dispatched to the decryptor, which can then decrypt the video successfully. [1] http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/2016.html?test_type=encryptedmedia-test&webm=false [2] http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/media/car_cenc-20120827-86.mp4 [3] https://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1b/encrypted-media/encrypted-media.html#simple-decryption-clear-key [4] https://www.w3.org/Bugs/Public/show_bug.cgi?id=24027#c2 https://bugzilla.gnome.org/show_bug.cgi?id=770107
2018-05-21qtdemux: also push buffers without encryption info instead of dropping themEnrique Ocaña González1-18/+18
Test "17. PlayReadyH264Video" in YouTube leanback EME conformance tests 2016 for H.264[1] uses a media file[2] with cenc encryption whose first two 'moof' boxes have no encryption information (no 'saiz' and 'saio' boxes). Those boxes are actually not encrypted and the current qtdemux implementation was just dropping them, breaking the test use case. This patch detects those kind of situations and just lets the unencrypted buffers pass. Of course, this needs some collaboration by the decryptors, which should also do the same and not to try to decrypt those clear buffers. [1] http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/2016.html?test_type=encryptedmedia-test&webm=false [2] http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/media/oops_cenc-20121114-142.mp4 https://bugzilla.gnome.org/show_bug.cgi?id=770107
2017-11-13isomp4: Add official fourcc for VP8 codecSeungha Yang3-2/+3
fourcc for VP8 codec is "vp08" defined by spec. To follow it, add it to demux and change legacy VP8 fourcc "VP80" to "vp08" in mux. Also, enable sync table in case of VP8 codec. See also https://www.webmproject.org/vp9/mp4/ https://bugzilla.gnome.org/show_bug.cgi?id=790026
2017-11-13isomp4: Add support VP9 codecSeungha Yang4-0/+9
Add fourcc for VP9 codec and support it by qtdemux and qtmux See also https://www.webmproject.org/vp9/mp4/ https://bugzilla.gnome.org/show_bug.cgi?id=790026
2017-04-07v4l2dec: Fix race when going from PAUSED to READYThibault Saunier2-25/+9
Running `gst-validate-launcher -t validate.file.playback.change_state_intensive.vorbis_vp8_1_webm` on odroid XU4 (s5p-mfc v4l2 driver) often leads to: ERROR:../subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c:215:gst_v4l2_video_dec_stop: assertion failed: (g_atomic_int_get (&self->processing) == FALSE) This happens when the following race happens: - T0: Main thread - T1: Upstream streaming thread - T2. v4l2dec processing thread) [The decoder is in PAUSED state] T0. The validate scenario runs `Executing (36/40) set-state: state=null repeat=40` T1- The decoder handles a frame T2- A decoded frame is push downstream T2- Downstream returns FLUSHING as it is already flushing changing state T2- The decoder stops its processing thread and sets `->processing = FALSE` T1- The decoder handles another frame T1- `->process` is FALSE so the decoder restarts its streaming thread T0- In v4l2dec-> stop the processing thread is stopped NOTE: At this point the processing thread loop never started. T0- assertion failed: (g_atomic_int_get (&self->processing) == FALSE) Here I am removing the whole ->processing logic to base it all on the GstTask state to avoid duplicating the knowledge. https://bugzilla.gnome.org/show_bug.cgi?id=778830
2016-09-29matroskamux: Always write the default frame duration for VP8/9 tooSebastian Dröge1-8/+0
The WebM spec allows this now, and it allows us to guess a framerate. See https://bugzilla.gnome.org/show_bug.cgi?id=772141 and also https://bugzilla.gnome.org/show_bug.cgi?id=654379
2016-02-23matroskamux: don't output empty tags/tag elementsMatej Knopp1-32/+68
Such files will not play on Android, because of bug in libwebm matroska parsing, which is still present in 6.0.1 https://bugzilla.gnome.org/show_bug.cgi?id=762349
2015-11-19matroska/webmmux: fix outdated example launch linesLuis de Bethencourt1-2/+2
Update gst-launch-0.10 lines to gst-launch-1.0
2015-11-03matroska/webmmux: Support Opus in webmmux and VP9 in matroskamuxSebastian Dröge2-2/+5
https://bugzilla.gnome.org/show_bug.cgi?id=729950
2015-06-11matroska: Implement basic stereoscopic video supportJan Schmidt4-2/+123
Implement support for the packed video formats WebM uses, not all the values that Matroska might use. In practice, it's really hard to find any samples in the wild of any. Supported in both the muxer and demuxer.
2014-01-21shout2send: accept audio/webm, audio/ogg and video/ogg as wellTim-Philipp Müller1-2/+2
Those are advertised in the template caps, but the setcaps handler didn't handle them. But then oggmux and oggparse at least for now still always output application/ogg anyway, so that wasn't a real problem.
2014-01-03shout2send: change audio_format field to formatReynaldo H. Verdejo Pinochet2-11/+12
This element and the underlying libshout2 library can handle video media files too. The code already handles video/webm so the name gets confusing. Also add and use DEFAULT_FORMAT macro Instead of hardwiring SHOUT_FORMAT_VORBIS at init https://bugzilla.gnome.org/show_bug.cgi?id=721342
2013-10-06matroskamux: Add context flag for WebMReynaldo H. Verdejo Pinochet3-7/+6
WebM has a couple of specific requirements we need to handle. Idea is to set this flag once and just rely on mux->is_webm at run time instead of repeatedly figuring this out from GST_MATROSKA_DOCTYPE_WEBM (which requires a strcmp()).
2013-10-06matroska: Do not write SegmentUID for WebM muxReynaldo H. Verdejo Pinochet1-5/+15
WebM spec states SegmentUID is Unsupported. Files produced with gstreamer without this change will spit an error like this when passed to mkvalidator: ERR201: Invalid 'SegmentUID' for profile 'webm' in Info at 192
2012-11-30shout2send: accept audio/webm as well as video/webmTim-Philipp Müller1-1/+1
https://bugzilla.gnome.org/show_bug.cgi?id=689336
2012-11-30webmux: fix linking with shout2send elementTim-Philipp Müller2-14/+65
Shout2send only accepts webm format, not matroska, but due to a bug in matroskamux, webmmux's source pad is also created with the matroska source pad template as pad template, which makes the link function think it can't link webmmux to shout2send. Also add unit test. https://bugzilla.gnome.org/show_bug.cgi?id=689336
2012-11-01rtpvp8: Add simple payloaders and depayloaders for VP8Sjoerd Simons6-0/+844
Minimal implementation of http://www.webmproject.org/code/specs/rtp/, version 0.3.2
2012-09-16vp8enc: Update documentation to reflect new property namesSebastian Dröge1-5/+7
...and also link to the WebM encoder parameters website.
2012-09-16[MOVED FROM BAD 099/134] vp8dec: use is_alt_data option to prevent timestamp ↵Oleksij Rempel (Alexey Fisher)1-0/+1
collisions altref/invisible frames usually stored in container with same timestamp as dependet frame. This make basevideodecoder to update timestamp for dependet frame and couse TS colision on next frame: ^- here is altref time : 1 2 3 4 5 6 7 8 9 webm ts : 1 3 5 5 7 9 vp8dec ts: 1 3 7 7 9 Fix bug: https://bugzilla.gnome.org/show_bug.cgi?id=655245 Signed-off-by: Oleksij Rempel (Alexey Fisher) <bug-track@fisher-privat.net>
2012-09-16[MOVED FROM BAD 088/134] vp8enc: add min/maxsection-pct optionAlexey Fisher2-0/+36
This options should be good to redeuce decode CPU load. for lowend hardware: minsection-pct=15 maxsection-pct=400 for hiend hw: minsection-pct=5 maxsection-pct=800 see example: http://www.webmproject.org/tools/encoder-parameters/#2-pass_vbr_encoding_for_smooth_playback_on_low-end_hardware Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: David Schleef <ds@schleef.org>
2012-09-16[MOVED FROM BAD 087/134] vp8enc: add lag-in-frames option.Alexey Fisher2-1/+19
This option set maximum of frames codec should remember, to make better prediktion for alt-ref frames. See example: http://www.webmproject.org/tools/encoder-parameters/#2-pass_best_quality_vbr_encoding Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: David Schleef <ds@schleef.org>
2012-09-16[MOVED FROM BAD 081/134] vp8enc: generate a timestamp for alt-ref frames.Alexey Fisher1-0/+2
It will fix handling of altref/invisible frames since matroska-mux drop any fram with no timestamp. see also: http://www.webmproject.org/code/specs/container/ The encoder will currently set the AR's timestamp as close as possible to the previous frame while attempting to provide a timestamp that is strictly increasing. In cases where the time base given to the encoder at configure time is not granular enough to allow for this the AR will share the same timestamp as D, but should be treated as having no duration. Fixes bug #652951 Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
2012-02-25matroskamux: create streamable output if downstream is not seekableTim-Philipp Müller1-0/+23
Ignore the "streamable" property setting and create streamable output if downstream is known not to be seekable (as queried via a SEEKABLE query). Fixes pipelines like webmmux ! appsink creating seemingly corrupted output if streamable has not been set to true.
2012-02-08shout2send: send video/webm through libshout.Ralph Giles1-6/+20
This requires SHOUT_FORMAT_WEBM, added in libshout 2.3.0, so video/webm support is contingent on that symbol being defined. Also an indentation change required by the pre-commit hook. https://bugzilla.gnome.org/show_bug.cgi?id=669590
2011-12-01matroskamux: make default framerate optional per streamAlexey Fisher1-11/+121
there is at least two use cases where default frame rate should or may be disabled: - vp8 stream with altref frame enabled. If default frame rate is enabled, some players will missinterprete it (critical!) - for webm container, to reduce micro overhead - for stream with variable frame rate. Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
2011-04-14matroskaparse: Allow webm and matroska caps and don't leak capsSebastian Dröge1-2/+1
2010-06-01Revert "matroska: add temporary webm typefinder"Tim-Philipp Müller1-55/+0
This reverts commit d148ec0ad2053abb0c38fc681a8953292985388f. We depend on -base git now, which has a webm typefinder in the usual place.
2010-06-01configure: require core/base gitTim-Philipp Müller1-2/+2
For WebM typefinding and GstTagsetter fixes.
2010-05-28docs: remove unnecessary videorate element from webmmux example pipelineTim-Philipp Müller1-1/+1
2010-05-25matroska: add temporary webm typefinderTim-Philipp Müller1-0/+55
Add webm typefinder just for the release, so webm works for people whose distros don't patch gst-plugins-base as well. We'll remove this again after the release.
2010-05-23docs: add some pipeline examples to webmmux docsTim-Philipp Müller1-4/+9
2010-05-21docs: add webmmux to docsTim-Philipp Müller73-153/+212
2010-05-21matroska: move webmmux into own source filesTim-Philipp Müller6-82/+163
Makes things easier for gtk-doc.
2010-05-20webmmux: Add new webmmux element that only supports muxing of WebMSebastian Dröge2-39/+97
...and remove the doctype property from matroskamux again.
2010-05-19matroskamux: bump default doctype version to 2Philip Jägenstedt1-1/+1
In this day and age this should be safe. There's otherwise a risk people will be creating unneccessarily big WebM files as they can't use SimpleBlock in v1.
2010-05-19matroska: handle matroska and webm doctype versions equallyPhilip Jägenstedt2-10/+5
The original plan was to let WebM v1 be the same as Matroska v2 (with extra constraints), but for simplicity it was decided to handle the versions equally, such that e.g. SimpleBlock is only allowed in WebM v2.
2010-05-19matroskademux: Verify lace size in _parse_blockgroup_or_simpleblockPhilip Jägenstedt1-0/+5
Failure to do this for corrupt input can cause a subbuffer bigger than the actual buffer to be created, quickly leading to segfault. Test case: bug_s222005751_r0.001____memcpy.webm
2010-05-19ebml: crude hack to avoid crashing on unexpected metadataPhilip Jägenstedt1-2/+4
The comment says this cannot happen, but it did and I don't know why. This is not the correct fix, needs investigation. Test case: bug_s555010094_r0.0005:0.008____IA__g_assertion_message_expr.webm
2010-05-19ebml: don't modify out str if returning an error in _read_asciiPhilip Jägenstedt1-4/+6
This is a regression from ASCII validation changes. Test case: bug_s66876390_r0.001____malloc_printerr.webm
2010-05-19ebml: Validate 7-bit ASCII in gst_ebml_read_asciiPhilip Jägenstedt1-4/+34
This was triggering an UTF-8 assertion in gst_caps_set_simple for corrupt files with garbage as codec id. Test case: gstreamer_error_trying_to_set_invalid_utf8_as_codec_id.webm Old gst_ebml_read_ascii renamed to gst_ebml_read_string, also used by gst_ebml_read_utf8. Unlike for UTF-8, failure to validate is an error, as gst_ebml_read_ascii is used for reading doctype and codec id and we might just as well give up early in those cases.
2010-05-19matroskademux: Ignore unexpected CodecStatePhilip Jägenstedt1-0/+6
Because GstMatroskaTrackContext *stream is set up in the first SimpleBlock or Block, a rogue CodecState otherwise causes a segfault on derefencing the NULL pointer. Test case: bug_s5506167_r0.001____gst_matroska_demux_parse_blockgroup_or_simpleblock.webm
2010-05-19matroskademux: Add video/webm sink capsPhilip Jägenstedt1-1/+1
2010-05-19matroskamux: Use SimpleBlock for WebM when possiblePhilip Jägenstedt1-2/+4
2010-05-19matroskademux: Support "webm" DocTypePhilip Jägenstedt1-11/+25
2010-05-19matroskamux: Support "webm" DocTypePhilip Jägenstedt4-1/+53