[FFmpeg-user] Preserving color space for MOV container
Christian Johannesen
chrisjohannesen at gmail.com
Fri Jul 17 16:59:49 CEST 2015
On Fri, Jul 17, 2015 at 2:48 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Christian Johannesen <chrisjohannesen <at> gmail.com> writes:
>
> > I'm wondering if it is possible to preserve or set
> > the color_space, color_transfer & color_primaries
> > in a conversion to a MOV container format.
>
> You currently have to pass the following options:
> -color_primaries
> -color_trc
> -color_range
> Carl Eugen
>
Thanks for the direction on setting this, I can see that FFMPEG does
recognize the option, but I don't see the metadata getting set in the
output MOV when I scan it with ffprobe.
Updated command:
ffmpeg -guess_layout_max 0 -i D:\MEDIA\TELECINE_1080i5994_ProRes422LT.mov
-map 0:v -vf
pullup,dejudder,idet,yadif=deint=interlaced:mode=0,setsar=sar=1/1,setfield=prog
-r 24000/1001 -vcodec prores -profile:v 1 -colorspace 1 -color_primaries 1
-color_trc 1 -color_range 1 -map 0:a -acodec copy -channel_layout mono
-timecode 01:45:14:18 -metadata:s encoder="Apple ProRes 422 LT"
D:\MEDIA\TEST_1080p2398_ProRes422LT.mov
Console output:
ffmpeg version N-73613-gba05166 Copyright (c) 2000-2015 the FFmpeg
developers
built with gcc 4.9.2 (GCC)
configuration: --extra-ldflags=-L/usr/local/x86_64-w64-mingw32/lib
--prefix=/usr/local/x86_64-w64-mingw32 --cross-prefix=x86_64-w64-mingw32-
--target-os=mingw32 --enable-w32threads --enable-memalign
-hack --arch=x86_64 --enable-runtime-cpudetect --disable-debug
--enable-static --disable-shared --disable-ffplay --disable-ffserver
--enable-gpl --enable-version3 --enable-nonfree --enable-libfdk-aac
--enable-libx264
libavutil 54. 28.100 / 54. 28.100
libavcodec 56. 47.100 / 56. 47.100
libavformat 56. 40.100 / 56. 40.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 21.100 / 5. 21.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'D:\MEDIA\TELECINE_1080i5994_ProRes422LT.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2015-07-14 16:07:54
Duration: 00:00:10.80, start: 0.000000, bitrate: 106813 kb/s
Stream #0:0(eng): Video: prores (apcs / 0x73637061),
yuv422p10le(bt709), 1920x1080, 102049 kb/s, SAR 1:1 DAR 16:9, 29.97 fps,
29.97 tbr, 30k tbn, 30k tbc (default)
Metadata:
creation_time : 2015-07-14 16:07:54
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 (LT)
timecode : 01:45:14;18
Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono,
s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2015-07-14 16:07:54
handler_name : Apple Alias Data Handler
Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono,
s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2015-07-14 16:07:54
handler_name : Apple Alias Data Handler
Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono,
s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2015-07-14 16:07:54
handler_name : Apple Alias Data Handler
Stream #0:4(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono,
s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2015-07-14 16:07:54
handler_name : Apple Alias Data Handler
Stream #0:5(eng): Data: none (tmcd / 0x64636D74)
Metadata:
creation_time : 2015-07-14 16:07:54
handler_name : Apple Alias Data Handler
reel_name :
D:\output\ALS_LF_6913900_095_20101015054736_PRD_ProRes_422_HQ_2997_4ch_mono.mov
timecode : 01:45:14;18
File 'D:\MEDIA\TEST_1080p2398_ProRes422LT.mov' already exists. Overwrite ?
[y/N] y
[mov @ 0000000003bdda60] Codec for stream 1 does not use global headers but
container format requires global headers
[mov @ 0000000003bdda60] Codec for stream 2 does not use global headers but
container format requires global headers
[mov @ 0000000003bdda60] Codec for stream 3 does not use global headers but
container format requires global headers
[mov @ 0000000003bdda60] Codec for stream 4 does not use global headers but
container format requires global headers
Output #0, mov, to 'D:\MEDIA\TEST_1080p2398_ProRes422LT.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
timecode : 01:45:14:18
encoder : Lavf56.40.100
Stream #0:0(eng): Video: prores (apcs) (apcs / 0x73637061),
yuv422p10le(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s,
23.98 fps, 24k tbn, 23.98 tbc (default)
Metadata:
creation_time : 2015-07-14 16:07:54
handler_name : Apple Alias Data Handler
timecode : 01:45:14;18
encoder : Apple ProRes 422 LT
Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono
(24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2015-07-14 16:07:54
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 LT
Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono
(24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2015-07-14 16:07:54
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 LT
Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono
(24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2015-07-14 16:07:54
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 LT
Stream #0:4(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono
(24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2015-07-14 16:07:54
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 LT
Stream mapping:
Stream #0:0 -> #0:0 (prores (native) -> prores (native))
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Stream #0:3 -> #0:3 (copy)
Stream #0:4 -> #0:4 (copy)
Press [q] to stop, [?] for help
frame= 259 fps= 48 q=0.0 Lsize= 122026kB time=00:00:10.80
bitrate=92537.9kbits/s dup=1 drop=0
video:115938kB audio:6072kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.012704%
[Parsed_idet_2 @ 0000000003bf5c80] Repeated Fields: Neither: 258 Top:
0 Bottom: 0
[Parsed_idet_2 @ 0000000003bf5c80] Single frame detection: TFF: 0 BFF:
0 Progressive: 251 Undetermined: 7
[Parsed_idet_2 @ 0000000003bf5c80] Multi frame detection: TFF: 0 BFF:
0 Progressive: 258 Undetermined: 0\
FFprobe output video stream:
ffprobe version N-73613-gba05166 Copyright (c) 2007-2015 the FFmpeg
developers
built with gcc 4.9.2 (GCC)
configuration: --extra-ldflags=-L/usr/local/x86_64-w64-mingw32/lib
--prefix=/usr/local/x86_64-w64-mingw32 --cross-prefix=x86_64-w64-mingw32-
--target-os=mingw32 --enable-w32threads --enable-memalign
-hack --arch=x86_64 --enable-runtime-cpudetect --disable-debug
--enable-static --disable-shared --disable-ffplay --disable-ffserver
--enable-gpl --enable-version3 --enable-nonfree --enable-libfdk-aac
--enable-libx264
libavutil 54. 28.100 / 54. 28.100
libavcodec 56. 47.100 / 56. 47.100
libavformat 56. 40.100 / 56. 40.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 21.100 / 5. 21.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'D:\MEDIA\TEST_1080p2398_ProRes422LT.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf56.40.100
Duration: 00:00:10.80, start: 0.000000, bitrate: 92533 kb/s
Stream #0:0(eng): Video: prores (apcs / 0x73637061), yuv422p10le,
1920x1080, 87921 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc (default)
Metadata:
handler_name : DataHandler
encoder : Apple ProRes 422 LT
timecode : 01:45:14:18
Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1
channels, s32 (24 bit), 1152 kb/s (default)
Metadata:
handler_name : DataHandler
Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1
channels, s32 (24 bit), 1152 kb/s (default)
Metadata:
handler_name : DataHandler
Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1
channels, s32 (24 bit), 1152 kb/s (default)
Metadata:
handler_name : DataHandler
Stream #0:4(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1
channels, s32 (24 bit), 1152 kb/s (default)
Metadata:
handler_name : DataHandler
Stream #0:5(eng): Data: none (tmcd / 0x64636D74), 0 kb/s
Metadata:
handler_name : DataHandler
timecode : 01:45:14:18
Unsupported codec with id 0 for input stream 5
[STREAM]
index=0
codec_name=prores
codec_long_name=ProRes
profile=unknown
codec_type=video
codec_time_base=1/24000
codec_tag_string=apcs
codec_tag=0x73637061
width=1920
height=1080
coded_width=1920
coded_height=1080
has_b_frames=0
sample_aspect_ratio=0:1
display_aspect_ratio=0:1
pix_fmt=yuv422p10le
level=-99
color_range=N/A
color_space=unknown
color_transfer=unknown
color_primaries=unknown
chroma_location=unspecified
timecode=N/A
refs=1
id=N/A
r_frame_rate=24000/1001
avg_frame_rate=24000/1001
time_base=1/24000
start_pts=0
start_time=0.000000
duration_ts=259259
duration=10.802458
bit_rate=87921323
max_bit_rate=N/A
bits_per_raw_sample=10
nb_frames=259
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:language=eng
TAG:handler_name=DataHandler
TAG:encoder=Apple ProRes 422 LT
TAG:timecode=01:45:14:18
[/STREAM]
[STREAM]
index=1
codec_name=pcm_s24le
codec_long_name=PCM signed 24-bit little-endian
profile=unknown
codec_type=audio
codec_time_base=1/48000
codec_tag_string=in24
codec_tag=0x34326e69
sample_fmt=s32
sample_rate=48000
channels=1
channel_layout=unknown
bits_per_sample=24
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=518160
duration=10.795000
bit_rate=1152000
max_bit_rate=N/A
bits_per_raw_sample=24
nb_frames=518160
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:language=eng
TAG:handler_name=DataHandler
[/STREAM]
[STREAM]
index=2
codec_name=pcm_s24le
codec_long_name=PCM signed 24-bit little-endian
profile=unknown
codec_type=audio
codec_time_base=1/48000
codec_tag_string=in24
codec_tag=0x34326e69
sample_fmt=s32
sample_rate=48000
channels=1
channel_layout=unknown
bits_per_sample=24
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=518160
duration=10.795000
bit_rate=1152000
max_bit_rate=N/A
bits_per_raw_sample=24
nb_frames=518160
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:language=eng
TAG:handler_name=DataHandler
[/STREAM]
[STREAM]
index=3
codec_name=pcm_s24le
codec_long_name=PCM signed 24-bit little-endian
profile=unknown
codec_type=audio
codec_time_base=1/48000
codec_tag_string=in24
codec_tag=0x34326e69
sample_fmt=s32
sample_rate=48000
channels=1
channel_layout=unknown
bits_per_sample=24
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=518160
duration=10.795000
bit_rate=1152000
max_bit_rate=N/A
bits_per_raw_sample=24
nb_frames=518160
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:language=eng
TAG:handler_name=DataHandler
[/STREAM]
[STREAM]
index=4
codec_name=pcm_s24le
codec_long_name=PCM signed 24-bit little-endian
profile=unknown
codec_type=audio
codec_time_base=1/48000
codec_tag_string=in24
codec_tag=0x34326e69
sample_fmt=s32
sample_rate=48000
channels=1
channel_layout=unknown
bits_per_sample=24
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=518160
duration=10.795000
bit_rate=1152000
max_bit_rate=N/A
bits_per_raw_sample=24
nb_frames=518160
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:language=eng
TAG:handler_name=DataHandler
[/STREAM]
[STREAM]
index=5
codec_name=unknown
codec_long_name=unknown
profile=unknown
codec_type=data
codec_time_base=1/24
codec_tag_string=tmcd
codec_tag=0x64636d74
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/24000
start_pts=0
start_time=0.000000
duration_ts=259259
duration=10.802458
bit_rate=2
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=1
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:language=eng
TAG:handler_name=DataHandler
TAG:timecode=01:45:14:18
[/STREAM]
More information about the ffmpeg-user
mailing list