Commit Graph

655 Commits

Author SHA1 Message Date
Michael Niedermayer 76424b2da8 Merge commit 'e01fba5562133ac56a4f44c6f214a80ee33cb388'
* commit 'e01fba5562133ac56a4f44c6f214a80ee33cb388':
  movenc: Add an F4V muxer

Conflicts:
	Changelog
	libavformat/allformats.c
	libavformat/movenc.c
	libavformat/version.h

See: 7bc70930dd
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-23 12:05:48 +02:00
Clément Bœsch e01fba5562 movenc: Add an F4V muxer
F4V is Adobe's mp4/iso media variant, with the most significant
addition/change being supporting other flash codecs than just
aac/h264.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-23 11:17:03 +03:00
James Almer 1d4476d5da movenc: use ff_alloc_extradata()
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 13:02:18 +02:00
Michael Niedermayer e4d45673ca avformat/movenc: set XDCAM codec tag correctly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-12 01:42:53 +02:00
Michael Niedermayer 713dcdbfcb avformat/movenc: set pretty compressor name for XDCAM
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-12 01:42:53 +02:00
Michael Niedermayer ce994a03f5 avformat/movenc: make AVStream easier to access
This adds a AVStream pointer to Track

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-12 01:42:53 +02:00
Michael Niedermayer 8c0f565ee3 avformat/movenc: factor out find_fps()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-08 14:18:43 +02:00
Michael Niedermayer 8c766228c1 Merge commit 'f2b00a5372bfa1d82a8ab99cb8eafac8a9473494'
* commit 'f2b00a5372bfa1d82a8ab99cb8eafac8a9473494':
  movenc: Return a proper error code for invalid combinations

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 14:40:18 +02:00
Michael Niedermayer 341dc59053 Merge commit 'f1eac2b8a0370b908cd691086d11f51342054730'
* commit 'f1eac2b8a0370b908cd691086d11f51342054730':
  movenc: Use keyframes as default fragmentation point in ismv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 13:09:53 +02:00
Michael Niedermayer d4574b7608 Merge commit 'a9553bbb336a7186c62b3b14a0499c1b6ba61ebd'
* commit 'a9553bbb336a7186c62b3b14a0499c1b6ba61ebd':
  movenc: Set all implicit flags immediately in mov_write_header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 12:24:19 +02:00
Michael Niedermayer b189c699b9 Merge commit '187023f6b2b43966acb2449a379b4ededdc4b22e'
* commit '187023f6b2b43966acb2449a379b4ededdc4b22e':
  movenc: Set mov->mode earlier in mov_write_header

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 12:17:10 +02:00
Martin Storsjö f2b00a5372 movenc: Return a proper error code for invalid combinations
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 21:02:52 +03:00
Martin Storsjö f1eac2b8a0 movenc: Use keyframes as default fragmentation point in ismv
Fragmenting blindly to a certain duration isn't a good choice
if one should be able to switch between different qualities,
therefore default to keyframes instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 16:10:21 +03:00
Martin Storsjö a9553bbb33 movenc: Set all implicit flags immediately in mov_write_header
This makes sure other sanity checks for conflicting options
can work properly, e.g. for the conflict between the faststart
flag when using the ismv mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 16:10:21 +03:00
Martin Storsjö 187023f6b2 movenc: Set mov->mode earlier in mov_write_header
This allows simplifying some early checks that depend on the
muxer mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 16:10:21 +03:00
Michael Niedermayer 35a8387b40 Merge commit '72fe16a13e3ebd5396ac173bf84c8b20085c16d5'
* commit '72fe16a13e3ebd5396ac173bf84c8b20085c16d5':
  movenc: Use null buffers for measuring the amount of data to be written

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 12:37:24 +02:00
Martin Storsjö 72fe16a13e movenc: Use null buffers for measuring the amount of data to be written
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:42:40 +03:00
Michael Niedermayer b7e7d8cdaf Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Add an option for omitting the tfhd base offset

Conflicts:
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-18 13:32:55 +02:00
Michael Niedermayer 66e199bd75 Merge commit 'a4adabb460ace39783d707a5b3bbe28b4b5b9dc4'
* commit 'a4adabb460ace39783d707a5b3bbe28b4b5b9dc4':
  movenc: Write the moof atom in two passes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-18 12:47:55 +02:00
