text:
ffmpeg: "Error while filtering: No space left on device" - which device?
I get the following error: "Error while filtering: No space left on device". It causes the conversion to abort.
The process looks like this:
$ ffmpeg -xerror -fflags +discardcorrupt -i /video/input.ts -map 0:v -map 0:a:0 -map '0:a:1?' -f mpegts -s 720x576 -r 25 -vcodec mpeg2video -qscale:v 3.5 -acodec copy /video/output.mpeg
ffmpeg version 6.1.1-3ubuntu5
[..]
Press [q] to stop, [?] for help
[NULL @ 0x55f01a8ef6c0] non-existing PPS 1 referenced
[h264 @ 0x55f01a92c9c0] non-existing PPS 1 referenced
[h264 @ 0x55f01a92c9c0] decode_slice_header error
[h264 @ 0x55f01a92c9c0] no frame!
[NULL @ 0x55f01a8ef6c0] non-existing PPS 1 referenced
    Last message repeated 3 times
[h264 @ 0x55f01b001fc0] non-existing PPS 1 referenced
[h264 @ 0x55f01b001fc0] decode_slice_header error
[h264 @ 0x55f01b001fc0] no frame!
[NULL @ 0x55f01a8ef6c0] non-existing PPS 1 referenced
[h264 @ 0x55f01aab7bc0] non-existing PPS 1 referenced
[h264 @ 0x55f01aab7bc0] decode_slice_header error
[h264 @ 0x55f01aab7bc0] no frame!
[NULL @ 0x55f01a8ef6c0] non-existing PPS 1 referenced
[h264 @ 0x55f01aa3c780] non-existing PPS 1 referenced
[h264 @ 0x55f01aa3c780] decode_slice_header error
[h264 @ 0x55f01aa3c780] no frame!
[vist#0:1/h264 @ 0x55f01a9c3640] Error submitting packet to decoder: Invalid data found when processing input
[vist#0:1/h264 @ 0x55f01a9c3640] Error processing packet in decoder: Invalid data found when processing input
[vist#0:1/h264 @ 0x55f01a9c3640] Decoder thread returned error: Invalid data found when processing input
[h264 @ 0x55f01aaba180] non-existing PPS 1 referenced
[h264 @ 0x55f01aaba180] decode_slice_header error
[h264 @ 0x55f01aaba180] no frame!
[vost#0:0/mpeg2video @ 0x55f01a936e40] No filtered frames for output stream, trying to initialize anyway.
[mpeg2video @ 0x55f01b023f80] MPEG-1/2 does not support 90000/1 fps
[vost#0:0/mpeg2video @ 0x55f01a936e40] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
[NULL @ 0x55f01a8ef6c0] non-existing PPS 1 referenced
    Last message repeated 13 times
[aost#0:2/copy @ 0x55f01acf6d00] Too many packets buffered for output stream 0:2.
[aost#0:2/copy @ 0x55f01acf6d00] Error submitting a packet to the muxer
Error while filtering: No space left on device
[vist#0:1/h264 @ 0x55f01a9c3640] Decode error rate 1 exceeds maximum 0.666667
[aost#0:2/copy @ 0x55f01acf6d00] Too many packets buffered for output stream 0:2.
[aost#0:2/copy @ 0x55f01acf6d00] Error submitting a packet to the muxer
[out#0/mpegts @ 0x55f01a910300] Nothing was written into output file, because at least one of its streams received no packets.

The free space looks like this before starting the conversion, the file is in /video
+ df -h
Filesystem                                 Size  Used Avail Use% Mounted on
overlay                                     40G   27G   11G  72% /
tmpfs                                       64M     0   64M   0% /dev
shm                                         64M     0   64M   0% /dev/shm
/dev/mapper/somedisk                       3.0T  2.8T   71G  98% /video
tmpfs                                      7.8G     0  7.8G   0% /proc/asound
tmpfs                                      7.8G     0  7.8G   0% /proc/acpi
tmpfs                                      7.8G     0  7.8G   0% /proc/scsi
tmpfs                                      7.8G     0  7.8G   0% /sys/firmware
tmpfs                                      7.8G     0  7.8G   0% /sys/devices/virtual/powercap

As there is still a lot of free space on /video (the input is ~4GB and the expected output between 2..3GB), which device is the cause for the out-of-space error?
I'm doing this inside a docker container
Update 1
The exit code is sometimes 0, other times it ends with the text "Conversion failed!" and exit code 69. In the first case, the video is good until a point where all the errors happen. from there, only the audio stream continuous.
Update 2
the same file converts successfully in ffmpeg version 4.4.2 which is delivered with Ubuntu 22.04. The file has some errors, and that's very usual for recorded DVB signals. ffmpeg is expected to ignore these, and behaves as expected in this old version, so I would say we can ignore most of the above errors because they are also shown here, in a successful run:
+ ffmpeg -i /video/input.ts -map 0:v -map 0:a:0 -map 0:a:1? -f mpegts -s 720x576 -r 25 -vcodec mpeg2video -qscale:v 3.5 -acodec copy /video/input.hd2sd.~part~.mpeg
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[h264 @ 0x55c578090440] sps_id 0 out of range
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
[h264 @ 0x55c578090440] sps_id 0 out of range
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] sps_id 0 out of range
[h264 @ 0x55c578090440] non-existing PPS 2 referenced
[h264 @ 0x55c578090440] sps_id 0 out of range
[h264 @ 0x55c578090440] non-existing PPS 2 referenced
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 2 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 1 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[h264 @ 0x55c578090440] non-existing PPS 2 referenced
    Last message repeated 1 times
[h264 @ 0x55c578090440] decode_slice_header error
[h264 @ 0x55c578090440] no frame!
[mpegts @ 0x55c57806c840] start time for stream 0 is not set in estimate_timings_from_pts
[mpegts @ 0x55c57806c840] PES packet size mismatch
[mpegts @ 0x55c57806c840] Packet corrupt (stream = 2, dts = 6175170624).
[mpegts @ 0x55c57806c840] PES packet size mismatch
[mpegts @ 0x55c57806c840] Packet corrupt (stream = 3, dts = 6175166304).
Input #0, mpegts, from '/video/input.ts':
  Duration: 00:05:00.96, start: 68313.046933, bitrate: 10034 kb/s
  Program 1
    Metadata:
      service_name    : Puls 8 HD
      service_provider: sunrise
  Stream #0:1[0xd0]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
  Stream #0:2[0xd1](deu): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s
  Stream #0:3[0xdb](deu): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 224 kb/s
  Stream #0:4[0xee](deu,deu): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
  No Program
  Stream #0:0[0x12]: Data: epg
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (native) -> mpeg2video (native))
  Stream #0:2 -> #0:1 (copy)
  Stream #0:3 -> #0:2 (copy)
Press [q] to stop, [?] for help
Output #0, mpegts, to '/video/input.hd2sd.~part~.mpeg':
  Metadata:
    encoder         : Lavf58.76.100
  Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, bt709, top coded first (swapped)), 720x576 [SAR 64:45 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 90k tbn
    Metadata:
      encoder         : Lavc58.134.100 mpeg2video
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
  Stream #0:1(deu): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s
  Stream #0:2(deu): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 224 kb/s
/video/input.ts: corrupt decoded frame in stream 1
/video/input.ts: corrupt decoded frame in stream 1
    Last message repeated 1 times
/video/input.ts: corrupt decoded frame in stream 1
    Last message repeated 3 times
/video/input.ts: corrupt decoded frame in stream 1
    Last message repeated 3 times
/video/input.ts: corrupt decoded frame in stream 1
    Last message repeated 4 times
[mpegts @ 0x55c57806c840] PES packet size mismatch04:57.08 bitrate=3261.4kbits/s speed=8.42x
[mpegts @ 0x55c57806c840] Packet corrupt (stream = 2, dts = 6175170624).
[mpegts @ 0x55c57806c840] PES packet size mismatch
[mpegts @ 0x55c57806c840] Packet corrupt (stream = 3, dts = 6175166304).
[h264 @ 0x55c578701900] error while decoding MB 13 60, bytestream -32
[h264 @ 0x55c578701900] concealing 996 DC, 996 AC, 996 MV errors in P frame
frame= 7471 fps=210 q=3.5 Lsize=  119090kB time=00:05:00.72 bitrate=3244.2kbits/s speed=8.43x
video:99106kB audio:15230kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.158009%

Update 3
I did some debugging using strace -ff and found that there is not even one syscall returning an error other than these: ENOSYS, ECHILD, EINVAL, ENOTTY, ENOENT, EAGAIN, so I think it might even be the wrong text for something totally different.

That's a misleading error. There's a lot errors in decoding the H264 video stream and during that time, the output packets for the audio streams are getting buffered. The buffer limit has been reached which is when ffmpeg prints that error.

is there an option to skip these errors and continue with what follows that area? ffmpeg 4 also did this..

Map only the video stream and see if that finishes successfully.


text:
Comparison of proper cameras and phones
So I am a new at photography, and videography, and wanted to know specifically why the price and spec range is so different when comparing proper cameras and phones, mainly when comparing video.
I was looking for a mirrorless or DSLR camera with 4k video and about 60fps, and they were so expensive and hard to find, but my like 5 year old phone can do this and costs way cheaper. Is it primarily to do with sensor size ? Does the sensor size really matter ?
Thanks

The biggest differences between using your phone and a camera to record video are lens selection and control. A modern phone can absolutely be used to take incredible video, especially if you use an app like Blackmagic Camera (iOS/Android) to give yourself additional control.
With that said, by using a phone you sacrifice the additional benefits that come from being able to use a standalone lens. The most obvious one is the fact that lenses often support zoom, and if you use prime (non-zoom) lenses you can select lenses of different focal lengths for different zoom levels. The other major, less-obvious benefit of external lenses is depth of field. If you're unfamiliar, using a lens with a wide aperture and long focal length is how you get a soft background, something that can't really be achieved in a phone camera.
When it comes to price differences, cameras and phones are just fundamentally different things. Large sensors are really expensive to make, and the processing required to work with higher resolutions and RAW-like formats is pretty extensive. Also, modern cameras have tons of useful features that phone cameras don't include, such as focus assist and various graphs and tools to compose your shot. To address your question about sensor size, at your level it doesn't really matter much. A smaller sensor will get you a more zoomed-in image using the same lens as a camera with a larger sensor, and larger sensors with cheap lenses can often experience blurring, dimming, or chromatic aberration around the edges. Generally, a "full-frame" sensor is considered better, but not at all mandatory especially if you're just getting into film/photography.
Also, I just want to throw this out there, is 4K/60 FPS really mandatory for you? Cameras that support that can be expensive, and you'll probably find in most cases that's not really necessary, especially higher frame rates. Unless you're shooting action shots or slow-motion, it often looks more natural to use lower frame rates, because they capture the motion blur we've learned to expect, and create smaller files that are easier to work with. Contrary to popular belief, higher frame rates and higher resolutions don't inherently mean you get a better image. In fact, you'll probably find that you notice differences in bitrate more than you do in resolution. But that's just a side tangent, giving you something to think about.

Wow. Suppose I've got a pic of homework to do. Cheers for that much help.

Happy to help, and welcome to stack exchange! If I was able to answer your question, please make sure to mark it as accepted so that others can find this answer as well.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
How to delete the last frame without reencoding the file using ffmpeg
I tried to use many variations of syntax but with no viable results.
The frames in the original file are 213214 and I want to omit the last frame for the total frames to become 213213 but when I try the below syntax I get a very weird result which a higher number of frames rather being decreased by 1
ffmpeg -copyts -i h:\dh.h265 -c copy -enc_time_base -1 -bsf:v:0 noise=drop='eq(pos\,213214)' h:\dh_framecorrect.mkv

so I tried this syntax
ffmpeg -i h:\dh.h265 -frames:v 213213 -c:v copy -c:a copy h:\dh_framecorrect.mkv

but again with no luck
then I tried another syntax like in below
ffmpeg -copyts -i h:\dh.h265 -vf "select='eq(n,213214)'" -vframes 213213 h:\dh_framecorrect.mkv

again with no luck
so what am doing wrong here, can anyone please help me out

If the stream has B-frames, you may not be able to do it (without re-encoding) since the last displayed frame. may be a P-frame stored out-of-order i.e. not in last place.

I'm not sure why the file has this extra frame!! the original file I used has 213213 frames but the file I ended up with after it got encoded in an AI tool has this extra frame, that's why I need to remove this extra frame so I can inject the DoVI RPU file without getting that there is a mismatch in the number of frames error.

@Gyan Could you please shed some light on how can I achieve that

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
FFMPEG replace "no video" part with an image
Using FFMPEG, I have merged a video and audio file to WEBM. But the problem is: if there is audio and no video the video file has just some stuck and still images, because there is no video recorded at that timestamp. The video file and audio file have mostly the same duration (In live stream the video track can be switched off and on).
Is there a way to replace these missing video parts with an image, like some jpg etc. or a placeholder with a black screen?
ffmpeg -i video2.webm -i audio2.opus -c:v libvpx -c:a libopus -strict experimental test.webm

Could not find any solutions, all day of searching.
EDIT, added clarity:
The video is successfully merged to one .webm file, and exist, also plays, the question: "Is there a way to replace these missing "parts in video/gaps with no video only audio" with an image, like some jpg etc. or a placeholder with a black screen?"

Are you asking "if video2.webm does not exist" or "if there is no video in video2.webm" or "if the video is shorter in video2.webm than audio is in opus"?

The video is successfully merged to one webm file, and exist, also plays, the question: "Is there a way to replace these missing "parts in video/gaps with no video only audio" with an image, like some jpg etc. or a placeholder with a black screen?"


text:
ffmpeg: How to preserve colour space automatically?
I currently have a source video with the following properties:
Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuvj444p(pc, bt709/bt709/iec61966-2-1, progressive), 2560x1440 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 1k tbn

I want to transcode it into the following formats after applying cuts and other effects:

H.264 YUV444 (yuvj444p)
H.264 YUV420 (yuvj420p)
AV1 YUV444 10-bit (yuv444p10le)
AV1 YUV420 10-bit (yuv420p10le)

However, except for the yuvj444p → yuvj444p transcode, the resulting files have significantly different colours than the original when played back. This seems to be because ffmpeg stripped the colour space information (to unknown) from the output files:
$ ffmpeg -ss 1:00 -to 1:01 -i source.mkv -c:v libx264 -preset veryslow -pix_fmt yuvj444p -crf 16 x264-444.mkv
...
Output #0, matroska, to 'x264-444.mkv':
  Stream #0:0: Video: h264 (H264 / 0x34363248), yuvj444p(pc, bt709/bt709/iec61966-2-1, progressive), 2560x1440 [SAR 1:1 DAR 16:9], q=2-31, 60 fps, 1k tbn

$ ffmpeg -ss 1:00 -to 1:01 -i source.mkv -c:v libx264 -preset veryslow -pix_fmt yuvj420p -crf 16 x264-420.mkv
...
Output #0, matroska, to 'x264-420.mkv':
  Stream #0:0: Video: h264 (H264 / 0x34363248), yuvj420p(pc, unknown/bt709/iec61966-2-1, progressive), 2560x1440 [SAR 1:1 DAR 16:9], q=2-31, 60 fps, 1k tbn

$ ffmpeg -ss 1:00 -to 1:01 -i source.mkv -c:v librav1e -speed 9 -tiles 24 -pix_fmt yuv444p10le -qp 64 rav1e-444.mkv
...
Output #0, matroska, to 'rav1e-444.mkv':
  Stream #0:0: Video: av1 (AV01 / 0x31305641), yuv444p10le(unknown/bt709/iec61966-2-1, progressive), 2560x1440 [SAR 1:1 DAR 16:9], q=2-31, 60 fps, 1k tbn

$ ffmpeg -ss 1:00 -to 1:01 -i source.mkv -c:v libsvtav1 -preset 5 -svtav1-params tune=2:film-grain-denoise=0 -pix_fmt yuv420p10le -crf 16
...
Output #0, matroska, to 'svtav1-420.mkv':
  Stream #0:0: Video: av1 (AV01 / 0x31305641), yuv420p10le(unknown/bt709/iec61966-2-1, progressive), 2560x1440 [SAR 1:1 DAR 16:9], q=2-31, 60 fps, 1k tbn

I can fix it by passing -colorspace bt709 to ffmpeg, but that relies on me already knowing the source video to be BT.709, so sounds error prone.
Is there a way to have ffmpeg automatically preserve the source video's colour space?

Which version? Recent versions should already do this.

ffmpeg 7.0.2-1 (specifically, 7:7.0.2-1 from debian testing)

I made this example file for another question, but also exhibits the same behaviour reported here when used as the source file: https://files.catbox.moe/q8oy1h.mp4


text:
How to use copyrighted music or sfx in a youtube video without resorting to fair use
I'm a new youtuber and I would like to learn how to use copyrighted content (specifically audio clips) in my video. I don't know how to approach getting legit permission to use copyrighted content in my video and I don't want to resort to fair use risking the longevity of my video and or even channel expecially since I just started. At the moment I have been relying on music with the creative commons licence primarily from Kevin MacLeod. But when I worked on a skit themed around skyrim I want to use a clip from the song "Dragonborn" or "The One They Fear" and the "Unrelenting Force" shout sfx but I don't know who to get permission from (Microsoft, Bethesda, Jeremy Soule), how to get permission to use the content from either these three entities or people and how to get the audio after getting permission to use it.

YouTube has its own rules and standards. If you want to make money from ads in your YouTube videos, you probably can’t use any copyrighted content. The least bad thing YouTube will do if you use copyrighted content is “de-monetize” your video, which means you won’t get any money for ads run in your video. I’m not sure what you mean by “resorting” to fair use, but that phrase makes me think you might not understand fair use (98% of people don’t).

The easiest way to do this is to use rights approved music from a production music library service (eg AudioNetwork). You need to pay for the music to do this, but the prices are usually fairly low.
If you want to use commercial music from a record company, you need to go through their licensing approval, which can be more time consuming and expensive depending on the track, and depending on the purpose you're using it for. You can usually work out who the correct record company to contact is by looking up the details on eg Spotify or Discogs. So for this example, you'd need to contact Bethesda:
https://www.discogs.com/label/705294-Bethesda

I tried getting permission from Bethesda a bit ago but they responded that using any assets from their game is not allowed. I then asked about gameplay footage I recorded but they never responded. I had to resort to making my own parody sound effect for the shout but couldn't include music.

Bethesda finally responded with something completely contrary to the I can't use their assets for a youtube video. Saying that they encorage creators now I'm confused


text:
Why does my final video lose one of the previous audio tracks?
Ok. I have to say that I’ve been trying to solve this problem for a little over 6 hours, but I just can’t figure it out. If anyone has an idea of what could be happening, I’d appreciate it in advance. Well, let’s go.
I recorded a very simple video using OBS. I recorded this video with two separate audio channels: one capturing my microphone and the other capturing the PC’s audio.

So, of course, when I created the sequence and brought the video into Premiere, it split the audio tracks according to each channel recorded in OBS. So far, so good.
My goal is to compile a video in .mp4 format where both audios can be heard simultaneously, without me having to switch between audio tracks. I recorded it this way because it makes it easier to increase or decrease the volume of the separate audio tracks.
But what’s happening is that when I export the file through Premiere, the audio track corresponding to the PC audio disappears, it’s removed. I can only hear my voice. Even when I go to the timeline and press the spacebar, both audios play normally (on the timeline, I can hear both audios, as can be seen in the equalizer in the previous photo). I’m sending pictures of how the channels are distributed for each of the tracks:

Here are the settings for the sequence where the video is:

And here are the export settings:

Now, what am I doing wrong? Why does the second track, the music track, disappear when I export the final file? And by the way, my voice also loses some quality and ends up getting louder, clipping a bit.

EDIT
I forgot to also show you my sequence audio channels:

If the music was recorded in mono to both left and right channels, but one side ended up phase reversed, this could explain it: https://video.stackexchange.com/questions/27926/premiere-pro-audio-muffled-and-distorted-on-export/32275#32275

@tomh Hey, thanks for the answer. There's no Channel Mixer effect on my Premiere Pro, though. Man, I really thought it would be a good idea to record a video with 2 channels, just uploading it to Premiere and work with both audio. What's really upsetting is that in the timeline, when I press play, it works FINE. Then, export ruins it. Really don't know what to do :(

Can you put the files online somewhere?

I tried to replicate this on a Mac - (don't have a PC). I was able to export separate mic and screen captured audio from OBS into Premiere, using a "fragmented .mov" output file. MKV format isn't recognised by Premiere on the mac. When I exported to mp4, both the mic and the Screen Capture audio were mixed correctly.  Sorry can't be more help - maybe try the OBS forums?


text:
How can I create a kaleidoscopic filter in AE
I want to know how to replicate a kaleidoscopic filter (like in the prism lens fx look in the attached figure below) for a project I'm working on...

What is the workflow / technique to create this?

Start with CC HexTile. Set Render to 'Tile' and Radius to around 370 (assuming HD comp). Add a feathered circular matte to the center and place your original media behind this.
This is the fastest way to do it but the joins won't be feathered.
For this, you would need to manually create eight instances of the media (masked and feathered) and position them around in a circle.


text:
How to use -copyts with between?
I'm using enable=between(t,0,5) with ffmpeg to apply a filter during only part of a video, but when I add -copyts to maintain the timestamps in the file, then it extends the length of the output based on the PTS of the input and causes playback issues.
I've also tried filtering by frames using enable=between(n,0,150) but the same problem happens.
Is there a way to still use -copyts without it extending the beginning like this?
Here's an example command:
ffmpeg -i input.mp4 -i overlay1.svg -i overlay2.svg -filter_complex "[0:v][1:v]overlay=10:10:enable='between(n,0,150)'[v0];[v0][2:v]overlay=10:10:enable='between(t,150,1200)" -c:v libx264 -copyts -muxdelay 0 output.mp4

Share your full command.

I added an example command to the question

That command should result in an output equal to the length of input.mp4. How long is the actual output?

The length of the actual data is the same (i.e. the number of frames is the same and ffprobe says that it's the same length), but when I play it in QuickTime or VLC then it say it's an hour long.
QuickTime starts at the beginning of the time and there's an hour of black that I have to scroll through before the actual video starts.
VLC shows all of that time but starts playing the video and shows it scrolled through that hour.

Add -avoid_negative_ts make_zero before output.mp4 and check.

Adding -avoid_negative_ts before the first -i and before output.mp4 doesn't change the output and it's byte for byte identical.

Also add -map_chapters -1 -dn -sn

I upgraded to 7.1 and between using n now works


text:
How can I speed up a GIF animation by several orders of magnitude to create a persistence of vision effect?
I have a GIF animation consisting of 51 frames, generated by mathematical software (of a deforming curve).  It plays back by default at 10 FPS, for a duration of 5.1 seconds.
My goal is to play it in an infinite loop much faster than that, so that the different frames merge and create a persistence of vision effect.  This requires two things:

Making it an infinite loop, as described here.  Good.

Increasing the FPS by between 10x (510ms duration, will give POV of some of the animation) to 100x (51 ms duration, should give POV for full animation).  Here's the challenge.

Using simple GIF software, I can increase the frame rate by 5x or so.  Beyond that, GIF doesn't seem to support it.
I imagine MP4 can go higher, but not high enough.  So I assume I need to add intermediate frames in between.
It seems that can be done via ffmpeg -minterpolate. However, the options are bewildering, and I can't figure out which ones to use here.  Part of the challenge is that this is not "play this video back faster" but rather "turn these sequence of frames into a whole new creation, by animating them very fast in a loop" - doable, but not the default use case, and therefore harder to manage.
I've read this but am still confused.
How can I turn my GIF into an infinite loop, at very high FPS, with interpolated frames in between? Ideally I'd like to do this using ffmpeg.
Update
I've experimented with multiple ffmpeg options and can not get the full transform. If you'd like to try, the original GIF is here.  I'd like to keep it looping while speeding up its playback rate so that it has a total duration of 500ms, 100ms, or even 50ms (and then immediately loops again).

gif max fps 50? → ffmpeg -r 100 -i "mA2HVqDs.gif" -vf " minterpolate=50,split[g][p]; [p]palettegen[p]; [g][p]paletteuse" out.gif

authors: Баяр Гончикжапов


text:
How to render ultra-low FPS video with ffmpeg?
I need a video from a static 4K picture. And I need it fast (500x). For that I asked ffmpeg for FPS=0.05 and it worked, so I got 100 hours of ultra-hd "video" in 5 Mb in no time. After that I tried to add some sound, but it ruined everything. All the players now just show black screen, except VirtualDub, which plays fine. With luck, rewinding somewhere close to the end sometimes makes players play. With fps=0.2  MPC will play after 5 seconds of blackness (after the second frame comes). Lower values lead to infinite black.
This works:
ffmpeg -loop 1 -r 0.001 -i picture.png -c:v libx264 -tune stillimage -t 100:00:00 -pix_fmt yuv420p 1.mp4
This does not:
ffmpeg -y -loop 1 -r 0.05 -i 4K-logo.jpg -i sound.mp3 -shortest -pix_fmt yuv420p -c:a libopus -b:a 64k -c:v libx264 -preset faster Done.mp4
Do you have any idea, what kind of problem is that?
What I tried: different players, most of them fail, different codecs and containers, tuning interleaving params so audio starts first, -vsync 0,1,2. I even tried to concat 1 second of high-fps video with the low-fps rest, then mpc stops or pauses a bit between them. So nothing works. Audio breaks it. Ideas?

The 2nd command plays OK with macOS QuickTime Player and QuickLook with .mp4 encoded with ffmpeg and ffmpeg7 with .png, .jpg and .mp3 input.


text:
ffmpeg: detect CURRENT framerate, not ORIGINAL one
Is there a way with ffmpeg to detect the current video framerate and not the original one?
I have a file that plays at 25 FPS with original framerate set at 23.976.
I changed the video framerate with ffmpeg itsscale feature (and atempo for audio).
Mediainfo now shows this:

but I can't find a way to get the 25.000 FPS information with ffmpeg (nor ffprobe), this is what it detects:

ffmpeg will always detect current frame rate.

No, it detects 23.976 FPS


text:
How do I animate two intersecting shapes and make the intersection be transparent or see through in After Effects, is there an easy way?
So, in After Effects, I have two animated objects, and when they intersect, I want the image below to be see-through. I can't seem to find a solution, but there is surely a way to make their intersections transparent no?

If the two black blocks in your example are Shape objects (ie vector shapes drawn in After Effects), you can put them both in a single Shape layer, then add a "Merge Paths" to them, and choose "Exclude Intersections" for the mode:

If they are video or other types of bitmapped objects, you could do it with track mattes.
Put the two images/videos on two different layers, and enable Track Mattes on both. Set one matte to target the other layer and vice versa. You will need to click on the eyeball icon to re-enable visibility of the mattes after you create them, as the matted layer gets made invisible by default:

Thanks so much! That's exactly what I was looking for!


text:
FFmpeg play file to DeckLink
I need to playback files to a DeckLink card using FFmpeg. For testing I'm using this file: https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov
The file plays nicely using ffplay:
ffplay -i $FILE

I can also play it on my DeckLink card using Gstreamer:
gst-launch-1.0 \
  filesrc location="$FILE" ! tee ! queue ! \
  decodebin ! queue ! \
  videoscale ! videoconvert ! videorate ! \
  decklinkvideosink mode=1080p24 device-number=2

However when using FFmpeg:
ffmpeg \
    -re -i "$FILE" \
    -filter:v scale=1920:1080 -filter:v fps=24 \
    -an \
    -f decklink -format_code Hp24 -pix_fmt uyvy422 'DeckLink Quad (3)'

Then playback works during ~1.5s but fps drops and it quickly freezes. CPU load is low.
ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --extra-cflags='-I/home/user/softwares/ffmpeg/ffmpeg-7.1/ffmpeg-7.1/include -I/usr/local/cuda/include -I/home/user/sdks/blackmagic/Blackmagic-DeckLink-SDK-14.2/Linux/include/' --extra-ldflags='-L/home/user/softwares/ffmpeg/ffmpeg-7.1/ffmpeg-7.1/lib -L/usr/local/cuda/lib64 -L/home/user/sdks/blackmagic/Blackmagic-DeckLink-SDK-14.2/Linux/include/' --prefix=/opt/ffmpeg/ffmpeg-7.1 --bindir=/opt/ffmpeg/ffmpeg-7.1/bin --pkg-config-flags=--static --extra-libs='-lpthread -lm' --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx265 --enable-nonfree --enable-nonfree --enable-decklink --enable-ffplay
  libavutil      59. 39.100 / 59. 39.100
  libavcodec     61. 19.100 / 61. 19.100
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'videos/big_buck_bunny_1080p_h264.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2008-05-27T18:40:35.000000Z
    com.apple.quicktime.player.movie.audio.gain: 1.000000
    com.apple.quicktime.player.movie.audio.treble: 0.000000
    com.apple.quicktime.player.movie.audio.bass: 0.000000
    com.apple.quicktime.player.movie.audio.balance: 0.000000
    com.apple.quicktime.player.movie.audio.pitchshift: 0.000000
    com.apple.quicktime.player.movie.audio.mute:
    com.apple.quicktime.player.movie.visual.brightness: 0.000000
    com.apple.quicktime.player.movie.visual.color: 1.000000
    com.apple.quicktime.player.movie.visual.tint: 0.000000
    com.apple.quicktime.player.movie.visual.contrast: 1.000000
    com.apple.quicktime.player.version: 7.4.1 (14)
    com.apple.quicktime.version: 7.4.1 (14) 0x7418000 (Mac OS X, 10.5.2, 9C31)
    timecode        : 00:00:00:00
  Duration: 00:09:56.46, start: 0.000000, bitrate: 9725 kb/s
  Stream #0:0[0x1](eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080, 9282 kb/s, 24 fps, 24 tbr, 2400 tbn (default)
      Metadata:
        creation_time   : 2008-05-27T18:40:35.000000Z
        handler_name    : Apple Video Media Handler
        vendor_id       : appl
        encoder         : H.264
      Side data:
        displaymatrix: rotation of -0.00 degrees
  Stream #0:1[0x2](eng): Data: none (tmcd / 0x64636D74) (default)
      Metadata:
        creation_time   : 2008-05-27T18:40:35.000000Z
        handler_name    : Time Code Media Handler
        timecode        : 00:00:00:00
  Stream #0:2[0x3](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 437 kb/s (default)
      Metadata:
        creation_time   : 2008-05-27T18:40:35.000000Z
        handler_name    : Apple Sound Media Handler
        vendor_id       : [0][0][0][0]
[vost#0:0/wrapped_avframe @ 0x651ff00f3bc0] Multiple -filter/-af/-vf options specified for stream 0, only the last option '-filter:v fps=24' will be used.
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
[decklink @ 0x651feffc5cc0] Found Decklink mode 1920 x 1080 with rate 24.00
Output #0, decklink, to 'DeckLink Quad (3)':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    timecode        : 00:00:00:00
    com.apple.quicktime.player.movie.audio.gain: 1.000000
    com.apple.quicktime.player.movie.audio.treble: 0.000000
    com.apple.quicktime.player.movie.audio.bass: 0.000000
    com.apple.quicktime.player.movie.audio.balance: 0.000000
    com.apple.quicktime.player.movie.audio.pitchshift: 0.000000
    com.apple.quicktime.player.movie.audio.mute:
    com.apple.quicktime.player.movie.visual.brightness: 0.000000
    com.apple.quicktime.player.movie.visual.color: 1.000000
    com.apple.quicktime.player.movie.visual.tint: 0.000000
    com.apple.quicktime.player.movie.visual.contrast: 1.000000
    com.apple.quicktime.player.version: 7.4.1 (14)
    com.apple.quicktime.version: 7.4.1 (14) 0x7418000 (Mac OS X, 10.5.2, 9C31)
    encoder         : Lavf61.7.100
  Stream #0:0(eng): Video: wrapped_avframe, uyvy422(tv, bt709, progressive), 1920x1080, q=2-31, 200 kb/s, 24 fps, 24 tbn (default)
      Metadata:
        creation_time   : 2008-05-27T18:40:35.000000Z
        handler_name    : Apple Video Media Handler
        vendor_id       : appl
        encoder         : Lavc61.19.100 wrapped_avframe
frame=   25 fps=0.3 q=-0.0 size=N/A time=00:00:01.37 bitrate=N/A speed=0.0146x

I got the same behavior when using:

another card (a DeckLink 8K Pro)
an older FFmpeg version (4.4.3)
other files
a webcam

What am I doing wrong?


text:
What's this "media not available" error message from?
Ok, so I was watching a The Matrix (1999) Behind the Scenes video, and around 56:29 I noticed a flash across the screen of some ancient error message. What software was this from:?
ChatGPT confidently speculates that it's from RealPlayer, but I doubt it.

Anyone know?

Great question. I can't find an answer - I assumed it was an old verison of Avid. You could try https://www.reddit.com/r/ObscureMedia/


text:
Why do my ffmpeg hevc_amf options have no Effect
I'm starting to get into videoengineering. I was trying to compare the different hardware encoders in my devices. I want to encode a vp9 video to hevc. Therefore I'm using FFmpeg on an m2 pro Mac and on my all-amd tower. I was happy to see that the amf api offers a lot of different rc modes. I followed this document to tweak the parameters. First goal in mind was best quality at low file size with better speed than software (I know you "can only have two") so I figured that qvbr seemed to be a good option. I tried different commands just to find out that the options are ignored and the file that comes out is always the exact same eg:

ffmpeg -t 60 -i Rainbow.mp4 -c:v hevc_amf -an blebb.mp4

ffmpeg -t 60 -i Rainbow.mp4 -c:v hevc_amf -rc hqvbr -an blabb.mp4

ffmpeg -t 60 -i Rainbow.mp4 -c:v hevc_amf -rc qvbr -an -qvbr_quality_level 19 blibb.mp4

Did I do something wrong? Do I need to install some drivers? I found this documentation but im not sure if it's about compiling ffmpeg or setting it up or if I need to use ffmpeg from the amd sdk... Im pretty sure that my commands are using accellerated encoding because it is more than two times faster than libx265 software encoding.
The card in my system is a Vega 64. My CPU is a Ryzen 7700X.
I don't really know where to even begin troubleshooting. If someone would give me a nudge in the right direction I would be really grateful.


text:
Weird lines come in video feed from ZED2 camera
I am streaming the images from a ZED2 camera (enter link description here) using a ROS2 humble topic on Jetson Orin NX JP 6.0/ Ubuntu 22.04
I get images like this from the left camera. Any idea why does it happen?
I drew the rectangles myself. But the issue is the those lines.
I tried the same camera with no setting change yesterday and it gave me clear images. I am not able to correlate what causes it to produce good/ bad images sometimes.
For your information, I am operating the camera in a glacier/ snowy environment. It was not sunny that day when I received the bad images, nor was it on the good image day. These lines remain consistent across different frames. Once in a while I get clear frame. ChatGPT says aliasing/ moire patterns.
I don't know much about tuning camera parameters but I have control over below ones.
video:
            brightness: 4 # [DYNAMIC] Not available for ZED X/ZED X Mini
            contrast: 4 # [DYNAMIC] Not available for ZED X/ZED X Mini
            hue: 0 # [DYNAMIC] Not available for ZED X/ZED X Mini
            saturation: 4 # [DYNAMIC]
            sharpness: 4 # [DYNAMIC]
            gamma: 8 # [DYNAMIC]
            auto_exposure_gain: true # [DYNAMIC]
            exposure: 80 # [DYNAMIC]
            gain: 80 # [DYNAMIC]
            auto_whitebalance: true # [DYNAMIC]
            whitebalance_temperature: 42 # [DYNAMIC] - [28,65] works only if `auto_whitebalance` is false

stream_server:
            stream_enabled: false # enable the streaming server when the camera is open
            codec: 'H264' # different encoding types for image streaming: 'H264', 'H265'
            port: 30000 # Port used for streaming. Port must be an even number. Any odd number will be rejected.
            bitrate: 12500 # [1000 - 60000] Streaming bitrate (in Kbits/s) used for streaming. See https://www.stereolabs.com/docs/api/structsl_1_1StreamingParameters.html#a873ba9440e3e9786eb1476a3bfa536d0
            gop_size: -1 # [max 256] The GOP size determines the maximum distance between IDR/I-frames. Very high GOP size will result in slightly more efficient compression, especially on static scenes. But latency will increase.
            adaptative_bitrate: false # Bitrate will be adjusted depending the number of packet dropped during streaming. If activated, the bitrate can vary between [bitrate/4, bitrate].
            chunk_size: 16084 # [1024 - 65000] Stream buffers are divided into X number of chunks where each chunk is chunk_size bytes long. You can lower chunk_size value if network generates a lot of packet lost: this will generates more chunk for a single image, but each chunk sent will be lighter to avoid inside-chunk corruption. Increasing this value can decrease latency.
            target_framerate: 0 # Framerate for the streaming output. This framerate must be below or equal to the camera framerate. Allowed framerates are 15, 30, 60 or 100 if possible. Any other values will be discarded and camera FPS will be taken.

Any help is highly appreciated to help understand and eliminate these lines!
Update: I am not doing any postprocessing on the image apart from the ROS2 node that ZED's SDK runs (it gives me option to choose resolution through)
Bad Image

Good Image

I don't know anything about those cameras or systems (you should add links to precisely which camera, operating system you are using), but those do look like Moire patterns. Are you delivering video at the default resolution for the camera & system, or are you downsizing? Those patterns could suggest some rescaling is going on.

Also it would help if you could upload some "normal" images to help explain what's going on. Or an image of what you expect to see vs the output of the camera.

@tomh : I am not doing any resizing myself but I guess that the camera's SDK does it as it gives me the choice to select different resolution. I also attached a link to the camera and a good photo I came across in the same run as the faulty one.

I would start by only encoding and exporting at the camera's native resolution & frame rate, which looks to be max 2208x1242 at 15 fps. The images you've sent are 652x1333, so some resizing is going on

Right now, I receive in 1280720. I pasted only screenshot of some area. So. that's why its 6521333. I will try at the full resolution as you suggested.

@tomh I did some experiments with different resolution and fps and found that 720p @ 60fps doesn't show these lines. One day, 1080p was fine but not another. Full resolution 2K didn't help for me. I also raised this question on the stereolab forums @ https://community.stereolabs.com/t/camera-image-has-lines/7708/12


text:
FFMPEG command to mix audio and video with adjustable volume, plays till Video length and loop audio entire video
I have:

Video file of X length
Audio of Y length

I am trying to achieve an output video that has the following qualities:

The volume level of the added audio should be adjustable
The audio should loop till the end of the video
It should not break even if the input video does not have any audio
I should be able to mute the audio of the source video if needed.
All of the above, in the fastest possible way.

I'm not well versed with FFMPEG, maybe some experts could help.


text:
Eliminate background noise in home made videos
Background
My wife is a private tutor and cannot carry on with classes due to Covid 19. Using Skype, Zoom etc is ruled out due to scheduling conflicts with schools using them. That pretty much left is with the only choice of recording videos, uploading them to cloud and sharing links with her students. Each video is typically half an hour
Set up

Room, isolated from external noise.
Whiteboard to draw and explain.
One Plus 7 mobile running Android 10 placed close enough and using the phone mic to capture audio.
Post recording processing on a laptop is not possible for a bunch of reasons. We don't want to invest in recorders, mixers etc

Problem
Ceiling Fan noise. It's summer here and a fan is a must (no air-conditioning). This makes for a poor video, especially when she is facing the whiteboard.
There is no problem with the video portion, lighting etc.
Tried and didn't work

She isn't comfortable with head phones, so I tried using Bluetooth earphones and using the Bluetooth audio instead of phone mic but it didn't work reliably.
Android apps that claim to reduce noise. Results aren't good.

These questions, emphasized that I should be using a good mic (since post recording processing is not possible)

Microphone suggestions or software to avoid background noise in audio
How to reduce background noise in the video

Questions

What kind of mic and the typical characteristics of the mic I should be looking for?
Is there any other alternative solution apart from mic? For instance, a paid Android app that can do this for sure? Or something else?

We are on a budget and since the videos aren't meant to be high quality anyway, low cost solutions are preferred. It would be nice if someone could link a product from Amazon (India) as an example.
PS: Lengthy question, yes, to make sure the situation is clear and hoping for a workable solution

Forget an app. The truth is that a mic is, not only the best option but also an honest option. It will help the audience to focus on the content instead of making it a pain to hear.
I would go for a cable lavalier mic, there are some in amazon, and they are the cheapest alternative.
https://www.amazon.com/s?k=cellphone+microphone
The other option is a shotgun mic, but they are a bit more expensive, and normally are for outdoor usage and for interviews for example. For one person a lavalier is the best alternative.
You could also try a "hands-free" earphone with a mic. Probably your cellphone came with one already.

Why a lavalier?
The way a lavalier mic reduces the ambient noise is... It does not.
But the ratio of the proximity to your mouth, let's say 10cm or 4in to any other source of a sound, a fan, that can be 2mts away is 20 times the distance. And depending on the echo of the room, this difference could make the sound less prominent by one law that is the inverse square law that makes this difference exponential.
But if you have your camera at let's say 2m away from you, using the internal mic, and the fan is above you, the ratio of distances is probably only 1.5 times. So when you record your voice, you need to pump the volume, therefore you also pump the volume for the fan.

Hands-free is not the same as Bluetooth. There are cable options.
Regarding a blue tooth or not, I can not recommend anything. Bluetooth has the risk of having some delay, or not. If that is not important, because you are not showing the face it is ok. But this depends on the model or brand. I suppose if you buy one Bluetooth hands-free for some brand it would recognize that device.
Cable or Bluetooth is just a way to connect a device. That is up to you and you need to make some homework to see if the device fits your phone.
But normally a lavalier mic is expected to have better sound quality than mic on a hands-free device. Of course, depends on the brand.
Some cable lavalier mics need batteries, make sure to buy some extra. Also, check the length of the cable.
You could add some cable extension, but that is not recommended because you could add electronic noise into the signal, but you could try. The not so cheap option is a lavalier with a UHF transmitter.

You may like to see my answer as FYI

Answering my question with a no extra cost solution using the Noise cancellation headset I had.
Using any Bluetooth headset (even supporting BT 5.0) like Crossbeats
and recording with stock camera app or with Open Camera with audio source set to external doesn't work.

Solution

I had a Bose BT2 Bluetooth headset, which I haven't used in the last 7 years and surprisingly charged up and gives me about an hour of usage time which is more than enough. I wanted to use this to improve the quality of recording since it has excellent noise cancellation. You may as well pick up any recent BT headsets of your choice and of recent vintage. Profiles supported by Bose headset are
HSP, HFP, A2DP - SNK, AVRCP

Download Bluetooth Mono Router. Blogs and YouTube videos recommend BTmono but it hasn't been updated for Android 10 and won't work. Both these apps have the same functionality - they let you play BT audio to those old headsets which only support voice calls and not media. I am not clear as to how this let's you overcome the limitations of recording but it works (someone here may have an explanation) . You can use either stock camera app or Open Camera (audio as external in settings)

In case you can't record, activate developer options and from Bluetooth settings try AVRCP 1.3 and SBC codec combination. These seem promising. In my case I used default

Permit me  a little rant about One Plus tech support with interactions over several mails. YMMV. Documenting it just in case it helps others.

They do not respond when you ask them how to record using Bluetooth.

Using wired Lavalier solutions need an extra adapter in some cases and even then no guarantees. Reason : Non standard implementation of USB C to audio adapter (Shades of wrong resistance used in early models)
. They claim on mail that TRRS is not supported since it is a third party affair and when confronted with standards do not reply


text:
ffmpeg + libfdk_aac + vbr => wrong "BitRate_Mode"
I'm trying to encode sample video clip or audio track with ffmpeg and libfdk_aac with variable bitrate mode-vbr 3:
ffmpeg -i sample.mp4 -crf 21 -vcodec h264 -acodec libfdk_aac -vbr 3 -ac 2 out.mp4
ffmpeg -i sample.mp3 -acodec libfdk_aac -vbr 3 -ac 2 out.m4a

mediainfo always shows
Bit rate mode                            : Constant

It sounds like a bug, isn't it?
Also, Mp4info looks like
File:
  major brand:      M4A
  minor version:    200
  compatible brand: M4A
  compatible brand: isom
  compatible brand: iso2
  fast start:       no

Movie:
  duration:   229042 ms
  time scale: 1000
  fragments:  no

Found 1 Tracks
Track 1:
  flags:        3 ENABLED IN-MOVIE
  id:           1
  type:         Audio
  duration: 229042 ms
  language: und
  media:
    sample count: 9864
    timescale:    44100
    duration:     10100736 (media timescale units)
    duration:     229042 (ms)
    bitrate (computed): 88.674 Kbps
  Sample Description 0
    Coding:      mp4a (MPEG-4 Audio)
    Stream Type: Audio
    Object Type: MPEG-4 Audio
    Max Bitrate: 88674
    Avg Bitrate: 88674
    Buffer Size: 0
    Codecs String: mp4a.40.2
    MPEG-4 Audio Object Type: 2 (AAC Low Complexity)
    MPEG-4 Audio Decoder Config:
      Sampling Frequency: 44100
      Channels: 2
    Sample Rate: 44100
    Sample Size: 16
    Channels:    2

How mediainfo recognizes Bit rate mode for mp4 \ m4a ? And is there any way to correct it to Variable ?

P.S.:
Bitrate's plot show that libfdk_aac works fine, but output metadata is incorrect - it can't be CBR. Here's example for CBR below (with option -vbr 0):

UPDATE:
After an hour of digging this issue I noticed that issue could be solved by editing ESDescriptor.
Here's sample's ESDescriptor that ffmpeg produces:
[ESDescriptor] size=5+34
  es_id = 2
  stream_priority = 0
  [DecoderConfig] size=5+20
    stream_type = 5
    object_type = 64
    up_stream = 0
    buffer_size = 0
    max_bitrate = 151870
    avg_bitrate = 151870
    DecoderSpecificInfo = 11 90
  [Descriptor:06] size=5+1

Well, if you set max_bitrate and avg_bitrate to 0 - Bit rate mode magically switches to correct value VBR as it is.
So the problem could be solved by using mp4edit or by patching ffmpeg (libavformat/movenc.c::mov_write_esds_tag)
Out of curiosity, I checked youtube's videos' ESDescriptor, they also has max_bitrate and avg_bitrate set to 0.

0 isn't valid value for those fields. Ideal would to calculate actual max bitrate.

Yeah, I noticed that ffmpeg has a bug while writing esds: it writes avg_bitrate instead of max_bitrate which cause decoders think it's CBR audio stream. Somehow if set to 0 works fine everywhere and decoders detect it as VBR. I'm not sure about old ones, but yeah, to be sure every decoder read an audio correctly - better calc actual size.

As long as the buffer size, when specified, is accurate, what difference does it make?

Fixed now in https://github.com/FFmpeg/FFmpeg/commit/46c6ca3ed1651c67faf899776f1922c108093a44

The issue was caused by ffmpeg/libavformat/movenc.c::mov_write_esds_tag, it can't find max_bitrate. To solve it you should specify audio bitrate -b:a 128k along with -vbr 4. Then mp4's ESDescriptor would have info about max_bitrate and mediainfo and decoders would know that audio stream has variable bitrate mode.

Currently only the 'aac_low' profile supports VBR encoding.

authors: Валерий Заподовников


text:
Display overlapping subtitles
I used YouTube to autogenerate subtitles for a video. The srt file looks something like this:
0:00:00.060,0:00:07.080
first caption

0:00:03.240,0:00:09.599
second caption

0:00:07.080,0:00:13.019
third caption

As you can see, the captions overlap in time. The first caption is present for seconds 0-7, while the second caption is present for seconds 3-9. The result in YouTube is that:

The first caption appears first and is the first line on the screen.
Then on second 3 the second caption appears as the second line.
On second 7 the first caption disappears and the second caption becomes the first line. At the same time, third caption appears as the second line.

However, when I use the srt in DaVinci Resolve, only a single line appears at a time. So:

The first caption stays there until second 7.
The second caption appears only between seconds 7 and 9.
The third caption appears after second 9.

Is there a way to display such multiline subtitles with DaVinci Resolve?
If not, how do I fix it so it displays properly with one caption at a time?

Given that I couldn't find a satisfying solution, I wrote a Ruby script for merging such overlapping captions.
Usage:
ruby ./merge_overlapping_srt_captions.rb _input_file_ _output_file_


text:
FFMPEG to YouTube: YT says "Unsupported resolution for latency configuration ... The current resolution is (65535x65535)"
I've a facility that runs on a Windows machine, that records the screen to disk, and it works well. It takes audio streams from two virtual sound cards and a stream from the display and produces a video file with two audio streams:
ffmpeg -y -rtbufsize 256M
  -f dshow -i video="screen-capture-recorder" -thread_queue_size 512
  -f dshow -i audio="Line 2 (Virtual Audio Cable)"
  -f dshow -i audio="Line 3 (Virtual Audio Cable)"
  -map 0:v -map 1:a -map 2:a -pix_fmt yuv420p "{0}"

I'm trying to upgrade this so it simultaneously records to disk and streams to youtube. YT doesn't support multiple audio streams so I'm attempting to put one stream in the left of a stereo and the other stream in the right (so the user can use their balance control to switch between them). That part doesn't work correctly at the moment (output works but is not L/R separated; it's L+L and R+R. I probably need to down to mono before I merge) but I plan to make another question for it because I doubt it's the reason YT is throwing an error here
Here's the upgraded command I'm using to tee the output to disk and YT:
ffmpeg -y -rtbufsize 256M
  -f dshow -video_size 1264x944 -i video="screen-capture-recorder" -framerate 10 -thread_queue_size 512
  -f dshow -i audio="Line 2 (Virtual Audio Cable)"
  -f dshow -i audio="Line 3 (Virtual Audio Cable)"
  -filter_complex "[1:a][2:a]amerge=inputs=2[aout]"
  -map 0:v -map [aout]:a -c:v libx264 -c:a aac -b:v 3000k -maxrate 3000k -bufsize 6000k -g 20 -pix_fmt yuv420p -movflags +faststart
  -f tee "[f=flv:onfail=ignore]rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx|c:\\temp\\test.mp4"

It seems to work in terms of the disk version; everything is as I expect but YT says "Stream Starting" then after a while says:

Unsupported resolution for latency configuration
  You need to change the video resolution. The current resolution is (65535x65535), which is not supported for this configuration. The expected video resolution is (2560x1440).

The version written to disk is 1264x944 per VLC:

And a mediainfo dump:
General
Complete name                            : C:\temp\test.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 33.5 MiB
Duration                                 : 3 min 21 s
Overall bit rate                         : 1 393 kb/s
Writing application                      : Lavf58.29.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.2
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 3 min 21 s
Bit rate                                 : 1 130 kb/s
Nominal bit rate                         : 3 000 kb/s
Width                                    : 1 264 pixels
Height                                   : 944 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Constant
Frame rate                               : 10.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.095
Stream size                              : 27.2 MiB (81%)
Writing library                          : x264 core 159
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=20 / keyint_min=2 / scenecut=40 / intra_refresh=0 / rc_lookahead=20 / rc=cbr / mbtree=1 / bitrate=3000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=3000 / vbv_bufsize=3000 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 3 min 18 s
Bit rate mode                            : Constant
Bit rate                                 : 265 kb/s
Channel(s)                               : 4 channels
Channel layout                           : C L R Cb
Sampling rate                            : 44.1 kHz
Frame rate                               : 43.066 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 6.25 MiB (19%)
Default                                  : Yes
Alternate group                          : 1

What have I screwed up that makes YT think this is a 65536 video?

Show the complete log from your ffmpeg command. Don't forget to redact your stream key.

Having this same issue using the tee muxer to split to YouTube and the segment muxer, I wonder if this is a bug with the tee muxer.

I never did resolve this; the requirement for it went away when a client quit using us. The recording system has since changed and ff upgraded from 3.3.3 to 4.something. I'll see if I can get some time to revisit it. In fairness I never did make any efforts to respond to the suggestion in the error message that the video should be 2560x1440 either (it was that specific and odd 1264 resolution for a reason)

This is still not resolved.  I am getting the same warning on YouTube end, but its working fine on Facebook and disk

I added this   -flags +global_header
and it's working fine then
https://stackoverflow.com/questions/73105401/ffmpeg-to-youtube-with-tee-mux-giving-resolution-warning-65535x65535-which-is


text:
FFMPEG Live stream loop with overlay - Errors
I'm trying to do a livestream with a video loop, sound from the desktop and an overlay image that updates when I replace the file and a text that also updates when a file is replace but I seem to be running into problems. Any help is most appreciated:
VID=lol.mp4
STREAM_KEY=rmeow
TEXT=current.txt
COLOR="0xFFFFFF"
BCOLOR="0x000000"

ffmpeg -re -f alsa -i hw:Loopback,1,0 -framerate 10 -f image2 -loop 1 -i image.jpg -filter_complex overlay -stream_loop -1 -i $VID \
-c:v libx264 -preset veryfast -b:v 1984k -maxrate 1984k -bufsize 3968k -vf "scale=1280:-1,format=yuv420p" -g 20 -c:a aac -b:a 128k -ar 44100 \
-vf drawtext="fontfile=/usr/share/fonts/truetype/slant.ttf:bordercolor=$BCOLOR: borderw=1: fontcolor=$COLOR:textfile=$TEXT:reload=1:y=10:x=5:fontsize=38" \
-f flv "rtmp://live.restream.io/live/$STREAM_KEY" \

2> log_stream.txt

Output:
Only '-vf drawtext=fontfile=/usr/share/fonts/truetype/slant.ttf:bordercolor=0x000000: borderw=1: fontcolor=0xFFFFFF:textfile=current_song.txt:reload=1:y=10:x=5:fontsize=38' read, ignoring remaining -vf options: Use ',' to separate filters
Filtergraph 'drawtext=fontfile=/usr/share/fonts/truetype/slant.ttf:bordercolor=0x000000: borderw=1: fontcolor=0xFFFFFF:textfile=current_song.txt:reload=1:y=10:x=5:fontsize=38' was specified through the -vf/-af/-filter option for output stream 0:0, which is fed from a complex filtergraph.
-vf/-af/-filter and -filter_complex cannot be used together for the same stream.

I seem to be running into problems --> what problems?

Sorry, I've updated the main post


text:
What pixel count is required for a near perfect digital copy of an old movie?
I stupidly posted this on Photography SE yesterday evening. I'm posting now in a more appropriate place.
I've been trying to get my hands on some of the very best digital versions of some classic movies recently. (As well as some which aren't classics; they're just old!) The question I'm trying to answer at the moment is: How high does the pixel count need to be to make sure that, within reason, the most faithful possible digitisation has been achieved?
To pick a concrete example: What pixel count would be required for a near perfect digitisation of Casablanca (1942)? Would it be different for Total Recall (1990)? What about a TV movie from the 70s?
I've read that, in principle, an image of 70mm film is capable of holding about the same level of detail as a 8640p digital image. (I'm very happy to be corrected on that point.) After few hours of looking through different digitisations of various old movies, it seems that, in practice, film often gives a level of resolution well short of 8640p. With some old movies digitised to 1080p, if you gradually blow up a still, you can see the image start to become "hazy" long before you can see any pixellation. With some movies, you can even observe that effect at 720p.
A select few movies - these are always more obscure titles - look like all possible detail has been squeezed out of them even at 480p, and they're so obscure that I'd struggle to get hold of a 720p version to check. Is it wishful thinking to imagine that, in some cases, a 480p digitisation could be very faithful?

Most film prints for projection in movie theaters yielded about 2K resolution, a.k.a. FullHD. If scanned from a clean film, 4K can be attained. 480p is about the same as mid-20 century 16mm film. By the end of 20th century 16mm cameras and film reached almost the level of mid-20 century 35mm film, which is to say, FullHD. I would say that for older movies it does not make much sense to go beyond 720p, but it makes sense to ensure there is enough bitrate to avoid macroblocking.

In reality, I think the other forum was a good place to ask. But people there tend to vote to close the moment they see the word "video" :o)

It is a bit complex to answer. And old movie could probably not have a sharp focus because of the lens, or the grain of the film. Probably there are inconsistencies in the filming across all the movie.
Even today some scenes in some movies are filmed using normal digital film and some other action scenes could be filmed in Imax.
And because you did not have pixel-peeping mania like some times we have.

You could find some papers, like the ones Xiota pointed in the other forum, stating that film can hold information on XXX Mpx. I have not seen a real-life comparison making large prints using both media in equal conditions, probably using the same lens.
There is a difference between the theoretical limit vs the real-life limit. You can argue that the size of the silver crystals is the real limit, but in reality, it is "only" grain.

To answer this you would probably need to know

The size of the frame.
The grain of the film, probably based on the ISO.
Lens used.

Not only the year of production, but that would give you some hints.
But there is more to it, mainly if the scanning has a post-process.
Here is a restoration, reescalation and re-fps-action of the "arrival of the train" The Lumière Brothers, 1896.

Regarding the "60p" restoration: first, it is not a digitization of the original film at 4K, but interpolation, adding new information where there was not any. Also, no matter how the author of this restoration claims that it looks like 60p, it does not. Yes, there are some fake frames inserted, still there is not enough original information and not enough AI power to fill in the blanks so to speak.

Yes, but at the end there are new methods to make a sharper images.


text:
Record two audio sources as separate tracks?
I wrote a script to record my computer screen, my computer audio (The audio coming out of my speakers), and my microphone using ffmpeg:
ffmpeg -video_size 1920x1080 -framerate 60
-f x11grab -i :0.0
-f pulse -i default
-f openal -i "Monitor of Headset H390 Analog Stereo" \
-c:v libx264rgb -crf 0 -preset ultrafast video.mkv

It records the video correctly, but not the audio. Only the first audio source (my microphone) is recorded. If I swap the order of -f pulse -i default and -f openal -i "Monitor of Headset H390 Analog Stereo", only my computer audio is recorded. How can I record my computer audio and my microphone at the same time? (Preferrably to different tracks so I can change the volume individually while editing.)
My operating system is Linux Mint 5.3.0-51.
ffmpeg log:
ffmpeg started on 2020-05-17 at 17:07:47
Report written to "ffmpeg-20200517-170747.log"
Command line:
ffmpeg -video_size 1920x1080 -framerate 60 -f x11grab -i :0.0 -f openal -i "Monitor of Headset H390 Analog Stereo" -f pulse -i default -map 0 -map 1 -map 2 -report -c:v libx264rgb -crf 0 -preset ultrafast [FILE PATH]/clips/clip_7.mkv
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Splitting the commandline.
Reading option '-video_size' ... matched as AVOption 'video_size' with argument '1920x1080'.
Reading option '-framerate' ... matched as AVOption 'framerate' with argument '60'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'x11grab'.
Reading option '-i' ... matched as input url with argument ':0.0'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'openal'.
Reading option '-i' ... matched as input url with argument 'Monitor of Headset H390 Analog Stereo'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'pulse'.
Reading option '-i' ... matched as input url with argument 'default'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '2'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'libx264rgb'.
Reading option '-crf' ... matched as AVOption 'crf' with argument '0'.
Reading option '-preset' ... matched as AVOption 'preset' with argument 'ultrafast'.
Reading option '[FILE PATH]/clips/clip_7.mkv' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url :0.0.
Applying option f (force format) with argument x11grab.
Successfully parsed a group of options.
Opening an input file: :0.0.
[x11grab @ 0x55b2144705e0] Probe buffer size limit of 5000000 bytes reached
[x11grab @ 0x55b2144705e0] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, x11grab, from ':0.0':
  Duration: N/A, start: 1589753267.078638, bitrate: N/A
    Stream #0:0, 1, 1/1000000: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 60 fps, 1000k tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: input url Monitor of Headset H390 Analog Stereo.
Applying option f (force format) with argument openal.
Successfully parsed a group of options.
Opening an input file: Monitor of Headset H390 Analog Stereo.
[openal @ 0x55b2144799a0] All info found
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, openal, from 'Monitor of Headset H390 Analog Stereo':
  Duration: N/A, start: 1589753267.137538, bitrate: 1411 kb/s
    Stream #1:0, 1, 1/1000000: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Successfully opened the file.
Parsing a group of options: input url default.
Applying option f (force format) with argument pulse.
Successfully parsed a group of options.
Opening an input file: default.
[pulse @ 0x55b21448eca0] All info found
Guessed Channel Layout for Input Stream #2.0 : stereo
Input #2, pulse, from 'default':
  Duration: N/A, start: 1589753267.142149, bitrate: 1536 kb/s
    Stream #2:0, 1, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Successfully opened the file.
Parsing a group of options: output url [FILE PATH]/clips/clip_7.mkv.
Applying option map (set input stream mapping) with argument 0.
Applying option map (set input stream mapping) with argument 1.
Applying option map (set input stream mapping) with argument 2.
Applying option c:v (codec name) with argument libx264rgb.
Successfully parsed a group of options.
Opening an output file: [FILE PATH]/clips/clip_7.mkv.
[file @ 0x55b2144af2c0] Setting default whitelist 'file,crypto'
Successfully opened the file.
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264rgb))
  Stream #1:0 -> #0:1 (pcm_s16le (native) -> vorbis (libvorbis))
  Stream #2:0 -> #0:2 (pcm_s16le (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x55b214479380] PACKET SIZE: 5184000, STRIDE: 5760
detected 4 logical cores
[graph 0 input from stream 0:0 @ 0x55b2144b49c0] Setting 'video_size' to value '1920x1080'
[graph 0 input from stream 0:0 @ 0x55b2144b49c0] Setting 'pix_fmt' to value '298'
[graph 0 input from stream 0:0 @ 0x55b2144b49c0] Setting 'time_base' to value '1/1000000'
[graph 0 input from stream 0:0 @ 0x55b2144b49c0] Setting 'pixel_aspect' to value '0/1'
[graph 0 input from stream 0:0 @ 0x55b2144b49c0] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x55b2144b49c0] Setting 'frame_rate' to value '60/1'
[graph 0 input from stream 0:0 @ 0x55b2144b49c0] w:1440 h:900 pixfmt:bgr0 tb:1/1000000 fr:60/1 sar:0/1 sws_param:flags=2
[format @ 0x55b2144b3500] compat: called with args=[bgr0|bgr24|rgb24]
[format @ 0x55b2144b3500] Setting 'pix_fmts' to value 'bgr0|bgr24|rgb24'
[AVFilterGraph @ 0x55b2144b37c0] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
[libx264rgb @ 0x55b2144a9660] using mv_range_thread = 72
[libx264rgb @ 0x55b2144a9660] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264rgb @ 0x55b2144a9660] profile High 4:4:4 Predictive, level 4.2, 4:4:4 8-bit
[libx264rgb @ 0x55b2144a9660] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=0 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=0
Clipping frame in rate conversion by 0.000008
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[graph_1_in_1_0 @ 0x55b2145a0ae0] Setting 'time_base' to value '1/44100'
[graph_1_in_1_0 @ 0x55b2145a0ae0] Setting 'sample_rate' to value '44100'
[graph_1_in_1_0 @ 0x55b2145a0ae0] Setting 'sample_fmt' to value 's16'
[graph_1_in_1_0 @ 0x55b2145a0ae0] Setting 'channel_layout' to value '0x3'
[graph_1_in_1_0 @ 0x55b2145a0ae0] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
[format_out_0_1 @ 0x55b2145a0e60] Setting 'sample_fmts' to value 'fltp'
[format_out_0_1 @ 0x55b2145a0e60] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[AVFilterGraph @ 0x55b21459fc00] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto_resampler_0 @ 0x55b2145a3120] [SWR @ 0x55b2145a34c0] Using s16p internally between filters
[auto_resampler_0 @ 0x55b2145a3120] ch:2 chl:stereo fmt:s16 r:44100Hz -> ch:2 chl:stereo fmt:fltp r:44100Hz
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[graph_2_in_2_0 @ 0x55b214624420] Setting 'time_base' to value '1/48000'
[graph_2_in_2_0 @ 0x55b214624420] Setting 'sample_rate' to value '48000'
[graph_2_in_2_0 @ 0x55b214624420] Setting 'sample_fmt' to value 's16'
[graph_2_in_2_0 @ 0x55b214624420] Setting 'channel_layout' to value '0x3'
[graph_2_in_2_0 @ 0x55b214624420] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
[format_out_0_2 @ 0x55b214608180] Setting 'sample_fmts' to value 'fltp'
[format_out_0_2 @ 0x55b214608180] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_2'
[AVFilterGraph @ 0x55b214633380] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto_resampler_0 @ 0x55b214605300] [SWR @ 0x55b21464fd20] Using s16p internally between filters
[auto_resampler_0 @ 0x55b214605300] ch:2 chl:stereo fmt:s16 r:48000Hz -> ch:2 chl:stereo fmt:fltp r:48000Hz
Output #0, matroska, to '[FILE PATH]/clips/clip_7.mkv':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0, 0, 1/1000: Video: h264 (libx264rgb) (H264 / 0x34363248), bgr0(progressive), 1920x1080, q=-1--1, 60 fps, 1k tbn, 60 tbc
    Metadata:
      encoder         : Lavc57.107.100 libx264rgb
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1, 0, 1/1000: Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 44100 Hz, stereo, fltp
    Metadata:
      encoder         : Lavc57.107.100 libvorbis
    Stream #0:2, 0, 1/1000: Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 48000 Hz, stereo, fltp
    Metadata:
      encoder         : Lavc57.107.100 libvorbis
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x55b214479380] PACKET SIZE: 5184000, STRIDE: 5760
[x11grab @ 0x55b2144705e0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x55b214479380] PACKET SIZE: 5184000, STRIDE: 5760
Past duration 0.835838 too large
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x55b214479380] PACKET SIZE: 5184000, STRIDE: 5760
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x55b214479380] PACKET SIZE: 5184000, STRIDE: 5760
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x55b214479380] PACKET SIZE: 5184000, STRIDE: 5760
*** dropping frame 4 from stream 0 at ts 82
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x55b214479380] PACKET SIZE: 5184000, STRIDE: 5760
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x55b214479380] PACKET SIZE: 5184000, STRIDE: 5760
*** dropping frame 5 from stream 0 at ts 83
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x55b214479380] PACKET SIZE: 5184000, STRIDE: 5760
*** dropping frame 5 from stream 0 at ts 83
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x55b214479380] PACKET SIZE: 5184000, STRIDE: 5760
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x55b214479380] PACKET SIZE: 5184000, STRIDE: 5760
Clipping frame in rate conversion by 0.550987
*** dropping frame 6 from stream 0 at ts 84
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x55b214479380] PACKET SIZE: 5184000, STRIDE: 5760
[libx264rgb @ 0x55b2144a9660] frame=   0 QP=0.00 NAL=3 Slice:I Poc:0   I:5130 P:0    SKIP:0    size=381047 bytes
[matroska @ 0x55b2144a7b60] get_metadata_duration returned: 0
[matroska @ 0x55b2144a7b60] Writing block at offset 9, size 1, pts 0, dts 0, duration 3, keyframe 1
[matroska @ 0x55b2144a7b60] Writing block at offset 16, size 43, pts 0, dts 0, duration 3, keyframe 1
[matroska @ 0x55b2144a7b60] Writing block at offset 65, size 381569, pts 3, dts 3, duration 17, keyframe 1
[rawvideo @ 0x55b214479380] PACKET SIZE: 5184000, STRIDE: 5760
[rawvideo @ 0x55b214479380] PACKET SIZE: 5184000, STRIDE: 5760
Past duration 0.748894 too large
*** dropping frame 8 from stream 0 at ts 86
[libx264rgb @ 0x55b2144a9660] frame=   1 QP=0.00 NAL=2 Slice:P Poc:2   I:2951 P:292  SKIP:1887 size=88367 bytes
[matroska @ 0x55b2144a7b60] Writing block at offset 381643, size 1, pts 3, dts 3, duration 13, keyframe 1
[matroska @ 0x55b2144a7b60] Writing block at offset 381650, size 198, pts 3, dts 3, duration 12, keyframe 1
[matroska @ 0x55b2144a7b60] Writing block at offset 381855, size 190, pts 15, dts 15, duration 21, keyframe 1
[matroska @ 0x55b2144a7b60] Writing block at offset 382052, size 1, pts 16, dts 16, duration 23, keyframe 1
[matroska @ 0x55b2144a7b60] Writing block at offset 382059, size 192, pts 36, dts 36, duration 21, keyframe 1
[Repeated a lot of times]
[matroska @ 0x55b2144a7b60] Writing block at offset 171, size 1, pts 5517, dts 5517, duration 23, keyframe 1
[matroska @ 0x55b2144a7b60] Writing block at offset 178, size 1, pts 5540, dts 5540, duration 23, keyframe 1
[matroska @ 0x55b2144a7b60] Writing block at offset 185, size 1, pts 5564, dts 5564, duration 23, keyframe 1
[matroska @ 0x55b2144a7b60] Writing block at offset 192, size 1, pts 5587, dts 5587, duration 6, keyframe 1
[matroska @ 0x55b2144a7b60] end duration = 5593
[matroska @ 0x55b2144a7b60] stream 0 end duration = 4787
[matroska @ 0x55b2144a7b60] stream 1 end duration = 5593
[matroska @ 0x55b2144a7b60] stream 2 end duration = 4567
frame=   41 fps=9.5 q=-1.0 Lsize=    1760kB time=00:00:05.58 bitrate=2581.4kbits/s dup=0 drop=105 speed=1.29x
video:1707kB audio:41kB subtitle:0kB other streams:0kB global headers:8kB muxing overhead: 0.677361%
Input file #0 (:0.0):
  Input stream #0:0 (video): 146 packets read (756864000 bytes); 146 frames decoded;
  Total: 146 packets (756864000 bytes) demuxed
