Florian Diemer
db4c1bee96
avformat/riffenc: added possibility to set first to ninth audio language for RIFF taged files (e.g. avi files)
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-05 23:38:21 +02:00
James Almer
b33369b612
avformat/matroskaenc: don't reserve space for stream duration tags if the output is not seekable
...
The durations are never written in that situation.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-10-04 21:19:58 -03:00
James Almer
3cc9d6d382
avformat/matroska: write FlagInterlaced element in WebM
...
It's listed as supported in both https://www.webmproject.org/docs/container/
and https://matroska.org/technical/specs/index.html
Reviewed-by: Dave Rice <dave@dericed.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-10-04 19:42:55 -03:00
Rodger Combs
14fe54bbfb
lavf/mpegtsenc: fix autobsf when the first NAL is 0x1<XX> bytes
2016-10-04 01:20:20 -05:00
Steven Liu
be1d32492e
avformat/hlsenc: support multi level path in m3u8 with filename
...
before patch:
localhost:osx liuqi$ tree 20160926/
20160926/
└── file-20160909
└── 26
└── 16
└── 15
├── 46
│ ├── 13.ts
│ ├── 25.ts
│ ├── 36.ts
│ ├── 45.ts
│ └── 54.ts
└── 47
├── 04.ts
├── 14.ts
├── 24.ts
└── 35.ts
6 directories, 9 files
localhost:osx liuqi$ cat out.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:12
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:11.360000,
13.ts
#EXTINF:10.800000,
25.ts
#EXTINF:9.120000,
36.ts
#EXTINF:8.760000,
45.ts
#EXTINF:10.200000,
54.ts
#EXTINF:10.720000,
04.ts
#EXTINF:9.600000,
14.ts
#EXTINF:10.600000,
24.ts
#EXTINF:8.760000,
35.ts
#EXT-X-ENDLIST
after patch:
localhost:osx liuqi$ tree 20160926/
20160926/
└── file-20160909
└── 26
└── 16
└── 15
├── 46
│ ├── 13.ts
│ ├── 25.ts
│ ├── 36.ts
│ ├── 45.ts
│ └── 54.ts
└── 47
├── 04.ts
├── 14.ts
├── 24.ts
└── 35.ts
6 directories, 9 files
localhost:osx liuqi$ cat out.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:12
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:11.360000,
20160926/file-20160909/26/16/15/46/13.ts
#EXTINF:10.800000,
20160926/file-20160909/26/16/15/46/25.ts
#EXTINF:9.120000,
20160926/file-20160909/26/16/15/46/36.ts
#EXTINF:8.760000,
20160926/file-20160909/26/16/15/46/45.ts
#EXTINF:10.200000,
20160926/file-20160909/26/16/15/46/54.ts
#EXTINF:10.720000,
20160926/file-20160909/26/16/15/47/04.ts
#EXTINF:9.600000,
20160926/file-20160909/26/16/15/47/14.ts
#EXTINF:10.600000,
20160926/file-20160909/26/16/15/47/24.ts
#EXTINF:8.760000,
20160926/file-20160909/26/16/15/47/35.ts
#EXT-X-ENDLIST
Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
2016-10-04 06:41:53 +08:00
Stephan Holljes
d0be0cbebc
lavf/aviobuf.c: Adapt avio_accept and avio_handshake to new AVIOContext API
...
Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
2016-10-03 23:28:48 +02:00
Adriano Pallavicino
f4e692a0e9
lavf/bink.c: fix warning due to misleading indentation
...
Signed-off-by: Adriano Pallavicino <adriano.pallavicino@gmail.com>
Signed-off-by: Josh de Kock <josh@itanimul.li>
2016-10-03 15:42:27 +01:00
Steven Liu
0d2dd5d96d
avformat/hlsenc: support mkdir_p for use_localtime_mkdir
...
when use use_localtime_mkdir to create multi level dir,
ffmpeg give error message:
ffmpeg -re -i ~/Movies/objectC/facebook.mp4 -c copy -use_localtime 1
-use_localtime_mkdir 1 -hls_segment_filename '%Y%m%d/file-%Y%m%d/%s.ts'
out.m3u8
error message:
Could not create directory 20160926/file-20160926 with use_localtime_mkdir
add mkdir_p for support the multi level dir
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Tested-by: Zuo Genyu <1515161258@qq.com> (Windows)
Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
2016-10-01 05:37:19 +08:00
Jan Sebechlebsky
81bab1074f
avformat/tee: Copy interrupt callback and flags to slave
...
Copy interrupt callback to slave format context to allow
user to interrupt IO. Copy format flags as well.
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
2016-09-29 17:17:26 +02:00
Carl Eugen Hoyos
e84eeca577
lavf/movenc: Put correct display aspect ratio in ARES atom.
2016-09-29 15:41:17 +02:00
Carl Eugen Hoyos
fcce25ee5d
lavf/mov: Read display aspect ratio from ares atom also for dnxhd.
...
Fixes aspect ratio of sample in ticket #2125 .
Fixes aspect ratio of sample in ticket #5325 .
2016-09-29 15:29:03 +02:00
Jan Ekström
cc725ebe48
movenc: Add support for writing language codes into ISML manifests
...
Streaming servers appear to ignore all other language metadata.
Signed-off-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Josh de Kock <josh@itanimul.li>
2016-09-29 10:32:03 +01:00
Sasi Inguva
dba2db6c0e
lavf/mov.c: Make audio timestamps strictly monotonically increasing inside an edit list.
...
Fixes gapless decoding. Adjust skip_samples field correctly in case of DISCARDed audio frames.
Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-29 02:25:41 +02:00
Jan Ekström
6c10f8fe76
movenc: use similar logic to DASH when writing bit rate to ISML
...
This way, in case of bit rate not being set, max_bitrate will be
used instead. This enables, for example, re-using max_bitrate
information from the input or doing transcoding with a rate
control mode that is not bit rate based.
Signed-off-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 23:45:11 +02:00
raymondzheng1412@gmail.com
2366efce3c
avformat/concatdec: don't call open_file when seek position within a file
2016-09-28 20:31:22 +02:00
Sylvain Laurent
58776ccbdb
lavf/mpegtsenc: Set min PID for data pkt to 0x0010.
...
Fixes ticket #1673 .
2016-09-28 17:29:11 +02:00
Michael Niedermayer
2679ad4773
avformat/avidec: Check nb_streams in read_gab2_sub()
...
Fixes null pointer dereference
Fixes: 1/null_point.avi
Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 16:46:24 +02:00
Michael Niedermayer
14bac7e00d
avformat/avidec: Remove ancient assert
...
This assert can with crafted files fail, a warning is already printed
for this case.
Fixes assertion failure
Fixes:1/assert.avi
Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 16:46:24 +02:00
James Almer
29b6c2be29
avformat/matroskadec: set AVCodecParameters.field_order on progressive video
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-09-27 20:30:11 -03:00
Sophia Wang
8c83062acb
avformat/matroskadec: retain error codes in matroska_resync() and matroska_read_packet()
...
Signed-off-by: Sophia Wang <skw@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 01:24:51 +02:00
James Almer
f0b6f7253f
avformat: add av_stream_get_codec_timebase()
...
This will allow ffmpeg.c to stop using AVStream.codec in some cases
Signed-off-by: James Almer <jamrial@gmail.com>
2016-09-27 10:42:39 -03:00
Carl Eugen Hoyos
46aae84616
lavf/movenc: Allow to disable writing the timecode track.
...
Fixes ticket #5492 .
2016-09-26 08:50:48 +02:00
James Almer
aa0dc698db
avformat/avidec: remove warning about deprecated declarations
...
Signed-off-by: James Almer <jamrial@gmail.com>
2016-09-25 16:03:21 -03:00
Michael Niedermayer
b98dafe045
avformat/avidec: Fix memleak with dv in avi
...
Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-25 19:06:51 +02:00
Carl Eugen Hoyos
267da70ea8
lavf/utils: Avoid an overflow for huge negative durations.
...
Fixes ticket #5135 .
2016-09-24 21:01:46 +02:00
Carl Eugen Hoyos
04fa20d53c
lavf/aacdec: Do not autodetect a single frame inside the file.
2016-09-24 18:33:55 +02:00
Anssi Hannula
a6f5e25ad9
avformat/hls: Fix handling of EXT-X-BYTERANGE streams over 2GB
...
Replace uses of atoi() with strtoll() when trying to read values into
int64_t variables.
Fixes Kodi trac #16926 :
http://trac.kodi.tv/ticket/16926
2016-09-24 09:46:32 +03:00
Steven Liu
1212e3468e
avformat/hlsenc: refine EXT-X-BYTERANGE support for segments
...
refine EXT-X-BYTERANGE tag,
the spec link:
https://tools.ietf.org/html/draft-pantos-http-live-streaming-19#section-4.3.2.2
the apple doc:
https://developer.apple.com/library/ios/technotes/tn2288/_index.html#
//apple_ref/doc/uid/DTS40012238-CH1-BYTE_RANGE_SUPPORT_FOR_SEGMENTS
command line:
./ffmpeg -i ~/Movies/objectC/a.mp4 -c copy -f hls -hls_time 7
-hls_list_size 0 -hls_segment_size 2500000 -t 40 output-test.m3u8
output:
localhost:ffmpeg liuqi$ ll *.ts ;cat output-test.m3u8
-rw-r--r-- 1 liuqi staff 2792176 9 12 14:44 output-test0.ts
-rw-r--r-- 1 liuqi staff 3112528 9 12 14:44 output-test3.ts
-rw-r--r-- 1 liuqi staff 3377420 9 12 14:44 output-test6.ts
-rw-r--r-- 1 liuqi staff 1228016 9 12 14:44 output-test7.ts
#EXTM3U
#EXT-X-VERSION:4
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:9.021000,
#EXT-X-BYTERANGE:1334988@0
output-test0.ts
#EXTINF:3.000000,
#EXT-X-BYTERANGE:721356@1334988
output-test0.ts
#EXTINF:3.000000,
#EXT-X-BYTERANGE:735832@2056344
output-test0.ts
#EXTINF:6.000000,
#EXT-X-BYTERANGE:1645940@0
output-test3.ts
#EXTINF:3.000000,
#EXT-X-BYTERANGE:715152@1645940
output-test3.ts
#EXTINF:3.000000,
#EXT-X-BYTERANGE:751436@2361092
output-test3.ts
#EXTINF:9.000000,
#EXT-X-BYTERANGE:3377420@0
output-test6.ts
#EXTINF:3.960000,
#EXT-X-BYTERANGE:1228016@0
output-test7.ts
#EXT-X-ENDLIST
localhost:ffmpeg liuqi$
ticket-id: #5839
Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-24 04:28:02 +02:00
Timo Rothenpieler
9777ba33f5
avformat/utils: avoid using marked decoders for probing
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-23 11:16:26 +02:00
Paul B Mahol
88d79dbd16
avformat/movenc: write pasp atom even if sar.num == sar.den
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-22 23:59:46 +02:00
Timo Rothenpieler
6d9a46e884
avformat/utils: force native h264 decoder for probing
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-22 13:16:00 +02:00
Clément Bœsch
955b818cf9
ffmpeg: switch to codecpar
...
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: Clément Bœsch <clement@stupeflix.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-09-21 15:39:28 +02:00
Mark Reid
d8d4333217
avformat/mxfdec: use first valid sourceclip found if material track has multiple components
...
This commit fixes a issue with mxf footage having multiple
components on a material track.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-21 01:29:20 +02:00
Sasi Inguva
ca6cae73db
lavf/mov: Add support for edit list parsing.
...
Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-19 19:52:05 +02:00
Sasi Inguva
b518d809f1
lavf/utils: Support av_index_search_timestamp in case of AVIndexEntry with discarded packets.
...
Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-19 19:51:13 +02:00
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