Commit Graph

19361 Commits

Author SHA1 Message Date
Sasi Inguva
778af68c70 avformat/avframe.h: Add a flag in AVIndexEntry to discard frame after decoding.
Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-19 19:51:13 +02:00
Michael Niedermayer
a880923170 avformat/http: Fix #ifdef FF_API_HTTP_USER_AGENT
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-17 20:14:10 +02:00
Steven Liu
27714b462d lavf/http: deprecate user-agent option 2016-09-17 13:48:34 +02:00
Michael Niedermayer
51000b9945 avformat/movenc: Make the packet check more tolerant
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-16 11:44:13 +02:00
Michael Niedermayer
2834313933 avformat/movenc: Check packet in mov_write_single_packet() too
Fixes assertion failure

Found-by: durandal117
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-16 11:43:56 +02:00
Michael Niedermayer
deabcd2c05 avformat/movenc: Factor check_pkt() out
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-16 11:43:47 +02:00
Vignesh Venkatasubramanian
7238c53048 libavformat/webm_chunk: Option to specify HTTP header
Add an option to specify HTTP header in the WebM Chunk Muxer (this
works the same way as the 'method' parameter in the HLS muxer).

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-16 03:13:21 +02:00
Paul B Mahol
4d677c7ae3 avformat/msf: add support for ATRAC3 codec
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-15 16:59:31 +02:00
Martin Storsjö
f8a13c7213 lavf/rtsp: Fix a crash with the RTSP muxer.
Introduced in 00e122bc / bc2a3296
The whole block that the statement was added to is only
relevant when used as a demuxer, but the other statements
there have had other if statements guarding them. Make
sure to only run this whole block if being used as a
demuxer.