Input file #1 (Monitor of Headset H390 Analog Stereo):
  Input stream #1:0 (audio): 22 packets read (773588 bytes); 22 frames decoded (193397 samples);
  Total: 22 packets (773588 bytes) demuxed
Input file #2 (default):
  Input stream #2:0 (audio): 20 packets read (876288 bytes); 20 frames decoded (219072 samples);
  Total: 20 packets (876288 bytes) demuxed
Output file #0 ([FILE PATH]/clips/clip_7.mkv):
  Output stream #0:0 (video): 41 frames encoded; 41 packets muxed (1747992 bytes);
  Output stream #0:1 (audio): 3021 frames encoded (193344 samples); 191 packets muxed (191 bytes);
  Output stream #0:2 (audio): 3423 frames encoded (219072 samples); 223 packets muxed (41851 bytes);
  Total: 455 packets (1790034 bytes) muxed
188 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x55b2144af5a0] Statistics: 16 seeks, 18 writeouts
[libx264rgb @ 0x55b2144a9660] frame I:1     Avg QP: 0.00  size:381047
[libx264rgb @ 0x55b2144a9660] frame P:40    Avg QP: 0.00  size: 34161
[libx264rgb @ 0x55b2144a9660] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264rgb @ 0x55b2144a9660] mb P  I16..4: 50.9%  0.0%  0.0%  P16..4:  1.5%  0.0%  0.0%  0.0%  0.0%    skip:47.6%
[libx264rgb @ 0x55b2144a9660] coded y,u,v intra: 4.3% 1.1% 2.3% inter: 2.1% 0.3% 1.0%
[libx264rgb @ 0x55b2144a9660] i16 v,h,dc,p: 98%  2%  0%  0%
[libx264rgb @ 0x55b2144a9660] kb/s:2922.60
Exiting normally, received signal 2.

