Commit Graph

338 Commits

Author SHA1 Message Date
Mark Reid 901d87aa83 avformat/mxfenc: write reel_name if metadata key is present
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-08 20:02:16 +01:00
Mark Reid ad2641c36b avformat/mxfenc: use track count to generate component instance uuid
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-08 20:02:16 +01:00
Mark Reid 62f7f40caa avformat/mxfenc: pass MXFPackage around instead of type
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-28 21:42:48 +01:00
Michael Niedermayer ef973bd98d avformat/mxfenc: Fix labels for IEC PAL DV 420 2017-10-03 18:34:37 +02:00
Michael Niedermayer a56ec48d42 avformat/mxfenc: Add IEC DV25
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-03 18:34:37 +02:00
Tobias Rapp 3ffd3b7f5f avformat/mxfenc: cosmetic changes
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2017-09-18 08:57:09 +02:00
Tobias Rapp 35d6be199a avformat/mxfenc: fix aspect ratio when writing 16:9 DV frames
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2017-09-18 08:56:28 +02:00
Michael Niedermayer de03eb622d avformat/mxfenc: Correct the Sample rate for PCM outside D10
Based on mail from IRT

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-12 19:24:25 +02:00
Michael Niedermayer 4c33ec004f avformat/mxfenc: Comment edit rate write code like the surrounding code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-12 19:24:25 +02:00
Michael Niedermayer 4c88087f93 avformat/mxfenc: Replace more literal magic numbers by enum values.
This also moves the enum table up as it is needed earlier

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-12 19:24:25 +02:00
Michael Niedermayer f762555a90 avformat/mxfenc: Replace literal numbers by named enum values.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-30 02:15:36 +02:00
Michael Niedermayer 429f3266c1 avformat/mxfenc: Check that the video codec in D-10 is MPEG-2
Others do not work, but nothing rejects them prior to this patch if the
parameters otherwise match

Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-29 21:16:32 +02:00
James Almer 4de591e6fb Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'
* commit '83548fe894cdb455cc127f754d09905b6d23c173':
  lavf: fix usage of AVIOContext.seekable

Merged-by: James Almer <jamrial@gmail.com>
2017-03-21 17:02:30 -03:00
Carl Eugen Hoyos d0c1b9821a lavf/mxfenc: Do not print a useless error message.
The option d10_channelcount only exists for mxf_d10.
2016-10-11 09:45:37 +02:00
Anton Khirnov 83548fe894 lavf: fix usage of AVIOContext.seekable
It is supposed to be a flag. The only currently defined value is
AVIO_SEEKABLE_NORMAL, but other ones may be added in the future.
However all the current lavf code treats this field as a bool (mainly
for historical reasons).
Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
2016-09-30 16:54:33 +02:00
Matthias Hunstock b83d907780 libavformat/mxfenc: add UID for unconstrained H.264 coded video in baseline profile
Enable the MXF muxer to mux baseline H.264 video streams.

Signed-off-by: Matthias Hunstock <atze@fem.tu-ilmenau.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-11 02:09:16 +02:00
James Almer f41048f6ec Merge commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c'
* commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c':
  h264: add H264_ prefix to the NAL unit types

Conflicts:
libavcodec/h264_parse.c
libavcodec/h264_parser.c
libavcodec/h264_slice.c
libavcodec/h264dec.c

Merged-by: James Almer <jamrial@gmail.com>
2016-08-01 15:11:05 -03:00
Clément Bœsch ecf65c30cf Merge commit '251cbb44003caf179fb17afbb8a6c56643c2a646'
* commit '251cbb44003caf179fb17afbb8a6c56643c2a646':
  h264: create a new header for common h264 definitions

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-29 11:13:44 +02:00
Clément Bœsch 15b26e88cb Merge commit '9df889a5f116c1ee78c2f239e0ba599c492431aa'
* commit '9df889a5f116c1ee78c2f239e0ba599c492431aa':
  h264: rename h264.[ch] to h264dec.[ch]

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-29 11:01:36 +02:00
James Almer d688f39dc4 cosmetics: fix some misspelled words
Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-17 13:10:27 -03: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
Vittorio Giovara 41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Derek Buitenhuis 6f69f7a8bf Merge commit '9200514ad8717c63f82101dc394f4378854325bf'
* commit '9200514ad8717c63f82101dc394f4378854325bf':
  lavf: replace AVStream.codec with AVStream.codecpar