Fixes ticket #5844.
2016-09-15 13:50:57 +02:00
Michael Niedermayer
6f062eb8d0 avformat/hlsenc: Emulate strftime("%z") using other functions if it does not work
This should fix the code on windows

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-15 02:31:42 +02:00
Xinzheng Zhang
ecc04b4f2f avformat/utils: fix timebase error in avformat_seek_file()
When there is only one stream and stream_index has not specified,
The ts has been transferd by the timebase of stream0 without modifying the stream_index
In this condation it cause seek failure.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-14 15:50:07 +02:00
Steven Liu
c8528e54e5 avformat/flvenc: add no_sequence_end flags for flvflags
when split flv file by flv format at first, and cat flvs file
into one flv file, the flv sequence end is be used,
then the whole flv have many flv sequence end TAG.
this flags can give user an option to ignore write sequence end TAG

Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-14 15:50:07 +02:00
Michael Niedermayer
e85c4a4706 avformat/flvenc: Add () around &
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-14 15:50:07 +02:00
Clément Bœsch
415f907ce8 lavf/utils: add missing ismv in MOV-like formats 2016-09-14 10:00:08 +02:00
Clément Bœsch
9112822e71 lavf/utils: simplify matching MOV-like formats 2016-09-14 09:59:22 +02:00
Clément Bœsch
ae1dd0c9a6 lavf: add avformat_transfer_internal_stream_timing_info() and use it in ffmpeg
In lavf we have access to st->internal->avctx so it's a better place
than in ffmpeg*.c and will allow moving to codecpar.
2016-09-14 09:57:55 +02:00
Steven Liu
84aebfc74e avformat/flvenc: add FLVFlags for flvflags options
add FLVFlags type, be used to add new FLVFlags options

Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-14 01:45:40 +02:00
Michael Niedermayer
9f18a970b2 avformat/hlsenc: Assume UTC if "%z" is unsupported in strftime()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-13 23:44:35 +02:00
Michael Niedermayer
22ba9a3cb8 avformat/hlsenc: Avoid "%T" "%F" in strftime() to improve compatibility
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-13 23:44:35 +02:00
Rodger Combs
1f6d7eb470
lavf: add a flag to enable/disable automatic bitstream filtering
This is mostly useful for muxers that wrap other muxers, such as dashenc
and segment. The actual duplicated bitstream filtering is largely harmless,
but delaying the header can cause problems when the muxer intended the header
to be written to a separate file.
2016-09-12 21:50:32 -05:00
Jan Sebechlebsky
b7760dd8d4 avformat/tee: Use BSF list API
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
2016-09-12 00:06:17 +02:00
Michael Niedermayer
cb114ed464 avformat/mux: implement AVFMT_FLAG_SHORTEST
This will allow fixing several bugs with the -shortest option

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-11 23:17:31 +02:00
Alex Converse
09317e3e06 ivfenc: Add VPX codec tags.
This fixes remuxing VPX from MP4 without manually overwriting the tag.
2016-09-10 16:40:47 -07:00
Michael Niedermayer
68f4c2163e avformat/movenc: Check first DTS similar to dts difference
Fixes assertion failure
Fixes: b84b53855a0b74560e64c6f45f505a13/signal_sigabrt_7ffff6ae7c37_3837_ef4e243ea5b4fa8d0becf4afe9166604.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-10 00:50:36 +02:00
Matthew Gregan
7b3bc365f9 avformat/mov: Enable stream parsing for VP9.
MP4 media containing VP9 using superframes (such as
https://github.com/Netflix/vp9-dash/raw/master/DASH-Samples/Fountain_2997_0560kbps_640x480_4x3PAR.ivf_DashUnencrypted.ismv)
does not decode correctly with the built-in VP9 decoder because
superframes are passed to the decoder whole rather than split into
individual frames.

Signed-off-by: Matthew Gregan <kinetik@flim.org>
2016-09-08 22:20:46 -04:00
Steven Liu
1da00be009 avformat/segment: give a warning message for remove initial_offset option
ffmpeg have a generic solution working with all muxer named
output_ts_offset, output_ts_offset will instead of initial_offset

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-09 02:45:28 +02:00
Sergey Volk
347cb14b7c avformat/mov: Fix potential integer overflow in mov_read_keys
Actual allocation size is computed as (count + 1)*sizeof(meta_keys), so
we need to check that (count + 1) won't cause overflow.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-08 11:35:44 +02:00
Michael Niedermayer
2793ebd6cb avformat/hlsenc: implement program_date_time
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-08 02:22:21 +02:00
Michael Niedermayer
207d78176f avformat: Export ticks_per_frame in st->codec
Fixes regressions with stream copy and output timebase/fps being twice as fine as needed
Makes the timebase and ticks per frame handled identical which should make the
code easier to understand and work with. It does not solve the problem without
st->codec access

Suggested-by: Hendrik Leppkes
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-07 11:11:56 +02:00
Rodger Combs
843e72ea55
lavf/matroskaenc: use mkv_check_tag_name consistently
Previously, we used a different list of checks when deciding whether to
write a set of tags at all than we did when deciding whether to write an
individual tag in the set. This resulted in sometimes writing an empty
tag master and seekhead. Now we use mkv_check_tag_name everywhere, so
if a dictionary is entirely composed of tags we skip, we don't write a
tag master at all.

This affected the test file, since "language" was on one list but not
the other, so we were writing an empty tag master there. The test hash
is updated to reflect that change.
2016-09-06 17:25:37 -05:00
Rodger Combs
3829a02738
lavf/matroskaenc: skip writing "duration" tags 2016-09-06 17:25:36 -05:00
Rodger Combs
6ede4e93ca
lavf/matroskaenc: move skipped metadata keys to separate function 2016-09-06 17:25:36 -05:00
Franklin Phillips
cefce6e2c1 avformat/hlsenc: fix incomplete write of subtitle HLS playlist
This patch is a fix for the bug with ticket number 5812
(https://trac.ffmpeg.org/ticket/5812).

Basically, the bug is that the last segment and the "#EXT-X-ENDLIST"
tag are not being written to the subtitle playlist file when
converting a file with subtitles to the HLS format. The reason for
this seem to be that the filename for the subtitle file is being freed
too early. This solution is simply to free that memory after it's last
use in the "hls_window" function.

Signed-off-by: Franklin Phillips <franklinphillips9p8@inbox.lv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-05 08:52:28 +02:00
Paul B Mahol
c62cb9bf5a avcodec/utvideodec: add support for ULY4 and ULH4
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-04 01:57:50 +02:00
Carl Eugen Hoyos
3c821a1a7b lavf/udp: Do not use MCAST_* for multicast on tvOS.
Fixes ticket #5774.
2016-09-03 15:18:40 +02:00
Carl Eugen Hoyos
2dfd0f4b9e lavf/webm_chunk: Print an error if no header filename was provided. 2016-09-03 14:31:55 +02:00
Carl Eugen Hoyos
8f0bd1d9ba lavf/httpauth: Do case-insensitive http header checks.
Tested by trac user NTAuthority.
Fixes ticket #5786.
2016-09-03 13:56:40 +02:00
Carl Eugen Hoyos
91842005fe lavf/img2dec: Skip DQT segment when auto-detecting jpg.
DQT segments may contain 0xFFs which break auto-detection.
2016-09-03 13:38:16 +02:00
Michael Niedermayer
e4e4a9cad7 avformat/avidec: Fix infinite loop in avi_read_nikon()
Fixes: 360/test.poc

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-02 13:57:40 +02:00
Erkki Seppälä
499e8b0952 avformat/movenc: added ability to use original stream ids as track ids instead of regenerating them
Sometimes it's useful to be able to define the exact track numbers in
the generated track, instead of always beginning at track id 1. Using
the option use_stream_ids_as_track_ids now copies the use stream ids
to track ids. Dynamically generated tracks (ie. tmcd) have their track
numbers defined as continuing from the highest numbered stream id.

Signed-off-by: Erkki Seppälä <erkki.seppala.ext@nokia.com>
Signed-off-by: OZOPlayer <OZOPL@nokia.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-01 14:56:10 +02:00
Steven Liu
3aab6fa6ba avformat/hlsenc: add warning for append_list and hls_init_time option
When use append_list mode, the hls_init_time set nouse,
Because the append_list only support append at the old m3u8 end
cannot set init segments durations at the middle of the list.
That's invalid. and show a warning message for user.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-31 02:48:39 +02:00
Simon Hailes
a13a81a0dc avformat/crypto: add seeking support on read
cyrpto allows reading of data which has been aes-128-cbc encrypted given a key and an iv. But it did not handle filetypes which require seeking... e.g. it failed on an encrypted .mp4 file.

example:
take 25.mp4 created with:
ffmpeg -f lavfi -i sine=frequency=1000:beep_factor=2:r=48000:duration=720.0 -f lavfi -i testsrc=duration=720.0:rate=25 -vcodec libx264 -cmp 22 -timecode 10:00:00:00 -r 25 -y out\25.mp4

encrypt with:
openssl enc -aes-128-cbc -K 12345678901234567890123456789012 -iv 12345678901234567890123456789012 -in 25.mp4 -out 25.enc
then to transcode in ffmpeg:
ffmpeg -key 12345678901234567890123456789012 -iv 12345678901234567890123456789012 -i crypto:25.enc -vcodec mpeg4 -r 25 -y 25dec.mp4

prior to this modification, the transcode would fail.

Note also:  crypto previously maked both reads and writes as streamed, which caused the whole file
to be read before the transcode started.  Now, for read only, if the underlying layer is not marked as streamed,
then crypto is not.  This should enable efficient reading of encrypted containers which require seeking.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-30 17:14:28 +02:00
Simon Hailes
a2fcacc880 libavformat/crypto - encourage reads of 4096 bytes
the current implementation reads in chunks of 149x16=2384 bytes.
Seems more logical for it to read in chunks of 4096

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-30 17:10:11 +02:00
Stephen Hutchinson
92916e8542 avisynth: support pix_fmts added to AviSynth+
A number of new pix_fmts have been added to AviSynth+:
16-bit packed RGB and RGBA
10-, 12-, 14, and 16-bit YUV 4:2:0, 4:2:2, and 4:4:4
8-, 10-, 12-, 14-, and 16-bit Planar RGB
8-, 10-, 12-, 14-, and 16-bit Planar YUVA and Planar RGBA*
10-, 12-, 14-, and 16-bit GRAY variants*
32-bit floating point Planar YUV(A), Planar RGB(A), and GRAY*

*some of which are not currently available pix_fmts here and were
 not added to the demuxer due to this

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-30 00:23:52 +02:00
Steven Liu
557ad3a474 avformat/hlsenc: add option hls_init_time to set init hls window segment duration
recover segments duration time by hls_time after init hls window.
This is reuqested by Ibrahim Tachijian

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-29 14:54:27 +02:00
Thomas Hebb
a37e6dd2ba avformat/mov: aax: pass proper AVClass to av_log()
av_log() expects its first parameter to be a pointer to a struct whose
first element is a pointer to an AVClass. In what I can only imagine is
a typo, one call to av_log() in the AAX decryption code instead passes
a pointer to an AVSHA struct, which doesn't even contain a pointer as
its first element, much less a pointer to an AVClass. Change the call to
pass the current MOVContext, as surrounding calls do.

The incorrect AVClass was causing mpv to emit the warning "av_log
callback called with bad parameters" when playing an .aax file.

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-28 20:54:22 +02:00
Marton Balint
13b90ff2c1 avformat: fix decoded creation_time timestamps
Use proper ISO 8601 timestamps which also signal that they are in UTC.

This changes the format of creation_time and modification_date metadata values
from 2016-06-01 22:30:00 to 2016-01-01T22:30:00.000000Z

Fixes ticket #5673.

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-08-28 15:55:32 +02:00
James Almer
dc7e5adbc0 avformat/utils: fix a codecpar non use
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-08-27 11:21:12 -03:00
Michael Niedermayer
c75273310c avformat/utils: End probing if the expected codec surpasses AVPROBE_SCORE_STREAM_RETRY
Fixes Ticket5800

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-27 01:53:18 +02:00
Vignesh Venkatasubramanian
42a635ddae webm_chunk: Set pts precision to milliseconds
Milliseconds is the de-factor precision for timestamps in
Matroska/WebM media.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-25 22:22:28 +02:00