You need to map all streams, so
ffmpeg -video_size 1920x1080 -framerate 60
-f x11grab -i :0.0
-f pulse -i default
-f openal -i "Monitor of Headset H390 Analog Stereo"
-map 0 -map 1 -map 2
-c:v libx264rgb -crf 0 -preset ultrafast video.mkv

See http://ffmpeg.org/ffmpeg.html#Stream-selection for how ffmpeg automatically selects streams when map is absent.

The same problem still happens.

Share full log.

The video now has two separate audio tracks, but one is completely silent. The other one is the first source in the command.

Share full log.

What do you mean by a "full log"? ffmpeg doesn't output a log as far as I know.

The log refers to the stderr console output generated by ffmpeg. You can also add -report to save it to file.

Apparently it works now... That's strange.


text:
Playing a 3D video with ffplay and Stereo3d filter, produces different playback than ffmpeg encoded version with same filter
I have a 3D video showing curved playback at the edges when playing it a on a flat screen. I'm trying to convert it to 2D using FFMPEG with the help of Stereo3d filter. By applying the filter to FFPLAY, the video is played back exactly of what is expected off the filter, i.e the curves at edges are gone and become plane. Here is command code for playing:
ffplay "in.mp4" -vf stereo3d=sbsl:ml

Encoding the video with same filter using different presets for libx264 or h264_qsv encoder, produced a video with same curved edges!!! Just like the stereo3d filter acts as a crop filter cropping the video correctly, resizing and adjusting aspect ratio, but didn't transform curved edges to plane one. Command code for encoding is:
ffmpeg -i "in.mp4" -vf stereo3d=sbsl:ml -metadata:s:v:0 stereo_mode="mono" -c:v h264_qsv -preset veryslow "2D.mp4"

