[FFmpeg-user] AVI and Timecode

Dietmar Thal info at dequid.net
Fri Dec 12 15:32:59 CET 2014


Hello all,

i played around recently a lot with finding the best proxy format for 
editing with Adobe Premiere Pro (CC).

My hardware/OS specs:

* Windows 7 Pro 64bit
* ffmpeg version N-66639-g6b347f5

I tried a lot of different formats, including:

1. ProRes MOV's
2. MJPEG MOV's
3. I-frame only MPEG2

There are several problems with these: Premiere skips randomly loading 
1.'s when importing many of them, crashes from time to time with 2.
and 3. worked best but from time to time i get playback errors and 
skipped frames.

So i really want to go with MJPEG in an AVI container. I like MJPEG for 
the speed/size/quality. And Premiere likes AVI.

The only problem: I don't get ffmpeg to write a correct timecode inside 
the avi's.

So, here i have 3 files:

a) N_EFST_X102_000.mov: the original source file, ProRes 422
b) N_EFST_X102_000_adobe.avi: Uncompressed avi (resized to 640x360 for 
size reasons) encoded from Adobe After Effects
c) N_EFST_X102_000_ffmpeg.avi: MJPEG AVI, encoded with ffmpeg with the 
following command:

(The timecode given is just for testing purposes, i would read it later 
via ffprobe)

ffmpeg -report -y -i N_EFST_X102_000.mov -timecode 15:59:59:20 -metadata 
timecode="15:59:59:20" -c:v mjpeg -qscale:v 6 -c:a mp3 
N_EFST_X102_000_ffmpeg.avi

When i import file b) in Premiere, it has the original timecode from the 
source file a) even though there appears no timecode in ffprobe's output 
of b)
When i import file c) in Premiere, timecode is always 00:00:00:00, even 
though there IS a timecode in the metadata

So here is my question(s):

How can i write correct timecode inside an AVI container, so that 
Premiere supports it?
Is this even possible? I've read something that AVI doesn't support TC...
How does Adobe manage to do it (see file b))?

Here is the ffprobe output of the 3 files mentioned:

Thanks, Dietmar

--------------------------------------------------------------------------------------------------------------------------------------

ffprobe -report N_EFST_X102_000.mov
ffprobe version N-66639-g6b347f5 Copyright (c) 2007-2014 the FFmpeg 
developers
   built on Oct  5 2014 22:10:17 with gcc 4.9.1 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads 
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r 
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray 
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme 
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame 
--enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-libopenjpeg --enable-libopus --enable-librtmp 
--enable-libschroedinger --enable-libsoxr --enable-libspeex 
--enable-libtheora --enable-libtwolame --enable-libvidstab 
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis 
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 
--enable-libx265 --enable-libxavs --enable-libxvid --enable-zlib
   libavutil      54.  9.100 / 54.  9.100
   libavcodec     56.  2.101 / 56.  2.101
   libavformat    56.  7.104 / 56.  7.104
   libavdevice    56.  1.100 / 56.  1.100
   libavfilter     5.  1.102 /  5.  1.102
   libswscale      3.  1.100 /  3.  1.100
   libswresample   1.  1.100 /  1.  1.100
   libpostproc    53.  1.100 / 53.  1.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002b557a0] Format 
mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002b557a0] ISO: File Type Major Brand: 
qt
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002b557a0] Before 
avformat_find_stream_info() pos: 139916477 bytes read:197115 seeks:7
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002b557a0] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002b557a0] After 
avformat_find_stream_info() pos: 3031040 bytes read:1188327 seeks:9 frames:3
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'N_EFST_X102_000.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 537331968
     compatible_brands: qt  CDes
     creation_time   : 2008-06-06 20:25:39
     timecode        : 15:31:59:07
   Duration: 00:00:05.68, start: 0.000000, bitrate: 197065 kb/s
     Stream #0:0(eng), 1, 1/25: Video: prores (apch / 0x68637061), 
yuv422p10le, 1920x1080, 185648 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 
25 tbn, 25 tbc (default)
     Metadata:
       creation_time   : 2008-06-06 20:25:39
       encoder         : Apple ProRes 422 (HQ)
     Stream #0:1(eng), 1, 1/48000: Audio: pcm_s32be (lpcm / 0x6D63706C), 
