1. 13 Apr, 2020 1 commit
  2. 01 Apr, 2020 1 commit
  3. 10 Mar, 2020 1 commit
  4. 16 Jan, 2020 2 commits
  5. 11 Dec, 2018 1 commit
  6. 21 Jun, 2018 1 commit
  7. 29 May, 2018 1 commit
    • Vishwanath Dixit's avatar
      avformat/movenc: creating producer reference time (PRFT) box · 5717cd80
      Vishwanath Dixit authored
      The producer reference time box supplies relative wall-clock times
      at which movie fragments, or files containing movie fragments
      (such as segments) were produced.
      The box is mainly useful in live streaming use cases. A media player
      can parse the box and utilize the time fields to measure and improve
      the latency during real time playout.
      5717cd80
  8. 17 Apr, 2018 1 commit
    • Timo Teräs's avatar
      avformat/movenc: support writing iTunes cover image · 9af71b32
      Timo Teräs authored
      Fixes https://trac.ffmpeg.org/ticket/2798
      
      This makes movenc handle AV_DISPOSITION_ATTACHED_PIC and write
      the associated pictures in iTunes cover atom. This corresponds
      to how 'mov' demuxer parses and exposes the cover images when
      reading.
      
      Most of the existing track handling loops properly ignore
      these 'virtual streams' as MOVTrack->entry is never incremented
      for them. However, additional tests are added as needed to ignore
      them.
      
      Tested to produce valid output with:
        ffmpeg -i movie.mp4 -i thumb.jpg -disposition:v:1 attached_pic \
               -map 0 -map 1 -c copy movie-with-cover.mp4
      
      The cover image is also copied correctly with:
        ffmpeg -i movie-with-cover.mp4 -map 0 -c copy out.mp4
      
      AtomicParseley says that the attached_pic stream is properly
      not visible in the main tracks of the file.
      Signed-off-by: 's avatarTimo Teräs <timo.teras@iki.fi>
      9af71b32
  9. 20 Feb, 2018 1 commit
  10. 02 Dec, 2017 1 commit
  11. 28 Sep, 2017 1 commit
  12. 15 May, 2017 1 commit
    • Martin Storsjö's avatar
      movenc: Add an option for enabling negative CTS offsets · c380a0d7
      Martin Storsjö authored
      This reduces the need for an edit list; streams that start with
      e.g. dts=-1, pts=0 can be encoded as dts=0, pts=0 (which is valid
      in mov/mp4) by shifting the dts values of all packets forward.
      This avoids the need for edit lists for such streams (while they
      still are needed for audio streams with encoder delay).
      
      This eases conformance with the DASH-IF interoperability guidelines.
      Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
      c380a0d7
  13. 26 Sep, 2016 1 commit
  14. 01 Sep, 2016 1 commit
  15. 19 Aug, 2016 1 commit
  16. 08 Jul, 2016 1 commit
    • Martin Storsjö's avatar
      movenc: Add an option for skipping writing the mfra/tfra/mfro trailer · 4f7723cb
      Martin Storsjö authored
      When writing a fragmented file, we by default write an index pointing
      to all the fragments at the end of the file. This causes constantly
      increasing memory usage during the muxing. For live streams, the
      index might not be useful at all.
      
      A similar fragment index is written (but at the start of the file) if
      the global_sidx flag is set. If ism_lookahead is set, we need to keep
      data about the last ism_lookahead+1 fragments.
      
      If no fragment index is to be written, we don't need to store information
      about all fragments, avoiding increasing the memory consumption
      linearly with the muxing runtime.
      
      This fixes out of memory situations with long live mp4 streams.
      Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
      4f7723cb
  17. 25 Jun, 2016 1 commit
  18. 18 May, 2016 1 commit
  19. 27 Feb, 2016 1 commit
  20. 23 Feb, 2016 1 commit
    • Anton Khirnov's avatar
      lavf: replace AVStream.codec with AVStream.codecpar · 9200514a
      Anton Khirnov authored
      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.
      9200514a
  21. 15 Dec, 2015 1 commit
  22. 12 Aug, 2015 1 commit
    • Martin Storsjö's avatar
      movenc: Add a new flag for writing global sidx indexes for dash · 26ac22e5
      Martin Storsjö authored
      The double meaning of the faststart flag (moving a moov atom
      to the start of files, making them streamable, for non-fragmented
      files, vs inserting a global sidx index at the start of files
      for fragmented files) is confusing - see 40ed1cbf for
      explanation of its origins.
      
      Since the second meaning of the flag hasn't been part of any
      libav release yet, just rename it to get rid of the confusion
      without any extra deprecation (which wouldn't get rid of the
      potential confusion, of users adding -movflags faststart
      even for fragmented files, where it isn't needed for making
      them "streamable").
      
      This gets back the old behaviour, where -movflags faststart
      doesn't have any effect for fragmented files.
      Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
      26ac22e5
  23. 10 Aug, 2015 1 commit
  24. 18 Jul, 2015 1 commit
  25. 19 Mar, 2015 2 commits
  26. 16 Mar, 2015 1 commit
  27. 10 Mar, 2015 2 commits
  28. 05 Mar, 2015 1 commit
  29. 26 Jan, 2015 1 commit
  30. 02 Jan, 2015 2 commits
    • Martin Storsjö's avatar
      movenc: Get rid of a hack for updating the dvc1 atom · b3b0b35d
      Martin Storsjö authored
      Use the more generic approach with the delay_moov flag, instead of
      having a update mechanism specific to this one single atom.
      Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
      b3b0b35d
    • Martin Storsjö's avatar
      movenc: Add an option for delaying writing the moov with empty_moov · 847bf598
      Martin Storsjö authored
      This delays writing the moov until the first fragment is written,
      or can be flushed by the caller explicitly when wanted. If the first
      sample in all streams is available at this point, we can write
      a proper editlist at this point, allowing streams to start at
      something else than dts=0. For AC3 and DNXHD, a packet is
      needed in order to write the moov header properly.
      
      This isn't added to the normal behaviour for empty_moov, since
      the behaviour that ftyp+moov is written during avformat_write_header
      would be changed. Callers that split the output stream into header+segments
      (either by flushing manually, with the custom_frag flag set, or by
      just differentiating between data written during avformat_write_header
      and the rest) will need to be adjusted to take this option into use.
      
      For handling streams that start at something else than dts=0, an
      alternative would be to use different kinds of heuristics for
      guessing the start dts (using AVCodecContext delay or has_b_frames
      together with the frame rate), but this is not reliable and doesn't
      necessarily work well with stream copy, and wouldn't work for getting
      the right initialization data for AC3 or DNXHD either.
      Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
      847bf598
  31. 18 Dec, 2014 1 commit
  32. 26 Nov, 2014 1 commit
    • Martin Storsjö's avatar
      movenc: Add a flag for indicating a discontinuous fragment · ee37620b
      Martin Storsjö authored
      This allows creating a later mp4 fragment without sequentially
      writing the earlier ones before (when called from a segmenter).
      
      Normally when writing a fragmented mp4 file sequentially, the
      first timestamps of a fragment are adjusted to match the
      end of the previous fragment, to make sure the timestamp is the
      same, even if it is calculated as the sum of previous fragment
      durations. (And for the first packet in a file, the offset of
      the first packet is written using an edit list.)
      
      When writing an individual mp4 fragment discontinuously like this
      (with potentially writing the earlier fragments separately later),
      there's a risk of getting a gap in the timeline if the duration
      field of the last packet in the previous fragment doesn't match up
      with the start time of the next fragment.
      
      Using this requires setting -avoid_negative_ts make_non_negative
      (or -avoid_negative_ts 0).
      Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
      ee37620b
  33. 17 Nov, 2014 3 commits
  34. 07 Nov, 2014 1 commit
    • Martin Storsjö's avatar
      movenc: Allow to request not to use edit lists · 1d8a0c1b
      Martin Storsjö authored
      In this case, shift tracks to start from zero instead (potentially
      stretching the first sample in tracks that start later than the
      first one).
      
      Some software does not support edit lists at all, the adobe flash
      player seems to be one of these. This results in AV sync errors when
      edit lists are used to adjust AV sync.
      
      Some players, such as QuickTime, don't respect the duration for
      audio packets, so if an audio track starts later than the video
      track and the first audio sample gets a duration longer than the
      actual amount of data in it, the result will be out of sync.
      
      Based on patches by Michael Niedermayer.
      Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
      1d8a0c1b