VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 41
  1. 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:
    Code:
    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
    ffmpeg version 7.0.1

    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!
    Image Attached Files
    Quote Quote  
  2. 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

    Code:
    ffmpeg -bsf:v  prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709 -i testVideo.mov ...
    Note that the documentation is wrong; the switches are color_primaries, color_trc, colorspace ; not transfer_characteristics, matrix_coefficients

    https://www.ffmpeg.org/ffmpeg-bitstream-filters.html#prores_005fmetadata
    Quote Quote  
  3. ffmpeg not working with Windows 10 Home installation problem

    Image
    [Attachment 90564 - Click to enlarge]
    Quote Quote  
  4. Originally Posted by DanMalik View Post
    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
    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.

    Image
    [Attachment 90566 - Click to enlarge]
    Quote Quote  
  5. 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.

    Image
    [Attachment 90568 - Click to enlarge]
    Quote Quote  
  6. Originally Posted by Henryk69 View Post
    But the clever FFmpeg-GUI works with my FFmpeg – it opens in the FFmpeg-bin directory.
    You should not unzip the clever.zip into the ffmpeg folder. Extract it somewhere else.
    Quote Quote  
  7. Originally Posted by Henryk69 View Post
    ffmpeg not working with Windows 10 Home installation problem
    You have to ckeck, if your windows is 32bit or 64bit.
    On a 32 bit system you must use a 32bit ffmpeg release.
    Quote Quote  
  8. But after unpacking clever FFmpeg-GUI and running it asks me for the bin folder

    Image
    [Attachment 90571 - Click to enlarge]
    Quote Quote  
  9. Originally Posted by Henryk69 View Post
    But after unpacking clever FFmpeg-GUI and running it asks me for the bin folder
    Yes, click search folder, locate the ffmpeg bin folder and click ok.
    Quote Quote  
  10. Originally Posted by ProWo View Post
    Originally Posted by Henryk69 View Post
    But after unpacking clever FFmpeg-GUI and running it asks me for the bin folder
    Yes, click search folder, locate the ffmpeg bin folder and click ok.




    thank ok
    Quote Quote  
  11. 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.

    Image
    [Attachment 90582 - Click to enlarge]
    Quote Quote  
  12. How do I change from 30 FPS to 24 FPS? As shown in the image.
    Image
    [Attachment 90881 - Click to enlarge]

    Image
    [Attachment 90882 - Click to enlarge]
    Quote Quote  
  13. Originally Posted by Henryk69 View Post
    How do I change from 30 FPS to 24 FPS? As shown in the image.
    You should first describe exactly what you want to do.
    Quote Quote  
  14. 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.
    Image
    [Attachment 90883 - Click to enlarge]

    Image
    [Attachment 90884 - Click to enlarge]
    Quote Quote  
  15. Originally Posted by Henryk69 View Post
    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.
    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.

    Image
    [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
    Quote Quote  
  16. 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.
    Quote Quote  
  17. 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.
    Quote Quote  
  18. OK, I'll leave it at 48kz.
    Thank you. ProWo
    Quote Quote  
  19. @ 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:
    Code:
    ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of csv=p=0 input_file.mkv
    Audio length:
    Code:
    ffprobe -i input_file.mka -show_entries format=duration -v quiet -of csv="p=0"
    Then join the tracks using the formula below:
    Joined synced file:
    Code:
    ffmpeg -i input.mkv -i input.mka -vf setpts=N/29.957244/TB -c:a copy -c:v libx264
    The above will encode a basic video.
    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.
    Quote Quote  
  20. Thanks cholla for your post.
    Quote Quote  
  21. @ Henryk69,
    Please post if either solution worked for you.
    Quote Quote  
  22. 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.
    Quote Quote  
  23. 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.
    Quote Quote  
  24. Originally Posted by Henryk69 View Post
    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.
    What's your goal?
    Using the audio from 23.976 fps mp4 in 24 fps ts?
    First of all, post a mediainfo report (text mode) from both videos (mp4 and ts) here.
    Quote Quote  
  25. Originally Posted by ProWo View Post
    First of all, post a mediainfo report (text mode) from both videos (mp4 and ts) here.
    I'm still following this topic.
    I agree with ProWo on the needed information.
    Quote Quote  
  26. I'm sending these two video files with media info .txt.

    How do I send these two .txt files?

    Image
    [Attachment 91035 - Click to enlarge]



    I would like to say that the first video starts after 2 seconds and the second after 9 seconds.
    Image Attached Files
    Last edited by Henryk69; 28th Jan 2026 at 12:41.
    Quote Quote  
  27. 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.
    Quote Quote  
  28. 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.
    Quote Quote  
  29. 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.
    Quote Quote  
  30. 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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!