Any idea how to get this done correctly with FFMPEG package for Win10-64bit? or perhaps with another tool.
Thanks,
Edit:
As about my question for FFplay output, it was a mistake!!! due to the wide size of the output, my display didn't show video edges and tricked me :) When I toggled FFplay to full screen, the output was same as encoding process output.

The following link shows a picture of how the input source file is played back.
https://i0.wp.com/echeng.com/wp-content/uploads/2019/09/peak-oculus-1.png?w=750
I meant by "curved edges" are the black elliptic shapes at left/right sides of both side by side videos,  as well as the left/right side video has up/down edges curved or stretched in spherical way.
I hope this will help, thanks .. @PaulB.Mahol

@PaulB.Mahol, Thank you very much for pointing to v360 filter, it wasn't enabled in FFmpeg package v.4.2.2 for Windows, but I got it and now digging FFmpeg documentations for v360 input/output parameters, trying to understand what they mean.
Can FFmpeg detect if the source is SBS VR 180 degree? or I have to tell that through v360 input parameter?
Then, what FOV degree is equivalent to view a non-stereoscopic video? a zero degree?

I too have met this problem and am scratching my head.
But I found one solution, once converted to h.265 and then to h.264, it worked.


text:
ffmpeg vertical pan over an image (top to bottom scrolling effect)
I have a UHD wide image (3840px) which is very tall (11568px). I'd like to make a video like this:

