Hello! First of all, I want to say thank you so much to all you fine folks for making such a wonderful program!
I know that Voukoder is build on Libav and not actually built on ffmpeg. However, I'm only familiar with ffmpeg, so I'll need to use ffmpeg commands as examples to demonstrate the problem.
MOV files handle color space tags and other metadata in a strange way. When one uses the setparams filter or similar, color tags are not actually written to the output file. Instead, MOV needs the write_colr flag (which ffmpeg considers to be experimental) and the prores_metadata bitstream filter. I believe that both of these need to be used to properly write color space tags to ProRes MOV files.
Currently, I set Resolve Studio to VoukoderPro YUV444(16 bit) with Interlaced Rendering turned on and set to bottom field first. I have a scene in VoukoderPro set for:
Video Input >
> Video Filter Field Order (Bottom Field First) >
> Video Filter Set Params (Mark as bottom field first, mpeg, smpte170m, smpte170m, smpte170m) >
> ProRes_KS (yuv422pp10le, 8, Hq, apl0, 8000, Auto, 0) >
> Muxer MOV (default values) >
> Output to File
Audio Input >
> Audio Encoder S24LE (s32) >
> Same MOV muxer and output file as video
The resulting file gives the following output from ffprobe:
[STREAM]
index=0
codec_name=pcm_s24le
codec_long_name=PCM signed 24-bit little-endian
profile=unknown
codec_type=audio
codec_tag_string=in24
codec_tag=0x34326e69
sample_fmt=s32
sample_rate=48000
channels=2
channel_layout=stereo
bits_per_sample=24
initial_padding=0
id=0x1
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=1441440
duration=30.030000
bit_rate=2304000
max_bit_rate=N/A
bits_per_raw_sample=24
nb_frames=1441440
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
DISPOSITION:timed_thumbnails=0
DISPOSITION:non_diegetic=0
DISPOSITION:captions=0
DISPOSITION:descriptions=0
DISPOSITION:metadata=0
DISPOSITION:dependent=0
DISPOSITION:still_image=0
TAG:handler_name=SoundHandler
TAG:vendor_id=[0][0][0][0]
[/STREAM]
[STREAM]
index=1
codec_name=prores
codec_long_name=Apple ProRes (iCodec Pro)
profile=HQ
codec_type=video
codec_tag_string=apch
codec_tag=0x68637061
width=720
height=486
coded_width=720
coded_height=486
closed_captions=0
film_grain=0
has_b_frames=0
sample_aspect_ratio=9:10
display_aspect_ratio=4:3
pix_fmt=yuv422p10le
level=-99
color_range=unknown
color_space=unknown
color_transfer=unknown
color_primaries=unknown
chroma_location=unspecified
field_order=progressive
refs=1
id=0x2
r_frame_rate=30000/1001
avg_frame_rate=30000/1001
time_base=1/30000
start_pts=0
start_time=0.000000
duration_ts=900900
duration=30.030000
bit_rate=110209104
max_bit_rate=N/A
bits_per_raw_sample=10
nb_frames=900
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
DISPOSITION:timed_thumbnails=0
DISPOSITION:non_diegetic=0
DISPOSITION:captions=0
DISPOSITION:descriptions=0
DISPOSITION:metadata=0
DISPOSITION:dependent=0
DISPOSITION:still_image=0
TAG:handler_name=VideoHandler
TAG:vendor_id=FFMP
[/STREAM]
Alles anzeigen
There are several problems here. All color tags are listed as unknown, despite Set Params being used. The file is also falsely tagged as progressive and not interlaced (but the footage is indeed properly interlaced. Only the tag is wrong.). Lastly, vendor is being reported as "FFMP" and not the specified vendor "apl0".
When I take that file and run it through the following ffmpeg command, many of the problems are solved:
ffmpeg -i in.mov -c copy -vendor apl0 -bsf:v prores_metadata=color_primaries=smpte170m:color_trc=bt709:colorspace=smpte170m -colorspace smpte170m -color_primaries smpte170m -color_trc bt709 -color_range tv -field_order bt -movflags +write_colr -strict experimental out.mov
The resulting ffprobe data from this is:
[STREAM]
index=0
codec_name=prores
codec_long_name=Apple ProRes (iCodec Pro)
profile=HQ
codec_type=video
codec_tag_string=apch
codec_tag=0x68637061
width=720
height=486
coded_width=720
coded_height=486
closed_captions=0
film_grain=0
has_b_frames=0
sample_aspect_ratio=9:10
display_aspect_ratio=4:3
pix_fmt=yuv422p10le
level=-99
color_range=unknown
color_space=smpte170m
color_transfer=bt709
color_primaries=smpte170m
chroma_location=unspecified
field_order=bt
refs=1
id=0x1
r_frame_rate=30000/1001
avg_frame_rate=30000/1001
time_base=1/30000
start_pts=0
start_time=0.000000
duration_ts=900900
duration=30.030000
bit_rate=110209104
max_bit_rate=N/A
bits_per_raw_sample=10
nb_frames=900
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
DISPOSITION:timed_thumbnails=0
DISPOSITION:non_diegetic=0
DISPOSITION:captions=0
DISPOSITION:descriptions=0
DISPOSITION:metadata=0
DISPOSITION:dependent=0
DISPOSITION:still_image=0
TAG:handler_name=VideoHandler
TAG:vendor_id=FFMP
[/STREAM]
[STREAM]
index=1
codec_name=pcm_s24le
codec_long_name=PCM signed 24-bit little-endian
profile=unknown
codec_type=audio
codec_tag_string=in24
codec_tag=0x34326e69
sample_fmt=s32
sample_rate=48000
channels=2
channel_layout=stereo
bits_per_sample=24
initial_padding=0
id=0x2
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=1441440
duration=30.030000
bit_rate=2304000
max_bit_rate=N/A
bits_per_raw_sample=24
nb_frames=1441440
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
DISPOSITION:timed_thumbnails=0
DISPOSITION:non_diegetic=0
DISPOSITION:captions=0
DISPOSITION:descriptions=0
DISPOSITION:metadata=0
DISPOSITION:dependent=0
DISPOSITION:still_image=0
TAG:handler_name=SoundHandler
TAG:vendor_id=[0][0][0][0]
[/STREAM]
Alles anzeigen
This fixes the color tags except color_range. I'm not sure how to get it to properly set color range. I found this documentation on color tags and color range, and it outlines two color schemes for full range and video range, but it doesn't seem to say how they are tagged in the file. Maybe I'm missing something? https://developer.apple.com/documentation/…_parameter_atom
Additionally, the field_order tag is corrected, but the vendor tag remains incorrect.
Lastly, interestingly ffmpeg switches the order of the streams around. I normally keep video as stream 0 and audio as stream 1, but I'm not sure if this actually ever matters in practice. I just thought it was interesting to note.
Would it be possible for Voukoder to do the following:
1) Have the option to write the colr atom to MOV files
2) Have the option to apply the prores_metadata bit stream filter to prores_ks (and maybe to the other ProRes encoders?)
3) Fix the vendor tag to properly reflect what is defined in the prores_ks encoder (apl0 in my case)
4) Fix the field_order tag to get the proper value from Set Params or the Field Order filter.
Thank you all so much! Please let me know if you have any questions or need further clarification on anything! I'm happy to help however I can.