问题
Im running a script that makes proress 422 proxies for editing in ffmpeg, but the timecode on the files seems to get lost or nulled out.
the parameters im using:
ffmpeg -i file.mov -vcodec prores -profile:v 0 -an file.mov
is there any way of preserving the timecode from the raw files?
I've also come over ffmbc wich seems be more suited for this, but it's for linux only. Any way this can be compiled for osx?
I'm on osx 10.8.4
Thanks in advanced!
回答1:
from man page: http://ffmpeg.org/ffmpeg.html
‘-copyts’
Do not process input timestamps, but keep their values without trying to sanitize them. In particular, do not remove the initial start time offset value.
Note that, depending on the ‘vsync’ option or on specific muxer processing (e.g. in case the format option ‘avoid_negative_ts’ is enabled) the output timestamps may mismatch with the input timestamps even when this option is selected.
‘-copytb mode’
Specify how to set the encoder timebase when stream copying. mode is an integer numeric value, and can assume one of the following values:
‘1’
Use the demuxer timebase.
The time base is copied to the output encoder from the corresponding input demuxer. This is sometimes required to avoid non monotonically increasing timestamps when copying video streams with variable frame rate.
‘0’
Use the decoder timebase.
The time base is copied to the output encoder from the corresponding input decoder.
‘-1’
Try to make the choice automatically, in order to generate a sane output.
Default value is -1.
回答2:
Recent versions of ffmpeg do preserve the timecode by default. I just tested it:
ffmpeg -i A152C001_131008UZ.MXF -an -vcodec prores -profile:v 0 testtc.mov
ffmpeg version 2.0.1-tessus Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 10 2013 21:25:56 with llvm-gcc 4.2.1 (LLVM build 2336.1.00)
configuration: --prefix=/Users/tessus/data/ext/ffmpeg/sw --as=yasm --extra-version=tessus --disable-shared --enable-static --disable-ffplay --enable-gpl --enable-pthreads --enable-postproc --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libspeex --enable-bzlib --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-version3 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvpx --enable-libgsm --enable-libopus --enable-fontconfig --enable-libfreetype --enable-libass --enable-libbluray --enable-filters --enable-runtime-cpudetect
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
...
Input #0, mxf, from 'A152C001_131008UZ.MXF':
Metadata:
...
timecode : 18:56:52:22
...
Output #0, mov, to 'testtc.mov':
Metadata:
...
timecode : 18:56:52:22
...
And the resulting Quicktime does have the correct timecode (as shown by QT7).
I got my Mac OS X binary of ffmpeg from http://www.evermeet.cx/ffmpeg/
And ffmbc
is available for Mac OS X through homebrew (brew install ffmbc
). However, it does not preserve the timecode by default. You need to specify it with the -timecode hh:mm:ss:ff
option.
If you do install homebrew, you can also use it to install ffmpeg.
来源:https://stackoverflow.com/questions/18253340/keep-timecode-in-ffmpeg