3840 x 2160 resolution, mp4 output file
starts and ends black
image takes up full width of the UHD frame
top of the image appears at the bottom of the video frame and "scrolls up" until the bottom of the image disappears past the top of the video frame

It would be ideal if each step of the scroll shifted the image up 48px. But if it goes up 1 pixel every step because that's easier to script I can live with that. I'm trying to emulate something like an ANSI scroller where each line would present itself one at a time over a 28.8kbps modem after logging into a BBS
I have found some similar questions asked but haven't figured out what parameters to tweak for the particular effect I've described. Horizontal scroll question on reddit. Ken Burns Effect Slideshows with FFMPeg blog post.
Thanks in advance for any help/direction

Create a canvas of output size and use an animated overlay to simulate a scroll.
ffmpeg -f lavfi -i color=s=3840x2160 -i UHDimage -filter_complex "[0][1]overlay=x=0:y=H-48*n" -vframes 242 out.mp4
Output duration is clamped to 242 frames = (11568/48)+1.

Thanks for this idea! When I try it myself I get an unplayable 48kb out.mp4. Does it look like I'm running the command correctly (I've only changed the input file name). https://pastebin.com/vFptHzAV

The pastebin error looks like it was an issue with PowerShell. When I ran the command using FFMPEG on my OSX machine it worked great! Only tweak I made was to clamp -vframes to 287 so that the image scrolls entirely off the screen (back to black) so that it loops seamlessly.