This has been a HUGE effort from:
    - Derek Buitenhuis <derek.buitenhuis@gmail.com>
    - Hendrik Leppkes <h.leppkes@gmail.com>
    - wm4 <nfxjfg@googlemail.com>
    - Clément Bœsch <clement@stupeflix.com>
    - James Almer <jamrial@gmail.com>
    - Michael Niedermayer <michael@niedermayer.cc>
    - Rostislav Pehlivanov <atomnuker@gmail.com>

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-10 20:59:55 +01:00
Anton Khirnov 9200514ad8 lavf: replace AVStream.codec with AVStream.codecpar
Currently, AVStream contains an embedded AVCodecContext instance, which
is used by demuxers to export stream parameters to the caller and by
muxers to receive stream parameters from the caller. It is also used
internally as the codec context that is passed to parsers.

In addition, it is also widely used by the callers as the decoding (when
demuxer) or encoding (when muxing) context, though this has been
officially discouraged since Libav 11.

There are multiple important problems with this approach:
    - the fields in AVCodecContext are in general one of
        * stream parameters
        * codec options
        * codec state
      However, it's not clear which ones are which. It is consequently
      unclear which fields are a demuxer allowed to set or a muxer allowed to
      read. This leads to erratic behaviour depending on whether decoding or
      encoding is being performed or not (and whether it uses the AVStream
      embedded codec context).
    - various synchronization issues arising from the fact that the same
      context is used by several different APIs (muxers/demuxers,
      parsers, bitstream filters and encoders/decoders) simultaneously, with
      there being no clear rules for who can modify what and the different
      processes being typically delayed with respect to each other.
    - avformat_find_stream_info() making it necessary to support opening
      and closing a single codec context multiple times, thus
      complicating the semantics of freeing various allocated objects in the
      codec context.

Those problems are resolved by replacing the AVStream embedded codec
context with a newly added AVCodecParameters instance, which stores only
the stream parameters exported by the demuxers or read by the muxers.
2016-02-23 17:01:58 +01:00
Marton Balint ad17cc9744 avformat/mxfenc: use ff_parse_creation_time_metadata
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-02-14 01:51:14 +01:00
Sebastian Dröge e3a125c970 Revert "do not write f2 if not interlaced"
This reverts commit 8ed82d8174.

SMPTE S377-1-2009c defines in F.4.1 that the Video Line Map should
always be an array with two 32 bit integers as elements. This is
repeated in G.2.12 with actual examples for progressive content,
where the second value would always be 0.

Additionally, the IRT MXF analyser also lists this as the only
error in the MXF output from ffmpeg: https://mxf-analyser-cloud.irt.de

Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-01 18:32:15 +01:00
Hendrik Leppkes bd88914b15 Merge commit 'b8b21dee0f0b4bcc1888067c497d6e838859d2cd'
* commit 'b8b21dee0f0b4bcc1888067c497d6e838859d2cd':
  mxfenc: always assume long gop

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-17 14:49:24 +01:00
Michael Niedermayer b51e7554e7 avformat/mxfenc: Do not crash if there is no packet in the first stream
Fixes: Ticket4914

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-13 16:42:48 +01:00
Michael Niedermayer 537e901fe6 avformat/mxfenc: Fix integer overflow in length computation
Fixes: CID1341577

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-13 02:11:56 +01:00
Anton Khirnov b8b21dee0f mxfenc: always assume long gop
Checking the codec context parameters to find out this information is
far too unreliable to be useful, so it is safer to assume B-frames are
always present.
2015-12-06 10:28:36 +01:00
Michael Niedermayer d9726893f3 avformat/mxfenc: Only store user comment related tags when needed
Also support disabling them as they seem to cause problems to some
Users. They are also not allowed in IRT D-10 thus the default for
mxf_d10 is not to write them

This also decreases the filesize when no user comment are stored

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-10 23:27:51 +01:00
Hendrik Leppkes 7f5af80ba4 Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'
* commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457':
  avpacket: Replace av_free_packet with av_packet_unref

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-27 14:28:56 +01:00
Luca Barbato ce70f28a17 avpacket: Replace av_free_packet with av_packet_unref
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.

