I'm trying to convert the video to mp4, but it seems that ffmpeg is not able to infer colorspace value (could be something else too), which seems to be "unknown". I've attached the file containing frame details. I'm not an expert, but I've tried explicitly setting the color values (color_space, color_primaries, color_transfer), but still faced the same issue. Faced similar issue with some other videos too. I'll be grateful if someone can help me with this
Code:
ffmpeg version 7.0.1Code:ffmpeg -y -i https://d3rka4syouiwkp.cloudfront.net/extra/testVideo.mov -crf 23 -vcodec h264 -acodec aac -ar 44100 -b:a 192k -pix_fmt yuv420p -strict -2 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2:color=white@0.0" -movflags +faststart output.mp4
Platform
mac
Output:
Code:ffmpeg version 7.0.1 Copyright (c) 2000-2024 the FFmpeg developers built with Apple clang version 15.0.0 (clang-1500.3.9.4) configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.0.1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon libavutil 59. 8.100 / 59. 8.100 libavcodec 61. 3.100 / 61. 3.100 libavformat 61. 1.100 / 61. 1.100 libavdevice 61. 1.100 / 61. 1.100 libavfilter 10. 1.100 / 10. 1.100 libswscale 8. 1.100 / 8. 1.100 libswresample 5. 1.100 / 5. 1.100 libpostproc 58. 1.100 / 58. 1.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://d3rka4syouiwkp.cloudfront.net/extra/testVideo.mov': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2024-06-08T05:18:31.000000Z encoder : Lavf61.1.100 Duration: 00:00:01.01, start: 0.000000, bitrate: 950910 kb/s Stream #0:0[0x1](und): Video: prores (HQ) (apch / 0x68637061), yuv422p10le(progressive), 3840x2160, 926658 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 30k tbn (default) Metadata: creation_time : 2024-06-08T05:18:31.000000Z handler_name : Core Media Video vendor_id : FFMP timecode : 00:00:00:00 Stream #0:1[0x2](eng): Data: none (tmcd / 0x64636D74), 0 kb/s Metadata: creation_time : 2024-06-08T05:18:31.000000Z handler_name : Core Media Time Code timecode : 00:00:00:00 [out#0/mp4 @ 0x600001e58180] Codec AVOption b (set bitrate (in bits/s)) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> h264 (libx264)) Press [q] to stop, [?] for help [graph 0 input from stream 0:0 @ 0x600001c40000] Value 234.000000 for parameter 'colorspace' out of range [0 - 14] [graph 0 input from stream 0:0 @ 0x600001c40000] Error setting option colorspace to value 234. [graph 0 input from stream 0:0 @ 0x600001c40000] Error applying generic filter options. [vf#0:0 @ 0x60000195c000] Error reinitializing filters! [vf#0:0 @ 0x60000195c000] Task finished with error code: -34 (Result too large) [vf#0:0 @ 0x60000195c000] Terminating thread with return code -34 (Result too large) [vost#0:0/libx264 @ 0x123e065a0] Could not open encoder before EOF [vost#0:0/libx264 @ 0x123e065a0] Task finished with error code: -22 (Invalid argument) [vost#0:0/libx264 @ 0x123e065a0] Terminating thread with return code -22 (Invalid argument) [out#0/mp4 @ 0x600001e58180] Nothing was written into output file, because at least one of its streams received no packets. frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A Conversion failed!
+ Reply to Thread
Results 1 to 30 of 41
-
-
Some changes in ffmpeg recently broke a bunch of things . Non standard colorimetery flags (or absence of) cause massive problems currently
A workaround is to use a prores bitstream filter , or older ffmpeg version until it gets fixed. Developers are aware, several related bug reports have been filed
Note that the documentation is wrong; the switches are color_primaries, color_trc, colorspace ; not transfer_characteristics, matrix_coefficientsCode:ffmpeg -bsf:v prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709 -i testVideo.mov ...
https://www.ffmpeg.org/ffmpeg-bitstream-filters.html#prores_005fmetadata -
ffmpeg not working with Windows 10 Home installation problem
[Attachment 90564 - Click to enlarge] -
You can use clever FFmpeg-GUI to change the colorspace lossless, without reencoding.
Load your mov, click lossless changes, check change colorspace.
Make your settings and click change.
Done.
[Attachment 90566 - Click to enlarge] -
I'm already familiar with this program because I was extracting audio from my movie and combining it using Video to Video, but the audio wouldn't sync. At the beginning of the movie, the audio was synchronized fine, but after 20 minutes, the video was faster and the audio slower.
But the clever FFmpeg-GUI works with my FFmpeg – it opens in the FFmpeg-bin directory.
[Attachment 90568 - Click to enlarge] -
But after unpacking clever FFmpeg-GUI and running it asks me for the bin folder
[Attachment 90571 - Click to enlarge] -
242
So, I extract the audio from the movie and change the fps from 25 to 23.976, and it gives me an extended time for the second movie.
1. time: 01:21:46
2. time: at 1:21:12
This last time isn't at the end of 46, but 12. I don't know if this has any effect on synchronization.
[Attachment 90582 - Click to enlarge] -
How do I change from 30 FPS to 24 FPS? As shown in the image.
[Attachment 90881 - Click to enlarge]
[Attachment 90882 - Click to enlarge] -
-
I have two identical videos: the first is 30 fps at 01:26:23, poor image quality, and the second is 24 fps at 01:31:12. I want to extract the audio from the first one, which has 30 frames, and insert it into the better quality one, which has 24 frames.
[Attachment 90883 - Click to enlarge]
[Attachment 90884 - Click to enlarge] -
The prerequisite is that the two videos are exactly the same.
Load your 30 fps video (poor image quality), click encode audiostream.
Select the encoder and the bitrate, at change length & pitch select the custom preset, check calculate with time, insert 01:31:12 in the time field, click OK and click encode.
[Attachment 90885 - Click to enlarge]
If finished, click multiplex.
Drag the 24 fps video into, on the left select his videostream and the new created audiostream (in another color), deselect all other streams, set the container (mp4 or mkv) and click multiplex.
Done -
At 23.976 fps, I should change the time setting to 01.26.23, which means I'll enter 01.31.12 as the time.
And what will this video's time be?
The worse video has 44100 Hz,
and the better quality one has 48000 Hz.Last edited by Henryk69; 19th Jan 2026 at 13:39.
-
Enter the time like in the pic, the fps values have no means here.
The final video lenght from the 24 fps video (better quality) will not change.
If the good audio from the 30 fps video has 48kHz, leave it at 48kHz. -
@ Henryk69,
I hope you can follow this.
First you need to seperate the Audio track you want from its' Video.
Second you need to seperate the Video track you want from its' Audio.
Video frame count:
Audio length:Code:ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of csv=p=0 input_file.mkv
Then join the tracks using the formula below:Code:ffprobe -i input_file.mka -show_entries format=duration -v quiet -of csv="p=0"
Joined synced file:
The above will encode a basic video.Code:ffmpeg -i input.mkv -i input.mka -vf setpts=N/29.957244/TB -c:a copy -c:v libx264
You can control the video more precisely if you like.
Example: -c:v libx264 -preset slower -level:v 4.1 -crf 18
Examples:
This is for the specific file I used:
Use the following formula: 1000 / (audio_length_ms / total_video_frames)
Example: 1000/(455616ms/13649)
1000/33.380907=29.957244
In my case this gave me 29.957244 which is the new frame rate to use.
Which is what you put in setpts=N/29.957244/TB above.
If ProWo's Clever worked instead great.
Maybe it does about the same with a lot less calculating.
If not give my method a try. -
For now, I'm working on the ProWo method and I'm slowly seeing the first results, but I still have a lot to learn.
-
What would you do, ProWo????
I have two videos of the same length, 02:00:41, one with a frame rate of 24 fps and the other with 23.976 fps.
But they start differently. The one with 23.976 fps starts after 2 seconds, while the other starts after 9 seconds. Therefore, the audio from the first video will no longer be synchronized with the second video, which starts later.
And I'll also add a video: the first video with 23.976 fps is in .mp4 format, and the second video with 24 fps is in .ts format. -
-
I'm sending these two video files with media info .txt.
How do I send these two .txt files?
[Attachment 91035 - Click to enlarge]
I would like to say that the first video starts after 2 seconds and the second after 9 seconds.Last edited by Henryk69; 28th Jan 2026 at 12:41.
-
While probably not ideal, you could use a nonlinear editor like davinci resolve to adjust the color first and re-export as ProRes with the same characteristics. Prores generations are usually visually lossless. Lame it takes an extra step, but it is an option.
-
Suddenly I discover something new, that when I wanted to cut the beginning of this longer movie which starts at 9 seconds with a dark image, it turns out that VLC player does it, Pot player starts at 5 seconds, and when I uploaded it to avidemux, these two movie files are equal and the movie for both starts at 2 minutes and they are equal.
-
Unfortunately MediaInfo shows all the video & audio as 2 hours even.
I assume that the different delays are within the 2 hours.
So the time length is the same.
Since I'm certain the videos are too large to post in their entirety & I do not know if a clip would have the delays.
It might if clipped from the beginning of each video.
@ aramkolt, I do not believe Henryk69 is attempting to use "prores". That was what the OP was attempting. -
Thanks to Cholla for your response to my problems. For now, I've combined the audio from the first film with Clever FFmpeg and added it to the second multiplex film with the same Clever Film program. I'm playing it in the MKV codec of AOMedia Video using Pot Player – for now, it's been 15 minutes and synchronized well. Not all players can handle this AOMedia Video codec; PowerDVD, for example, has problems.
Similar Threads
-
FFmpeg ProRes output -- no BT470GB flag
By rgr in forum Video ConversionReplies: 7Last Post: 22nd Oct 2024, 08:25 -
ffmpeg prores: Packet too small
By Gwar in forum Video ConversionReplies: 8Last Post: 2nd Feb 2023, 13:58 -
is ffmpeg prores the same as the prores you get with fc pro
By oduodui in forum Newbie / General discussionsReplies: 5Last Post: 17th Nov 2021, 08:51 -
MPC and VLC display video differently by colorspace and component range
By vice2 in forum Software PlayingReplies: 4Last Post: 9th Aug 2019, 15:31 -
ffmpeg 4.1.4 question regarding "limited color range" output file
By bokeron2020 in forum Newbie / General discussionsReplies: 12Last Post: 1st Aug 2019, 18:28



Quote