48000 Hz, 2 channels, s32, 3072 kb/s (default)
     Metadata:
       creation_time   : 2008-06-06 20:25:39
     Stream #0:2(eng), 1, 1/25: Data: none (tmcd / 0x64636D74), 0 kb/s 
(default)
     Metadata:
       creation_time   : 2008-06-06 20:25:39
       reel_name       : Odyssey
       timecode        : 15:31:59:07
detected 12 logical cores
Unsupported codec with id 0 for input stream 2
[AVIOContext @ 0000000002b5de60] Statistics: 1188327 bytes read, 9 seeks

--------------------------------------------------------------------------------------------------------------------------------------

ffprobe -report N_EFST_X102_000_adobe.avi
ffprobe version N-66639-g6b347f5 Copyright (c) 2007-2014 the FFmpeg 
developers
   built on Oct  5 2014 22:10:17 with gcc 4.9.1 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads 
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r 
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray 
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme 
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame 
--enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-libopenjpeg --enable-libopus --enable-librtmp 
--enable-libschroedinger --enable-libsoxr --enable-libspeex 
--enable-libtheora --enable-libtwolame --enable-libvidstab 
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis 
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 
--enable-libx265 --enable-libxavs --enable-libxvid --enable-zlib
   libavutil      54.  9.100 / 54.  9.100
   libavcodec     56.  2.101 / 56.  2.101
   libavformat    56.  7.104 / 56.  7.104
   libavdevice    56.  1.100 / 56.  1.100
   libavfilter     5.  1.102 /  5.  1.102
   libswscale      3.  1.100 /  3.  1.100
   libswresample   1.  1.100 /  1.  1.100
   libpostproc    53.  1.100 / 53.  1.100
[avi @ 0000000002b55fe0] Format avi probed with size=2048 and score=100
[avi @ 0000000002b4a460] use odml:1
st:1 removing common factor 4 from timebase
[avi @ 0000000002b55fe0] Before avformat_find_stream_info() pos: 11900 
bytes read:168584 seeks:6
[avi @ 0000000002b55fe0] parser not found for codec rawvideo, packets or 
times may be invalid.
[avi @ 0000000002b55fe0] parser not found for codec pcm_s16le, packets 
or times may be invalid.
[avi @ 0000000002b55fe0] parser not found for codec pcm_s16le, packets 
or times may be invalid.
[avi @ 0000000002b55fe0] parser not found for codec rawvideo, packets or 
times may be invalid.
[avi @ 0000000002b55fe0] All info found
[avi @ 0000000002b55fe0] After avformat_find_stream_info() pos: 895116 
bytes read:1030932 seeks:6 frames:48
Input #0, avi, from 'N_EFST_X102_000_adobe.avi':
   Metadata:
     date            : 2014-12-12T14:01:15.00581
     encoder         : Adobe After Effects CC 2014 (Windows)
   Duration: 00:00:05.68, start: 0.000000, bitrate: 139797 kb/s
     Stream #0:0, 1, 1/25: Video: rawvideo, bgr24, 640x360, 139220 kb/s, 
25 fps, 25 tbr, 25 tbn, 25 tbc
     Stream #0:1, 47, 1/48000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 
48000 H

--------------------------------------------------------------------------------------------------------------------------------------

ffprobe -report N_EFST_X102_000_ffmpeg.avi
ffprobe version N-66639-g6b347f5 Copyright (c) 2007-2014 the FFmpeg 
developers
   built on Oct  5 2014 22:10:17 with gcc 4.9.1 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads 
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r 
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray 
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme 
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame 
--enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-libopenjpeg --enable-libopus --enable-librtmp 
--enable-libschroedinger --enable-libsoxr --enable-libspeex 
--enable-libtheora --enable-libtwolame --enable-libvidstab 
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis 
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 
--enable-libx265 --enable-libxavs --enable-libxvid --enable-zlib
   libavutil      54.  9.100 / 54.  9.100
   libavcodec     56.  2.101 / 56.  2.101
   libavformat    56.  7.104 / 56.  7.104
   libavdevice    56.  1.100 / 56.  1.100
   libavfilter     5.  1.102 /  5.  1.102
   libswscale      3.  1.100 /  3.  1.100
   libswresample   1.  1.100 /  1.  1.100
   libpostproc    53.  1.100 / 53.  1.100