Deprecate `av_free_packet`.
2015-10-26 18:00:55 +01:00
Michael Niedermayer a7c0373ea3 avformat/mxfenc: Move sponsorship notice to its own comment block
Suggested-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-09 02:49:49 +02:00
Hendrik Leppkes 5d8e836d0e Replace all remaining occurances of step/depth_minus1 and offset_plus1 2015-09-08 17:10:48 +02:00
Michael Niedermayer 124b7cd485 Add NOA credits 2015-09-08 01:04:19 +02:00
Michael Niedermayer 7630cce4b3 avformat/mxfenc: Allow overriding /manual setting of the signal standard
previous patch reviewed-by: tim nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 13:03:29 +02:00
Michael Niedermayer f07376402c avformat/mxfenc: Add mxf muxer avclass
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-06 02:39:01 +02:00
Michael Niedermayer d7a762553c avformat/mxfenc: Accept MXF D-10 with 49.999840 Mbit/sec
This is the maximum rate possible based on the frame size limit of MXF D-10

Previous version reviewed by tim nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-03 12:12:34 +02:00
Michael Niedermayer 2e92a27a90 avformat/mxfenc: Correct klv_fill_key
See SMPTE 377-1-2009 6.3.3 KLV Fill Items

Reviewed-by: tim nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 15:31:04 +02:00
Michael Niedermayer 5a3d2541bd avformat/mxfenc: Support storing signal standard for D10 muxing
Reviewed-by: tim nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 12:36:08 +02:00
Michael Niedermayer 3b176af001 avformat/mxfenc: Add color siting element
Previous version Reviewed-by: tim nicholson <nichot20@yahoo.com>
Previous version Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 15:30:31 +02:00
Michael Niedermayer e32d832a82 avformat/mxfenc: Set horizontal chroma subsample value from pixel format if available
Reviewed-by: tim nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-18 10:52:40 +02:00
Michael Niedermayer 58afb3128b avformat/mxfenc: Set the component depth from the pixel format if available
Reviewed-by: tim nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-18 10:49:28 +02:00
Carl Eugen Hoyos d90f91c1c8 lavf/mxfenc: Write correct interlaced flag when muxing dnxhd.
Reported and early patch version tested by forum user gridtank.
Reviewed-by: Tomas Härdin
2015-05-04 17:44:14 +02:00
Michael Niedermayer 40d552dae6 Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'
* commit '1a3eb042c704dea190c644def5b32c9cee8832b8':
  Replace av_dlog with normal av_log at trace level

Conflicts:
	ffplay.c
	libavdevice/fbdev_dec.c
	libavfilter/avfilter.c
	libavfilter/internal.h
	libavfilter/setpts.c
	libavfilter/src_movie.c
	libavfilter/vf_crop.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fieldorder.c
	libavformat/assdec.c
	libavformat/avidec.c
	libavformat/flvdec.c
	libavformat/http.c
	libavformat/ipmovie.c
	libavformat/isom.c
	libavformat/mov.c
	libavformat/mpegenc.c
	libavformat/mpegts.c
	libavformat/mpegtsenc.c
	libavformat/mux.c
	libavformat/mxfdec.c
	libavformat/nsvdec.c
	libavformat/oggdec.c
	libavformat/r3d.c
	libavformat/rtspdec.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 03:19:47 +02:00
Vittorio Giovara 1a3eb042c7 Replace av_dlog with normal av_log at trace level
This applies to every library where performance is not critical.
2015-04-19 12:41:59 +01:00
Mark Reid 415f1fab8d libavformat/mxfenc: added support mxf opatom audio muxing
Previous version Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-12 02:40:09 +02:00
Tim Nicholson ac9919b966 libavformat/mxfenc.c: Add 'Presentation Y offset' metadata
Previously unset, and some software mishandles files if it is absent

Signed-off-by: Tim Nicholson <tim.nicholson@bbc.co.uk>
Reviewed-by: tomas.hardin@codemill.se
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-30 15:03:41 +02:00
Mark Reid 001b28b021 libavformat/mxfenc: add container duration and package name to primer pack
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-23 22:09:46 +01:00