ffprobe:
my conversion command:Code:Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/dev/shm/video.m4v': Metadata: major_brand : isom minor_version : 0 compatible_brands: mp41avc1 creation_time : 2026-10-11T19:58:55.000000Z encoder : vlc 3.0.17.3 stream output encoder-eng : vlc 3.0.17.3 stream output Duration: 00:01:17.70, start: 0.000000, bitrate: 2431 kb/s Stream #0:0[0x1](eng): Audio: mp3 (mp3float) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default) Metadata: creation_time : 2026-10-11T19:58:55.000000Z handler_name : SoundHandler Stream #0:1[0x2](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt2020c/bt2020/unknown, progressive), 1080x1920 [SAR 1:1 DAR 9:16], 2295 kb/s, 30.01 fps, 30 tbr, 1000k tbn, start 0.014978 (default) Metadata: creation_time : 2026-10-11T19:58:55.000000Z handler_name : VideoHandler
Code:ffmpeg -i "/dev/shm/video.m4v" -c:a libfdk_aac -vbr 2 -c:v libx264 -crf 28 -profile:v high -level 41 -vf scale=360:640,format=yuv420p -sn -sample_fmt s16 -ac 1 -threads 0 -map_metadata -1 -max_muxing_queue_size 9999 /dev/shm/lo.mp4mpv or firefox plays video fine.Code:Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/dev/shm/video.m4v': Metadata: major_brand : isom minor_version : 0 compatible_brands: mp41avc1 creation_time : 2026-10-11T19:58:55.000000Z encoder : vlc 3.0.17.3 stream output encoder-eng : vlc 3.0.17.3 stream output Duration: 00:01:17.70, start: 0.000000, bitrate: 2431 kb/s Stream #0:0[0x1](eng): Audio: mp3 (mp3float) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default) Metadata: creation_time : 2026-10-11T19:58:55.000000Z handler_name : SoundHandler Stream #0:1[0x2](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt2020c/bt2020/unknown, progressive), 1080x1920 [SAR 1:1 DAR 9:16], 2295 kb/s, 30.01 fps, 30 tbr, 1000k tbn, start 0.014978 (default) Metadata: creation_time : 2026-10-11T19:58:55.000000Z handler_name : VideoHandler File '/dev/shm/lo.mp4' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:1 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:0 -> #0:1 (mp3 (mp3float) -> aac (libfdk_aac)) Press [q] to stop, [?] for help [libfdk_aac @ 0x565093052200] Note, the VBR setting is unsupported and only works with some parameter combinations Impossible to convert between the formats supported by the filter 'graph -1 input from stream 0:1' and the filter 'auto_scale_0' Link 'graph -1 input from stream 0:1.default' -> 'auto_scale_0.default': Color spaces: src: bt2020c dst: unknown gbr bt709 fcc bt470bg smpte170m smpte240m bt2020nc Link 'auto_scale_0.default' -> 'Parsed_scale_0.default': Color spaces: src: unknown gbr bt709 fcc bt470bg smpte170m smpte240m bt2020nc dst: unknown gbr bt709 fcc bt470bg smpte170m smpte240m bt2020nc [vf#0:0 @ 0x565092eb9b00] Error reinitializing filters! [vf#0:0 @ 0x565092eb9b00] Task finished with error code: -38 (Function not implemented) [vf#0:0 @ 0x565092eb9b00] Terminating thread with return code -38 (Function not implemented) [vost#0:0/libx264 @ 0x565092ebb280] [enc:libx264 @ 0x565092da14c0] Could not open encoder before EOF [vost#0:0/libx264 @ 0x565092ebb280] Task finished with error code: -22 (Invalid argument) [vost#0:0/libx264 @ 0x565092ebb280] Terminating thread with return code -22 (Invalid argument) [out#0/mp4 @ 0x565092de4580] Nothing was written into output file, because at least one of its streams received no packets.
How to modify command to convert video?
Thanks in advance![]()
+ Reply to Thread
Results 1 to 2 of 2
-
-
The source is tagged with the BT.2020 constant luminance matrix (bt2020c), which swscale cannot convert from, so format negotiation fails before scaling. Override the tag at the start of the filter chain with setparams:
The bt2020c tag with an unknown transfer is almost certainly bogus metadata (phone or VLC remux), and the content is most likely ordinary BT.709. If the colors come out slightly off compared to mpv, change colorspace=bt709 to colorspace=bt2020nc (and the primaries to bt2020) instead.Code:ffmpeg -i "/dev/shm/video.m4v" -c:a libfdk_aac -vbr 2 -c:v libx264 -crf 28 -profile:v high -level 41 -vf setparams=colorspace=bt709:color_primaries=bt709:color_trc=bt709,scale=360:640,format=yuv420p -sn -sample_fmt s16 -ac 1 -threads 0 -map_metadata -1 -max_muxing_queue_size 9999 /dev/shm/lo.mp4
Newer FFmpeg versions negotiate colorspace and range between filters, and each filter declares which matrices it accepts. swscale’s list (the “dst” list in your error) omits bt2020c, so negotiation finds no valid path and aborts. Older versions just ignored the tag and treated the input as some ordinary matrix.
Similar Threads
-
Trying To Convet Video With FFmpeg Error opening input
By jamespoo in forum Video ConversionReplies: 2Last Post: 11th Jun 2025, 22:48 -
Pywidevine Obtaining Decryption Key Issue 469 Client Error: Unknown for url
By doganjr in forum Video Streaming DownloadingReplies: 2Last Post: 30th Oct 2024, 05:27 -
clever FFmpeg-GUI Error When Input Video Encoded With VP09?
By meeshu in forum EditingReplies: 16Last Post: 18th Mar 2024, 08:14 -
how to decrypt/convert unknown video format
By bil_san1 in forum Newbie / General discussionsReplies: 1Last Post: 7th Nov 2022, 17:55 -
VirtualDub: "AVI Import Filter error: (Unknown) 80040154"
By Xavier in forum Newbie / General discussionsReplies: 11Last Post: 15th Dec 2021, 18:49


Quote