[FFmpeg-user] AVI interlaced support
Kieran O'Leary
kieran.oleary at irishfilm.ie
Fri Oct 6 19:57:20 EEST 2017
Hi,
I can't get ffmpeg to produce an interlaced file using setfield or field_order. I don't know too much about the format, but it looks like the OpenDML spec mentions that there is a flag that sets the number of fields per frame. IIs there any way to set interlaced metadata within AVI?
Using mediainfo/mediatrace, I can see that a file created via ffmpeg has a value of 1 for this flag:
0111C FieldPerFrame: 1 (0x00000001)
Here is my ffmpeg output followed by mediainfo/mediatrace.
ffmpeg -f lavfi -i testsrc -vframes 1 -c:v v210 -vf setfield=tff -field_order tt avi.avi
ffmpeg version 3.3.4 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3.4 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libtesseract --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3 --enable-vda
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
Input #0, lavfi, from 'testsrc':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
File 'avi.avi' already exists. Overwrite ? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> v210 (native))
Press [q] to stop, [?] for help
Output #0, avi, to 'avi.avi':
Metadata:
ISFT : Lavf57.71.100
Stream #0:0: Video: v210 (v210 / 0x30313276), yuv422p(top first), 320x240 [SAR 1:1 DAR 4:3], q=2-31, 40960 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc57.89.100 v210
frame= 1 fps=0.0 q=-0.0 Lsize= 216kB time=00:00:00.04 bitrate=44165.2kbits/s speed=26.6x
video:210kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.690662%
ifi-mac-pro:~ admin$ mediainfo avi.avi
General
Complete name : avi.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 216 KiB
Duration : 40 ms
Overall bit rate : 44.2 Mb/s
Writing application : Lavf57.71.100
Video
ID : 0
Format : YUV
Codec ID : v210
Codec ID/Hint : AJA Video Systems Xena
Duration : 40 ms
Bit rate : 43.0 Mb/s
Width : 320 pixels
Height : 240 pixels
Display aspect ratio : 4:3
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Scan type : Progressive
Compression mode : Lossless
Bits/(Pixel*Frame) : 22.400
Stream size : 210 KiB (97%)
ifi-mac-pro:~ admin$ mediainfi --Details=1
-bash: mediainfi: command not found
ifi-mac-pro:~ admin$ mediainfo --Details=1 avi.avi
00000 AVI (12 bytes)
00000 Header (12 bytes)
00000 Name: RIFF
00004 Size: 220818 (0x00035E92)
00008 Real Name: AVI
0000C -------------------------
0000C --- AVI, accepted ---
0000C -------------------------
0000C -------------------------
0000C --- AVI, accepted ---
0000C -------------------------
0000C AVI Header (4672 bytes)
0000C Header (12 bytes)
0000C Name: LIST
00010 Size: 4664 (0x00001238)
00014 Real Name: hdrl
00018 File header (64 bytes)
00018 Header (8 bytes)
00018 Name: avih
0001C Size: 56 (0x00000038)
00020 MicrosecPerFrame: 40000 (0x00009C40)
00024 MaxBytesPerSec: 5120000 (0x004E2000)
00028 PaddingGranularity: 0 (0x00000000)
0002C Flags: 2320 (0x00000910)
00030 HasIndex: 16 (0x0000000000000010)
00030 MustUseIndex: 0 (0x0000000000000000)
00030 IsInterleaved: 256 (0x0000000000000100)
00030 UseCKTypeToFindKeyFrames: 0 (0x0000000000000000)
00030 TrustCKType: 2048 (0x0000000000000800)
00030 WasCaptureFile: 0 (0x0000000000000000)
00030 Copyrighted: 0 (0x0000000000000000)
00030 TotalFrames: 1 (0x00000001)
00034 InitialFrames: 0 (0x00000000)
00038 StreamsCount: 1 (0x00000001)
0003C SuggestedBufferSize: 1048576 (0x00100000)
00040 Width: 320 (0x00000140)
00044 Height: 240 (0x000000F0)
00048 Reserved: 0 (0x00000000)
0004C Reserved: 0 (0x00000000)
00050 Reserved: 0 (0x00000000)
00054 Reserved: 0 (0x00000000)
00058 Stream info - 0 (0x0) (4328 bytes)
00058 Header (12 bytes)
00058 Name: LIST
0005C Size: 4320 (0x000010E0)
00060 Real Name: strl
00064 Stream header (64 bytes)
00064 Header (8 bytes)
00064 Name: strh
00068 Size: 56 (0x00000038)
0006C fccType: vids
00070 fccHandler: v210
00074 Flags: 0 (0x00000000)
00078 Priority: 0 (0x0000)
0007A Language: 0 (0x0000)
0007C InitialFrames: 0 (0x00000000)
00080 Scale: 1 (0x00000001)
00084 Rate: 25 (0x00000019)
00088 Start: 0 (0x00000000)
0008C Length: 1 (0x00000001)
00090 SuggestedBufferSize: 215040 (0x00034800)
00094 Quality: 4294967295 (0xFFFFFFFF)
00098 SampleSize: 0 (0x00000000)
0009C Frame_Left: 0 (0x0000)
0009E Frame_Top: 0 (0x0000)
000A0 Frame_Right: 320 (0x0140)
000A2 Frame_Bottom: 240 (0x00F0)
000A4 Stream format - Video (48 bytes)
000A4 Header (8 bytes)
000A4 Name: strf
000A8 Size: 40 (0x00000028)
000AC Size: 40 (0x00000028)
000B0 Width: 320 (0x00000140)
000B4 Height: 240 (0x000000F0)
000B8 Planes: 1 (0x0001)
000BA BitCount: 20 (0x0014)
000BC Compression: v210
000C0 SizeImage: 192000 (0x0002EE00)
000C4 XPelsPerMeter: 0 (0x00000000)
000C8 YPelsPerMeter: 0 (0x00000000)
000CC ClrUsed: 0 (0x00000000)
000D0 ClrImportant: 0 (0x00000000)
000D4 Garbage (4128 bytes)
000D4 Header (8 bytes)
000D4 Name: JUNK
000D8 Size: 4120 (0x00001018)
010F4 Video properties (76 bytes)
010F4 Header (8 bytes)
010F4 Name: vprp
010F8 Size: 68 (0x00000044)
010FC VideoFormatToken: 0 (0x00000000)
01100 VideoStandard: 0 (0x00000000)
01104 VerticalRefreshRate: 25 (0x00000019)
01108 HTotalInT: 320 (0x00000140)
0110C VTotalInLines: 240 (0x000000F0)
01110 FrameAspectRatio Height: 3 (0x0003)
01112 FrameAspectRatio Width: 4 (0x0004)
01114 FrameWidthInPixels: 320 (0x00000140)
01118 FrameHeightInLines: 240 (0x000000F0)
0111C FieldPerFrame: 1 (0x00000001)
01120 Field (32 bytes)
01120 CompressedBMHeight: 240 (0x000000F0)
01124 CompressedBMWidth: 320 (0x00000140)
01128 ValidBMHeight: 240 (0x000000F0)
0112C ValidBMWidth: 320 (0x00000140)
01130 ValidBMXOffset: 0 (0x00000000)
01134 ValidBMYOffset: 0 (0x00000000)
01138 VideoXOffsetInT: 0 (0x00000000)
0113C VideoYValidStartLine: 0 (0x00000000)
01140 Garbage (268 bytes)
01140 Header (8 bytes)
01140 Name: JUNK
01144 Size: 260 (0x00000104)
0124C Tags (34 bytes)
0124C Header (12 bytes)
0124C Name: LIST
01250 Size: 26 (0x0000001A)
01254 Real Name: INFO
01258 Encoded_Application - Lavf57.71.100 (22 bytes)
01258 Header (8 bytes)
01258 Name: ISFT
0125C Size: 14 (0x0000000E)
01260 Value: Lavf57.71.100
0126E Garbage (1024 bytes)
0126E Header (8 bytes)
0126E Name: JUNK
01272 Size: 1016 (0x000003F8)
01276 Data: (1016 bytes)
0166E Datas (215060 bytes)
0166E Header (12 bytes)
0166E Name: LIST
01672 Size: 215052 (0x0003480C)
01676 Real Name: movi
0167A Data: (215048 bytes)
35E82 Index (old) (24 bytes)
35E82 Header (8 bytes)
35E82 Name: idx1
35E86 Size: 16 (0x00000010)
35E9A Restarting parsing... (18446744073709336552 bytes)
35E9A Restarting parsing... (18446744073709336552 bytes)
0167A 00dc (8 bytes)
0167A Header (8 bytes)
0167A Name: 00dc
0167E Size: 215040 (0x00034800)
01682 -----------------------------------------
01682 --- movi, Jumping to end of chunk ---
01682 -----------------------------------------
01682 ------------------------
01682 --- AVI, filling ---
01682 ------------------------
01682 -------------------------
01682 --- AVI, finished ---
01682 -------------------------
------
This email has been scanned for spam and malware by The Email Laundry.
More information about the ffmpeg-user
mailing list