Follow up question: is there a way to specify how long each video frame lasts? I'd like the end movie to be 120 seconds long. Thank you!

Duration of a frame is the reciprocal of the framerate. Default framerate is 25 for color. Add r=20 to change to 20 fps.  But I suggest you modify the 48 instead to control movement speed.


text:
How do I get Windows Media Player and other tools that depend on system codecs to play this video file?
I have a video file that plays fine in VLC, but only shows 100% black frames in Windows Media Player, and in other applications that depend on system codecs (for example in MATLAB, which is where I need to load this video). The audio plays fine in either case.
I am running Windows 10. VLC says that the video codec is "Codec: H264 - MPEG-4 AVC (part 10) (H264)".
Windows Media Player provides the following list of video codecs installed:

Here is the output of ffprobe on the video:
>ffprobe example_video.avi
ffprobe version git-2020-05-28-c0f01ea Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200523
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 49.100 / 56. 49.100
  libavcodec     58. 89.100 / 58. 89.100
  libavformat    58. 43.100 / 58. 43.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 83.100 /  7. 83.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[avi @ 000002127a03fe00] decoding for stream 0 failed
Input #0, avi, from 'mergeWrite_19129058_merged_2019-11-26-16-45-12-536196.avi':
  Metadata:
    encoder         : Lavf58.20.100
  Duration: 00:00:04.08, start: 0.000000, bitrate: 451526 kb/s
    Stream #0:0: Video: h264 (High 4:4:4 Predictive) (H264 / 0x34363248), yuv444p(progressive), 1280x1024, 456108 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 22050 Hz, stereo, fltp, 64 kb/s