Martin Storsjö e7bf085b78 movenc: Add an option for omitting the tfhd base offset
This makes the output fragments independent of their position in
the output stream, making the output work better when streamed.

QuickTime Player doesn't support fragmented mp4 without the base
data offset, though.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 23:30:31 +03:00
Martin Storsjö a4adabb460 movenc: Write the moof atom in two passes
This is a bit more work, but avoids having to fill in
the data offset field afterwards instead of directly when
the rest of the trun atom is written.

This simplifies future cases where this field needs to be set to
something different.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 23:25:46 +03:00
Michael Niedermayer 46405813c3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Simplify setting the fragmentation flag

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-10 10:20:11 +02:00
Michael Niedermayer ada9b17e7a Merge commit '8b524ab0c43c1767919530abb79d3656113cdc47'
* commit '8b524ab0c43c1767919530abb79d3656113cdc47':
  movenc: Add a warning message if conflicting options have been specified

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-10 10:08:38 +02:00
Martin Storsjö bdf990425e movenc: Simplify setting the fragmentation flag
This makes sure the faststart vs fragmentation check works as
intended when fragmentation is enabled due to using the ismv mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-09 23:58:33 +03:00
Martin Storsjö 8b524ab0c4 movenc: Add a warning message if conflicting options have been specified
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-09 23:57:41 +03:00
Michael Niedermayer 40bb950385 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Don't flush after each written packet

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-03 15:18:57 +02:00
Martin Storsjö 0fbda03e5c movenc: Don't flush after each written packet
This should improve write performance quite significantly.
---
Tested with both writing a normal mp4, by using the faststart
feature and writing a fragmented mp4 file; all turn out with the
same md5sum as before.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-03 10:36:17 +03:00
Michael Niedermayer 2501f6d3d6 avformat/movenc: Use the rate from av_timecode_init_from_string() for tmcd
Fixes Ticket2892
Reveiwed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-02 17:16:20 +02:00
Michael Niedermayer 231201382e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Check for errors from mov_create_chapter_track

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-27 12:52:17 +02:00
Michael Niedermayer da2038221b Merge commit '2bbad1f94cbc5eab0aa2d937bc79d085477d0242'
* commit '2bbad1f94cbc5eab0aa2d937bc79d085477d0242':
  movenc: Properly free allocated data on failures in mov_write_header

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-27 12:47:04 +02:00
Michael Niedermayer ef4fcb30c4 Merge commit '3559fb97c459c88b4f1d0eef80d55933d3b7fabe'
* commit '3559fb97c459c88b4f1d0eef80d55933d3b7fabe':
  movenc: Check that tracks->enc exists before trying to free extradata

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-27 12:33:39 +02:00
Michael Niedermayer 0bd15938ec Merge commit '4d122b01e4ce539269ee2df193b061772c7374f6'
* commit '4d122b01e4ce539269ee2df193b061772c7374f6':
  movenc: Check for allocation failures in mov_create_chapter_track

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-27 12:26:27 +02:00
Martin Storsjö 0fb3e1c6ce movenc: Check for errors from mov_create_chapter_track
On failures in the write_trailer function, we could also ignore
the errors and try to finish the file despite these errors (which
would only leave an incomplete chapters track). It's probably better
to signal the error clearly to the caller though (and if this
function failed there's no guarantee that there's enough memory to
finish the trailer either).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-27 10:26:10 +03:00
Martin Storsjö 2bbad1f94c movenc: Properly free allocated data on failures in mov_write_header
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-27 10:26:08 +03:00
Martin Storsjö 3559fb97c4 movenc: Check that tracks->enc exists before trying to free extradata
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-27 10:26:07 +03:00
Martin Storsjö 4d122b01e4 movenc: Check for allocation failures in mov_create_chapter_track
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-27 10:25:55 +03:00
Michael Niedermayer e43c672b56 Merge commit 'b89e8759e053792704741d08cbc41c9ac3c7ed63'
* commit 'b89e8759e053792704741d08cbc41c9ac3c7ed63':
  mov: Write tmcd extradata

