1. 12 Mar, 2016 1 commit
  2. 10 Mar, 2016 1 commit
  3. 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
  4. 17 Feb, 2016 1 commit
  5. 10 Feb, 2016 1 commit
  6. 02 Feb, 2016 1 commit
  7. 24 Jan, 2016 1 commit
    • Anton Khirnov's avatar
      lavf: allow custom IO for all files · 9f61abc8
      Anton Khirnov authored
      Some (de)muxers open additional files beyond the main IO context.
      Currently, they call avio_open() directly, which prevents the caller
      from using custom IO for such streams.
      
      This commit adds callbacks to AVFormatContext that default to
      avio_open2()/avio_close(), but can be overridden by the caller. All
      muxers and demuxers using AVIO are switched to using those callbacks
      instead of calling avio_open()/avio_close() directly.
      
      (de)muxers that use the URLProtocol layer directly instead of AVIO
      remain unconverted for now. This should be fixed in later commits.
      9f61abc8
  8. 19 Dec, 2015 1 commit
  9. 13 Dec, 2015 1 commit
  10. 04 Dec, 2015 1 commit
  11. 02 Nov, 2015 1 commit
  12. 03 Oct, 2015 1 commit
  13. 14 Sep, 2015 1 commit
  14. 03 Sep, 2015 2 commits
  15. 02 Sep, 2015 1 commit
    • LiuQi's avatar
      avformat/hlsenc: add a use_localtime option to expand the segment filename with localtime · a4055d3e
      LiuQi authored
      test examples:
      
      ./ffmpeg -re -i ~/Movies/objectC/facebook.mp4 -v verbose -c copy -f hls -hls_segment_filename test-%s.ts -use_localtime 1 -bsf:v h264_mp4toannexb aaa.m3u8
      
      [StevenLiu@localhost ffmpeg]$ cat aaa.m3u8;ll test-*.ts
      test-1441052221.ts
      test-1441052231.ts
      test-1441052235.ts
      test-1441052243.ts
      test-1441052249.ts
      -rw-r--r--  1 StevenLiu  staff  1310736  9  1 04:15 test-1441052131.ts
      -rw-r--r--  1 StevenLiu  staff   495192  9  1 04:15 test-1441052141.ts
      -rw-r--r--  1 StevenLiu  staff  1310736  9  1 04:17 test-1441052212.ts
      -rw-r--r--  1 StevenLiu  staff  1067840  9  1 04:17 test-1441052221.ts
      -rw-r--r--  1 StevenLiu  staff   235564  9  1 04:17 test-1441052231.ts
      -rw-r--r--  1 StevenLiu  staff  1187220  9  1 04:17 test-1441052235.ts
      -rw-r--r--  1 StevenLiu  staff   694848  9  1 04:17 test-1441052243.ts
      -rw-r--r--  1 StevenLiu  staff   526588  9  1 04:17 test-1441052249.ts
      [StevenLiu@localhost ffmpeg]$
      
      ./ffmpeg -re -i ~/Movies/objectC/facebook.mp4 -v verbose -c copy -f hls -hls_segment_filename test-%s.ts -use_localtime 1 -bsf:v h264_mp4toannexb aaa.m3u8
      
      [StevenLiu@localhost ffmpeg]$ cat aaa.m3u8;ll aaa-*.ts
      aaa-1441052417.ts
      aaa-1441052427.ts
      aaa-1441052437.ts
      aaa-1441052440.ts
      aaa-1441052449.ts
      -rw-r--r--  1 StevenLiu  staff  1310736  9  1 04:19 aaa-1441052382.ts
      -rw-r--r--  1 StevenLiu  staff   277300  9  1 04:19 aaa-1441052392.ts
      -rw-r--r--  1 StevenLiu  staff  1310736  9  1 04:20 aaa-1441052417.ts
      -rw-r--r--  1 StevenLiu  staff  1067840  9  1 04:20 aaa-1441052427.ts
      -rw-r--r--  1 StevenLiu  staff   235564  9  1 04:20 aaa-1441052437.ts
      -rw-r--r--  1 StevenLiu  staff  1187220  9  1 04:20 aaa-1441052440.ts
      -rw-r--r--  1 StevenLiu  staff   338776  9  1 04:20 aaa-1441052449.ts
      [StevenLiu@localhost ffmpeg]$
      Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
      a4055d3e
  16. 25 Aug, 2015 1 commit
  17. 16 Aug, 2015 1 commit
  18. 26 Jul, 2015 2 commits
  19. 16 Jun, 2015 2 commits
    • Christian Suloway's avatar
    • Christian Suloway's avatar
      avformat/hlsenc: added HLS encryption · 907ac20a
      Christian Suloway authored
      Added HLS encryption with -hls_key_info_file <key_info_file> option. The
      first line of key_info_file specifies the key URI written to the
      playlist. The key URL is used to access the encryption key during
      playback. The second line specifies the path to the key file used to
      obtain the key during the encryption process. The key file is read as a
      single packed array of 16 octets in binary format. The optional third
      line specifies the initialization vector (IV) as a hexadecimal string to
      be used instead of the segment sequence number (default) for encryption.
      Changes to key_info_file will result in segment encryption with the new
      key/IV and an entry in the playlist for the new key URI/IV.
      
      Key info file format:
      <key URI>
      <key file path>
      <IV> (optional)
      
      Example key URIs:
      http://server/file.key
      /path/to/file.key
      file.key
      
      Example key file paths:
      file.key
      /path/to/file.key
      
      Example IV:
      0123456789ABCDEF0123456789ABCDEF
      
      Example:
      ffmpeg -f lavfi -i testsrc -c:v h264 -hls_key_info_file file.keyinfo
      foo.m3u8
      
      file.keyinfo:
      http://server/file.key
      /path/to/file.key
      0123456789ABCDEF0123456789ABCDEF
      
      Example shell script:
      BASE_URL=${1:-'.'}
      openssl rand 16 > file.key
      echo $BASE_URL/file.key > file.keyinfo
      echo file.key >> file.keyinfo
      echo $(openssl rand -hex 16) >> file.keyinfo
      ffmpeg -f lavfi -re -i testsrc -c:v h264 -hls_flags delete_segments \
        -hls_key_info_file file.keyinfo out.m3u8
      --
      Signed-off-by: 's avatarChristian Suloway <csuloway@globaleagleent.com>
      Signed-off-by: 's avatarDan Dennedy <dan@dennedy.org>
      Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
      907ac20a
  20. 17 May, 2015 3 commits
  21. 23 Feb, 2015 1 commit
  22. 21 Feb, 2015 2 commits
  23. 20 Feb, 2015 3 commits
  24. 11 Jan, 2015 1 commit
  25. 08 Jan, 2015 1 commit
  26. 16 Dec, 2014 2 commits
  27. 10 Dec, 2014 1 commit
  28. 06 Dec, 2014 1 commit
  29. 16 Nov, 2014 1 commit
  30. 17 Oct, 2014 1 commit
  31. 06 Oct, 2014 1 commit