Do you think installing a new codec would help? Can anyone point me towards a place to get them that doesn't seem really sketchy? Thank you!

H264 is bog standard, the windows player should be able to play it. But to answer your question, the K-lite codec pack is good. TBH it looks kinda sketchy — that website — but it's not, has been around for decades and is used by millions of people. https://www.codecguide.com/download_kl.htm

@stib Thank you. I looked around at other people's experiences with that website, and there are a lot of reports of malware being bundled with downloads...so I'm a little wary of that.

Can anyone point me to a tool or procedure I might use to diagnose exactly why this H264 video plays correctly in VLC but is all black frames in WMP? Thanks!

I'm a professional editor, I've been using it for about a decade, as have around 3.7 million other people. But always good to be wary. Only download it from the codecguide site, or using chocolatey or a trusted package manager. If you want to know exactly what's going on, I'd suggest ffprobe, which is part of ffmpeg. https://ffmpeg.org

Thank you for the vote of confidence in codecguide.com, and for the suggestion. I added the output of ffprobe on the video - not sure what to make of "decoding for stream 0 failed". Maybe there's an ffprobe option that would give more details?

I don't think windows media player can play yuv444p h.264 video, that's a relatively new addtion to the format and not in common use. You could convert to a more vanilla yuv420p mp4 using ffmpeg -i example.avi eaxample_copy.mp4 This will be at the expense of some quality though.

Thank you!! That was the problem. I tried converting the videos to yuv420 and it opens correctly in WMP. If you'd like to turn your comment into an answer, I'll accept it.