This commit should make no difference as we had tmcd support
already, which is not changed.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-26 14:36:00 +02:00
Luca Barbato b89e8759e0 mov: Write tmcd extradata 2013-08-25 13:49:21 +02:00
Michael Niedermayer 88909beca3 avcodec/movenc: move chapter_properties under the #if of the code that uses it
Fixes warning about unused variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-24 23:23:00 +02:00
Michael Niedermayer 800ea20cad Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Make tkhd "enabled" flag QuickTime compatible

Conflicts:
	libavformat/movenc.c
	tests/ref/acodec/alac
	tests/ref/acodec/pcm-s16be
	tests/ref/acodec/pcm-s24be
	tests/ref/acodec/pcm-s32be
	tests/ref/acodec/pcm-s8
	tests/ref/lavf/mov
	tests/ref/vsynth/vsynth1-dnxhd-1080i
	tests/ref/vsynth/vsynth1-mpeg4
	tests/ref/vsynth/vsynth1-prores
	tests/ref/vsynth/vsynth1-qtrle
	tests/ref/vsynth/vsynth1-svq1
	tests/ref/vsynth/vsynth2-dnxhd-1080i
	tests/ref/vsynth/vsynth2-mpeg4
	tests/ref/vsynth/vsynth2-prores
	tests/ref/vsynth/vsynth2-qtrle
	tests/ref/vsynth/vsynth2-svq1

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-23 13:49:24 +02:00
John Stebbins 30ce289074 movenc: Make tkhd "enabled" flag QuickTime compatible
QuickTime will play multiple audio tracks concurrently if this flag is
set for multiple audio tracks.  And if no subtitle track has this flag
set, QuickTime will show no subtitles in the subtitle menu.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-23 09:55:42 +02:00
Michael Niedermayer c443689afb avformat/movenc: use av_freep() instead of av_free() except for local variables before return
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-23 00:31:15 +02:00
Michael Niedermayer 25e4ec6aa1 Merge commit '60198742ff851f11a3757c713fc75a9c19b88566'
* commit '60198742ff851f11a3757c713fc75a9c19b88566':
  movenc: fix detection of 64bit offset requirement

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-22 14:16:52 +02:00
Michael Niedermayer 606a30c5a1 Merge commit 'fe5d5a8ffcafdc14c0d26eaea6464c89e120cc9e'
* commit 'fe5d5a8ffcafdc14c0d26eaea6464c89e120cc9e':
  movenc: Make chapter track QuickTime compatible

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-22 13:58:23 +02:00
Michael Niedermayer d68adbd666 Merge commit 'f8ef91ff3d6bb83d601d816ef9368f911021c64b'
* commit 'f8ef91ff3d6bb83d601d816ef9368f911021c64b':
  movenc: add faststart option for web streaming

Conflicts:
	doc/muxers.texi
	libavformat/movenc.c
	libavformat/movenc.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-22 13:37:16 +02:00
Clément Bœsch 60198742ff movenc: fix detection of 64bit offset requirement
The old method doesn't work when moov is relocated to beginning of file

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-21 14:20:33 +01:00
John Stebbins fe5d5a8ffc movenc: Make chapter track QuickTime compatible
QuickTime requires that the stsd.text box be completely filled in.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-21 14:20:33 +01:00
Clément Bœsch f8ef91ff3d movenc: add faststart option for web streaming
Faststart moves the moov atom to the beginning of the file and rewrites
the rest of the file after muxing is complete.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-21 14:20:33 +01:00
Michael Niedermayer a76390d100 Merge commit '6c786765cd5eb794dedd4a0970dfe689b16dfeeb'
* commit '6c786765cd5eb794dedd4a0970dfe689b16dfeeb':
  movenc: Allow chapters to be written in trailer

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-21 11:00:26 +02:00
Michael Niedermayer 8d63aaed1e Merge commit 'db03cb37fd9650b4a7c752d24a2e84ff27508ee8'
* commit 'db03cb37fd9650b4a7c752d24a2e84ff27508ee8':
  movenc: Allow chapter track in default MODE_MP4

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-21 10:45:27 +02:00