[avi @ 0000000002b55fe0] Format avi probed with size=2048 and score=100
[avi @ 0000000002b4a460] use odml:1
[avi @ 0000000002b55fe0] Before avformat_find_stream_info() pos: 10008 
bytes read:110504 seeks:4
[mjpeg @ 0000000002b670a0] marker=d8 avail_size_in_buf=74461
[mjpeg @ 0000000002b670a0] marker parser used 0 bytes (0 bits)
[mjpeg @ 0000000002b670a0] marker=e0 avail_size_in_buf=74459
[mjpeg @ 0000000002b670a0] marker parser used 16 bytes (128 bits)
[mjpeg @ 0000000002b670a0] marker=fe avail_size_in_buf=74441
[mjpeg @ 0000000002b670a0] marker parser used 15 bytes (120 bits)
[mjpeg @ 0000000002b670a0] marker=db avail_size_in_buf=74424
[mjpeg @ 0000000002b670a0] index=0
[mjpeg @ 0000000002b670a0] qscale[0]: 8
[mjpeg @ 0000000002b670a0] marker parser used 67 bytes (536 bits)
[mjpeg @ 0000000002b670a0] marker=c4 avail_size_in_buf=74355
[mjpeg @ 0000000002b670a0] class=0 index=0 nb_codes=12
[mjpeg @ 0000000002b670a0] class=0 index=1 nb_codes=12
[mjpeg @ 0000000002b670a0] class=1 index=0 nb_codes=251
[mjpeg @ 0000000002b670a0] class=1 index=1 nb_codes=251
[mjpeg @ 0000000002b670a0] marker parser used 418 bytes (3344 bits)
[mjpeg @ 0000000002b670a0] marker=c0 avail_size_in_buf=73935
[mjpeg @ 0000000002b670a0] sof0: picture: 1920x1080
[mjpeg @ 0000000002b670a0] component 0 2:2 id: 0 quant:0
[mjpeg @ 0000000002b670a0] component 1 1:2 id: 1 quant:0
[mjpeg @ 0000000002b670a0] component 2 1:2 id: 2 quant:0
[mjpeg @ 0000000002b670a0] pix fmt id 22121200
[mjpeg @ 0000000002b670a0] marker parser used 17 bytes (136 bits)
[mjpeg @ 0000000002b670a0] escaping removed 23 bytes
[mjpeg @ 0000000002b670a0] marker=da avail_size_in_buf=73916
[mjpeg @ 0000000002b670a0] component: 0
[mjpeg @ 0000000002b670a0] component: 1
[mjpeg @ 0000000002b670a0] component: 2
[mjpeg @ 0000000002b670a0] marker parser used 73892 bytes (591129 bits)
[mjpeg @ 0000000002b670a0] marker=d9 avail_size_in_buf=0
[mjpeg @ 0000000002b670a0] decode frame unused 0 bytes
[avi @ 0000000002b55fe0] All info found
[avi @ 0000000002b55fe0] After avformat_find_stream_info() pos: 84871 
bytes read:152599 seeks:4 frames:2
Input #0, avi, from 'N_EFST_X102_000_ffmpeg.avi':
   Metadata:
     encoder         : Lavf56.7.104
     timecode        : 15:59:59:20
   Duration: 00:00:05.72, start: 0.000000, bitrate: 15472 kb/s
     Stream #0:0, 1, 1/25: Video: mjpeg (MJPG / 0x47504A4D), 
yuvj422p(pc, bt470bg), 1920x1080 [SAR 1:1 DAR 16:9], 15425 kb/s, 25 fps, 
25 tbr, 25 tbn, 25 tbc
     Stream #0:1, 1, 3/125: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, 
stereo, s16p, 128 kb/s
[AVIOContext @ 0000000002b5e740] Statistics: 152599 bytes read, 4 seeks


More information about the ffmpeg-user mailing list