1. 14 Jun, 2017 4 commits
  2. 24 May, 2017 1 commit
  3. 10 May, 2017 1 commit
    • erankor's avatar
      ffmpeg: add enc_time_base option · 2b06f2d2
      erankor authored
      add a per-stream option for setting the encoder timebase.
      the following values are allowed:
      0 - for video, use 1/frame_rate, for audio use 1/sample_rate (this is
        the default)
      -1 - match the input timebase (when possible)
      >0 - set the timebase to provided number
      Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
      2b06f2d2
  4. 04 May, 2017 1 commit
  5. 27 Mar, 2017 1 commit
    • wm4's avatar
      avformat, ffmpeg: deprecate old rotation API · ddef3d90
      wm4 authored
      The old "API" that signaled rotation as a metadata value has been
      replaced by DISPLAYMATRIX side data quite a while ago.
      
      There is no reason to make muxers/demuxers/API users support both. In
      addition, the metadata API is dangerous, as user tags could "leak" into
      it, creating unintended features or bugs.
      
      ffmpeg CLI has to be updated to use the new API. In particular, we must
      not allow to leak the "rotate" tag into the muxer. Some muxers will
      catch this properly (like mov), but others (like mkv) can add it as
      generic tag. Note applications, which use libavformat and assume the
      old rotate API, will interpret such "rotate" user tags as rotate
      metadata (which it is not), and incorrectly rotate the video.
      
      The ffmpeg/ffplay tools drop the use of the old API for muxing and
      demuxing, as all muxers/demuxers support the new API. This will mean
      that the tools will not mistakenly interpret per-track "rotate" user
      tags as rotate metadata. It will _not_ be treated as regression.
      
      Unfortunately, hacks have been added, that allow the user to override
      rotation by setting metadata explicitly, e.g. via
      
        -metadata:s:v:0 rotate=0
      
      See references to trac #4560. fate-filter-meta-4560-rotate0 tests this.
      It's easier to adjust the hack for supporting it than arguing for its
      removal, so ffmpeg CLI now explicitly catches this case, and essentially
      replaces the "rotate" value with a display matrix side data. (It would
      be easier for both user and implementation to create an explicit option
      for rotation.)
      
      When the code under FF_API_OLD_ROTATE_API is disabled, one FATE
      reference file has to be updated (because "rotate" is not exported
      anymore).
      Tested-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
      Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
      ddef3d90
  6. 03 Mar, 2017 5 commits
    • wm4's avatar
      ffmpeg: delay processing of subtitles before filters are initialized · 7dd44cde
      wm4 authored
      If a subtitle packet came before the first video frame could be fully
      decoded, the subtitle packet would get discarded. This puts the subtitle
      into a queue instead, and processes it once the attached filter graph is
      initialized.
      7dd44cde
    • Timo Rothenpieler's avatar
    • Anton Khirnov's avatar
      ffmpeg: restructure sending EOF to filters · 76e13bde
      Anton Khirnov authored
      Be more careful when an input stream encounters EOF when its filtergraph
      has not been configured yet. The current code would immediately mark the
      corresponding output streams as finished, while there may still be
      buffered frames waiting for frames to appear on other filtergraph
      inputs.
      
      This should fix the random FATE failures for complex filtergraph tests
      after a3a0230a
      
      This merges Libav commit 94ebf556. It was previously skipped.
      
      This is the last filter init related Libav commit that was skipped, so
      this also removes the commits from doc/libav-merge.txt.
      Signed-off-by: 's avatarwm4 <nfxjfg@googlemail.com>
      76e13bde
    • Anton Khirnov's avatar
      ffmpeg: init filtergraphs only after we have a frame on each input · af1761f7
      Anton Khirnov authored
      This makes sure the actual stream parameters are used, which is
      important mainly for hardware decoding+filtering cases, which would
      previously require various weird workarounds to handle the fact that a
      fake software graph has to be constructed, but never used.
      This should also improve behaviour in rare cases where
      avformat_find_stream_info() does not provide accurate information.
      
      This merges Libav commit a3a0230a. It was previously skipped.
      
      The code in flush_encoders() which sets up a "fake" format wasn't in
      Libav. I'm not sure if it's a good idea, but it tends to give
      behavior closer to the old one in certain corner cases.
      
      The vp8-size-change gives different result, because now the size of
      the first frame is used. libavformat reported the size of the largest
      frame for some reason.
      
      The exr tests now use the sample aspect ratio of the first frame. For
      some reason libavformat determines 0/1 as aspect ratio, while the
      decoder returns the correct one.
      
      The ffm and mxf tests change the field_order values. I'm assuming
      another libavformat/decoding mismatch.
      Signed-off-by: 's avatarwm4 <nfxjfg@googlemail.com>
      af1761f7
    • Anton Khirnov's avatar
      ffmpeg: do packet ts rescaling in write_packet() · 4ee5aed1
      Anton Khirnov authored
      This will be useful in the following commit, after which the muxer
      timebase is not always available when encoding.
      
      This merges Libav commit 3e265ca5. It was previously skipped.
      
      There are some changes with how/when the mux_timebase field is set,
      because the Libav approach often causes a too imprecise time base
      to be set. This is hard, because the muxer's write_header function
      can readjust the timebase, at which point we might already have
      encoded packets buffered. (It might be better to buffer them after
      the encoder, instead of after all the timestamp handling logic
      before muxing.)
      
      The two FATE tests change because the output time base is raised
      for subtitles. (Needed to avoid certain rounding issues in other
      cases.)
      
      Includes a minor merge fix by Mark Thompson, and
      
          avconv: Move rescale to stream timebase before monotonisation
      
      also by Mark Thompson <sw@jkqxz.net>.
      Signed-off-by: 's avatarwm4 <nfxjfg@googlemail.com>
      4ee5aed1
  7. 25 Jan, 2017 1 commit
  8. 14 Jan, 2017 1 commit
  9. 11 Jan, 2017 1 commit
  10. 06 Nov, 2016 1 commit
  11. 07 Oct, 2016 1 commit
  12. 01 Oct, 2016 2 commits
    • wm4's avatar
      ffmpeg: use new decode API · 8f6f2322
      wm4 authored
      This is a bit messy, mainly due to timestamp handling.
      
      decode_video() relied on the fact that it could set dts on a flush/drain
      packet. This is not possible with the old API, and won't be. (I think
      doing this was very questionable with the old API. Flush packets should
      not contain any information; they just cause a FIFO to be emptied.) This
      is replaced with checking the best_effort_timestamp for AV_NOPTS_VALUE,
      and using the suggested DTS in the drain case.
      
      The modified tests (fate-cavs and others) still fails due to dropping
      the last frame. This happens because the timestamp of the last frame
      goes backwards (ffprobe -show_frames shows the same thing). I suspect
      that this "worked" due to the best effort timestamp logic picking the
      DTS over the decreasing PTS. Since this logic is in libavcodec (where
      it probably shouldn't be), this can't be easily fixed. The timestamps
      of the cavs samples are weird anyway, so I chose not to fix it.
      
      Another strange thing is the timestamp handling in the video path of
      process_input_packet (after the decode_video() call). It looks like
      the code to increase next_dts and next_pts should be run every time
      a frame is decoded - but it's needed even if output is skipped.
      8f6f2322
    • wm4's avatar
      ffmpeg: move subframe warning to libavcodec · b2fea2fd
      wm4 authored
      With the new decode API, doing this in ffmpeg.c is impractical. There
      was resistance against removing the warning, so put it into libavcodec.
      
      Not bothering with reducing the warning to verbose log level for
      subsequent wanrings. The warning should be rare, and only happen when
      developing new codecs for the old API.
      
      Includes a change suggested by Michael Niedermayer.
      b2fea2fd
  13. 27 Sep, 2016 1 commit
  14. 24 Sep, 2016 1 commit
    • Clément Bœsch's avatar
      ffmpeg: switch to the new BSF API · 5ef19590
      Clément Bœsch authored
      This commit is initially largely based on commit 4426540f from Anton
      Khirnov <anton@khirnov.net> and two following fixes (80fb19bc and
      fe7b21c8) which were previously skipped respectively in 98e3153f, c9ee36e6,
      and 7fe7cdca.
      
      mpeg4-bsf-unpack-bframes FATE reference is updated because the bsf
      filter now actually fixes the extradata (mpeg4_unpack_bframes_init()
      changing one byte is now honored on the output extradata).
      
      The FATE references for remove_extra change because the packet flags
      were wrong and the keyframes weren't marked, causing the bsf relying on
      these proprieties to not actually work as intended.
      
      The following was fixed by James Almer:
      
      The filter option arguments are now also parsed correctly.
      
      A hack to propagate extradata changed by bitstream filters after the
      first av_bsf_receive_packet() call is added to maintain the current
      behavior. This was previously done by av_bitstream_filter_filter() and
      is needed for the aac_adtstoasc bsf.
      
      The exit_on_error was not being checked anymore, and led to an exit
      error in the last frame of h264_mp4toannexb test. Restoring this
      behaviour prevents erroring out. The test is still changed as a result
      due to the badly filtered frame now not being written after the failure.
      Signed-off-by: 's avatarClément Bœsch <u@pkh.me>
      Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
      5ef19590
  15. 21 Sep, 2016 1 commit
    • Clément Bœsch's avatar
      ffmpeg: switch to codecpar · 955b818c
      Clément Bœsch authored
      This commit is largely based on commit 15e84ed3 from Anton Khirnov
      <anton@khirnov.net> which was previously skipped in bbf5ef9d.
      
      There are still a bunch of things raising codecpar related warnings that
      need fixing, such as:
      - the use of codec->debug in the interactive debug mode
      - read_ffserver_streams(): it's probably broken now but there is no test
      - lowres stuff
      - codec copy apparently required by bitstream filters
      
      The matroska references are updated because they now properly forward
      the field_order (previously unknown, now progressive).
      
      Thanks to James Almer for fixing a bunch of FATE issues in this commit.
      Signed-off-by: 's avatarClément Bœsch <clement@stupeflix.com>
      Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
      955b818c
  16. 10 Jun, 2016 1 commit
  17. 28 Dec, 2015 1 commit
  18. 11 Dec, 2015 1 commit
  19. 16 Nov, 2015 1 commit
  20. 11 Nov, 2015 1 commit
  21. 22 Oct, 2015 2 commits
  22. 08 Aug, 2015 1 commit
  23. 03 Aug, 2015 1 commit
  24. 29 Jul, 2015 1 commit
  25. 28 Jul, 2015 2 commits
  26. 17 May, 2015 1 commit
  27. 20 Apr, 2015 1 commit
  28. 03 Apr, 2015 1 commit
  29. 26 Feb, 2015 1 commit
  30. 04 Feb, 2015 1 commit