The tool nowadays supports more than one track per file,
this makes reading the code slightly less confusing.
Signed-off-by: Martin Storsjö <martin@martin.st>
The escape API will be useful to perform escaping programmatically, which
is required when crafting argument strings, and will be used for context
printing as well.
This is based on the ffescape tool code, with a few extensions and fixes.
qt-faststart is terribly slow when the input file and the output file
are on a slow disk like a SD card. By increasing the copy_buffer from
1K to 32M I decreased the processing time on a sample file from
1600 seconds to 4 seconds. The timing difference is during 'copying
rest of file'.
S:\SD_VIDEO\PRG001>e:\utils\qt-faststart 00005.mp4 5.mp4
ftyp 0 32
free 32 8
mdat 40 13744391
moov 13744431 141848
patching stco atom...
patching stco atom...
writing ftyp atom...
writing moov atom...
copying rest of file...
Execution time: 1576.259 s
S:\SD_VIDEO\PRG001>s:\utils\qt-faststart 00005.mp4 5.mp4
ftyp 0 32
free 32 8
mdat 40 13744391
moov 13744431 141848
patching stco atom...
patching stco atom...
writing ftyp atom...
writing moov atom...
copying rest of file...
Execution time: 3.846 s
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
It is all dead and rotting code.
Also, move yuvcmp.c to tools. Its license is non-existent, however,
and should be clarified.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
The missing headers are required for errno and for strerror.
This fixes building of this tool on mingw32ce.
Signed-off-by: Martin Storsjö <martin@martin.st>
PATH_MAX is not necessarily available on all systems, e.g. it's
normally not available on MSVC, and is not guaranteed to defined
on a POSIX system either.
Signed-off-by: Martin Storsjö <martin@martin.st>
This takes care of null-terminating the buffer if it is too small,
which wasn't handled properly before.
Signed-off-by: Martin Storsjö <martin@martin.st>
Also change the snprintf size to use the full buffer, since
snprintf always null-terminates the buffer.
Signed-off-by: Martin Storsjö <martin@martin.st>
The Windows SDK in MSVC doesn't have mkdir, only _mkdir, and
MSDN says one should include direct.h to use it.
Signed-off-by: Martin Storsjö <martin@martin.st>