text:
What is the meaning behind video and audio framerates being different?
I am doing some transcoding via ffmpeg and am noticing video and audio FPS differing greatly. During playback there is no issue, everything is working as expected. So I am trying to understand what it means for audio to be at much higher framerate and how audio is not going out of sync due to that?
Thank you.
Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 46 min 12 s
Width                                    : 852 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Writing library                          : x264 core 152 r2854 e9a5903
Encoding settings                        : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=9 / lookahead_threads=3 / 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=1 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Default                                  : Yes
Forced                                   : No

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : A_AAC-2
Duration                                 : 46 min 12 s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Delay relative to video                  : -104 ms
Writing library                          : Lavc57.107.100 aac
Language                                 : English
Default                                  : Yes
Forced                                   : No

Audio data consists of samples. The sampling rate indicates the number of samples per channel in one second. But when dealing with audio, applications read and process samples in chunks. These chunks are the frames. The AAC encoder uses 1024 Samples Per Frame. So, the audio "Frame Rate" is Sampling rate/1024 for AAC audio. This is not related to video frame rate.


text:
How to cut MPEG and H.264 files frame-accurately without re-encoding?
Occasionally, the video-files need to be cut to keep only the relevant parts. Thus, how does one go about cutting the common video files (H.264, MPEG) without any re-encoding and thus quality loss?

Avidemux is the perfect tool for this. It's also free, open source and available for Windows, macOS and Linux. And is quite user-friendly compared to other similar softwares.
AVC (H.264) and HEVC (H.265) encoded videos have certain complete frames (keyframes) that are called I-frames or Intra Frames.
To ensure that you don't have to re-encode a video when you delete some some portions of it, just make sure that you select and delete the portion of video between two I-frames. In Avidemux, after opening the video:
(1) Ensure the output is lossless (without rencoding) by selecting Copy in the drop-down menu under 'Video Output' and 'Audio Output' (on the left-hand sidebar).
(2) Then select  (or delete) part of the videos between keyframes. Avidemux makes finding keyframes or I-Frames very easy - just open the video in it, and use the UP or DOWN arrow keys to move between keyframes. To select a portion of video between keyframes, use the UP and DOWN arrow keys on your keyboard to find the first keyframe of the video portion, and click the [A button on AviDemux. Then use the UP and DOWN arrow keys to again move to the final key frame of the video portion, and click the ][B button on Avidemux. This will select the portion of video between the 2 keyframes.
(3) You can now either delete this portion (and then save the rest of the video) or click save to just extract and save this selected portion of the video. In both cases, if you have made sure to selected between the keyframes, no re-encoding will be done or Avidemux will warn you that you haven't selected between keyframes.
More information on how to cut or extract videos on Avidemux can be read here - Simple cutting on Avidemux.

Another free and opensource software that is capable of doing lossless video and audio editing is LosslessCut. It seems to have slightly better editing features like, for example, allowing you to rearrange the order of video / audio segments. It is regularly updated and available on all platforms too. The only con is that it is an Electron app and thus unnecessarily big and a resource hog on older computers.

Upvoted, thanks for sharing info!

Thanks. If this answered your question, please also mark it as the accepted answer by clicking the checkmark next to the answer (below the downvote arrow). See What does it mean when an answer is "accepted"? to learn more.

Hey @sfxedit , you miss the point! Much of thew lossless information is obscure, and the point of question is not to have the 'best' answer but to collect information in one place. If there's going to be an even better answer (or perhaps my answer may be better) - then why should it be less 'accepted'?

@tabdiukov The primary manner SE works is the question and answer format. If somebody posts a better answer, you can mark that as the accepted answer later. But from what you have described, what you desire is a community wiki. (See What are "Community Wiki" posts?. For this, you should make a request here https://video.meta.stackexchange.com/ and if the mods are satisfied they can convert this post to a wiki.

Sorry for the delay - done

Update: Solution does NOT work with H.265
One solution that has proven to be stable and fast over the years is to use Fame-Ring Smart.Cutter. The software is natively designed to perform frame-perfect cuts without quality loss or re-encoding.
It is recommended to disable "audio VU meter" in program settings to improve stability, (learn more)
Ever since Windows 7, the software is reported to crash, especially when seeking too fast. It's possible to avoid crashes either by seeking slowly or by using an XP VM.

source: Stack Exchange

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

sort: votes


text:
After Effects rotate hotkey
Was looking for hotkeys to ease working in AE and found a bunch but for rotation, it only allows 1 or 10 degrees at a time.
Is there any hotkey to rotate the layer by 0.1 or 0.5 degrees?
Or is there any way to hack/customize it?

this script rotates the currently selected layer(s) 0.1 degree clockwise. Save it as rotate_0.1_cw.jsx and then add it to a hotkey. Change the line var inc = 0.1; to var inc = -0.1; save as rotate_0.1_ccw.jsx and add it to another hotkey. Rinse, repeat.
// @target aftereffects
(function () {
    var theComp = app.project.activeItem;
    if (theComp) {
        var theLayers = theComp.selectedLayers;
        for (var i = 0; i < theLayers.length; i++) {
            if (theLayers[i].transform.rotation.numKeys) {
                theLayers[i].transform.rotation.setValueAtTime(theComp.time, theLayers[i].transform.rotation.value + 0.1);
            } else {
                theLayers[i].transform.rotation.setValue(theLayers[i].transform.rotation.value + 0.1);
            }
        }
    }
})()

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


text:
I have .mpd file with video and audio data downloaded, how can I play it for offline use?
I want to ask that I have downloaded data which contains audio and video data separately like 1.mp4, 2.mp4 etc in both audio and video folders.

Video/Audio folder content :-

I also have it's .mpd file. How can I play this video ? or is there any way I can combine both videos and audio files in a single one. Single file for e.g. 1.mp4 video or audio nothing seem to play.

Here is the simplest FFmpeg command that should get you a working mp4 file:
ffmpeg -i master_480.mpd -c copy master_480.mp4


text:
Converting Video from 30 fps to 29.97fps so Audio Syncs to Other 29.97fps Videos with ffmpeg
I have three videos that I am trying to sync so I can setup a multi-camera editing project (I'm using Vegas Pro)
Two are at 29.97fps and one is at 30fps. If I manually sync them all at the start, by the end of the clip, the 30fps video has drifted slightly out of sync.
I've tried a few different things (manually dropping the odd frame and resyncing the clips, compressing the time of the clip so it syncs up at the end). These work, but they require quite a bit of work when editing lots of clips, so I'm looking for a way to streamline my workflow.
I've been fiddling with ffmpeg to find a simple command to convert the 30fps footage to 29.97 (I was hoping it would be possible without re-encoding it).
I've tried a few things including:
ffmpeg -i <input> -filter:v fps=29.97 <output>
But that doesn't change the audio or overall time of the video, so the audio still drifts out of sync.
Is someone able to help me identify what the correct ffmpeg command would be to convert the video so that it syncs with my other tracks?
(As an aside, the reason I've ended up in this mess is that I'm using iPads and iPhones for the footage. Every iOS device I've used produces video at 29.97 fps, except for one of the iPads which always produces video at 30fps. I have no idea why as it's the same model and running the same version of iOS, but for some reason, it's different from every other device and no amount of fiddling with the settings seems to change it)

I always prefer to use more precise framerate values in my calculations: 29.97 is 30000/1001.
Your command (ffmpeg -i <input> -filter:v fps=29.97 <output>) changes the amount of frames per second but the presentation time stamps (PTS) remain the same and that is the reason why duration of the video does not change. You need to change PTS as well:
-vf "setpts=PTS*((30000/1001)/30),fps=30000/1001"

Audio needs a separate filter:
-af "atempo=(30/(30000/1001))"

The command to change your video framerate from 30 to 29.97 should look like this:
ffmpeg -i input.mp4 -vf "setpts=PTS*((30000/1001)/30),fps=30000/1001" -af "atempo=(30/(30000/1001))" output.mp4

Thanks so much! This has got me on the right lines. It still doesn't quite line up, but it is shorter. I need to do a bit of fiddling to work out why this hasn't worked for my videos, but it looks like it's got me on the right tracks

@Simon "It still doesn't quite line up" - maybe your hardware use some other value than 30000/1001 for 29.97? You can try to re-encode your videos to make them all use some natural number as the framerate (instead of the fraction) to see if that helps.

Yeah, that's what I thought. I'll do some experiments and figure it out - but those commands were the ones I was missing! Thanks very much.


text:
What cameras/setup can record 10-12 hours long continuous video in very wide angles in high resolutions without being physically humongous?
My aim : (purpose - long drive activity)

to record a 10-12 hour long video (not a time lapse)
possibly ultrawide (upwards of 130 degrees or something like a super-view from GoPro)
higher resolutions upwards of 2k or 2.7k
physical size not too Huge (not aiming for bigger than around 10x8x5 inches in general)
Cannot Spend More Than $1200 Just For Camera Unit Alone.
not overtly complex to set up and control

My Flexibilities :

Am willing to get a big power-bank (already have a 600-750 Amps battery jumper of my car that can power most of my electronics for 10 hours straight)
Am willing to get high quality max-memory storage cards
Am ok with it being a dash cam, rash cam, stash cam or mickey-mouse's twinkle eyes for that matter (i believe you get the point). Could be any category of cam.

My research so far :
I searched twice for around 3 to 4 days on the internet on this matter but couldn't find any valuable clarity of guidance and gave up today. Mostly found people frantically sharing what they know in the world and having nothing to do with the context/matter of the question. for eg :- found individuals who started describing how handsome Brad Pitt would look in a specific lens as opposed to another specific lens (which obviously had nothing to do with the question).
From my search, the only helpful and relevant pages I found were the following :

https://photo.stackexchange.com/questions/109226/do-camcorders-shoot-longer-video
https://photo.stackexchange.com/questions/34811/how-can-i-record-long-videos-on-my-eos-7d
https://photo.stackexchange.com/questions/34863/can-i-charge-my-camera-while-it-is-taking-a-video
GoPro Fusion extended recording?    (very close but not quite there, no way for me to confirm)
https://camerajabber.com/buyersguides/best-4k-cameras-for-shooting-video/
https://www.digitalcameraworld.com/buying-guides/best-compact-camera
https://www.quora.com/How-do-I-record-a-video-for-10-hours-straight
https://www.dpreview.com/forums/thread/4040987    (this link was the closest to my aim except his case is theatre setting and mine is a milder case of a driving cockpit without sudden changes in lighting. In my case, it will only be gradual natural changes in lighting as the day passes and transitions into evening and then night)

   (this person was the closest to my context, but he replied to my question saying 'it is possible but only remote chances with lowest resolution')

My Thots : (layman level)

Would a newest model of GoPro be able to do this? (thinking if I remove battery and connect to power-bank the whole time)
Are there dash cams which can do this?
If yes, then what are the cautions do I need to take?
Are there rental services for this kind of tech?

Can i achieve this task? Really want to know before I start buying a wrong setup only to fail and suffer some un-reasonable expenditure per my current budget.

Partial, started as a comment but anyway:
If its  a driving setup, surely dash cams are a route to look at:

Recording times would only be limited by card capacity (can be set to overwrite or just stop when full).
Wide angle, wide dynamic range.
Powered constantly via USB to vehicle.
Not large.
hi res (but..)

The -but- with dash cams is that the camera tech is lower quality video compared to GoPro even though it might be hi-res.
I do not have a specific model to look at because the market is saturated.
Just need to look at the higher spec ones.
Heres an example:

BlackVue DR900
8 megapixels CMOS sensor recording in 4K Ultra High Definition (3840x2160) at 30FPS
162-degree angle takes full advantage of the 4K UHD resolution
128 gig sd card – 4K UHD @ 30 fps – 10HR 40Min
7.64 x 4.84 x 3.9 inches
1.65 pounds
$600 (i think with card)

I think this has been out for a while, so there are a few variations of it.
But yeah, this is what I do for long drive recording.
But before dashcams and GoPro were a thing:
I recall doing a setup like this many decades ago, for recording military ops, which of course required wide angle, long periods of recording and was not too large (mounted on BA, kpots, weaps, etc ). This was of course before GoPro, but to a degree, GoPro would still not suite your needs due to limitations of recording times. I looked at new cheap tech and ended up with hard drive video recorders, custom battery banks, and bullet cameras, the latter kept the size down but i needed cables to battery and hard drive recorder packs. For even smaller and longer, I also tried early CCTV tech.  - but this was for wearing it. Sounds like you're in a vehicle, so less of an issue.

Clarification :
This is really helpful information.
So then if choose to upload this 4K-UHD-30fps video to Youtube for my future use, would the video quality still look good after the youtube's compression kicks in? or would it become ruined/horrendous ?.
Basically, i will upload it to youtube to empty the space in my memory cards for next. I am ok if the quality goes down slightly BUT i Dont want it to look horrible. i am ok AS LONG AS the vid looks not the highest but still high quality n clear with negligible stretching or pixelating or blurring u know what i'm'sayin?

I have heard from people that when you upload a dash cam video to youtube the quality becomes horrible or you get a lot of sun glare/reflection if you are opp to sun etc etc. I dont want to face that. See, as long as a 4k becomes 3.2K or smthing i am ok with it...........
Also in that case what would your opinion or recommendation be? a GoPro Hero 10 plugged to power source with max quality memory card ,      OR       , A Latest BlackVue DR 900/1000/1million. I ask so much bcz it is my first time.

@CodeMan the only future use for a video on Youtube is for final viewing, you could not use it after that for editing or processing - thats where you need to save the original files - those are the files you work with. Never use YT as a storage option. Anyone will tell you thats a huge nope. If you need to dump and run, dump to a portable hard drive - get multiple cards and just swap them out, dump when you got more time, to a drive (either self contained or via pc).

Glare and reflection - better dashcams will cope with it better but unlikely to eliminate, but you will have that whatever camera you choose. You can't avoid it if you're going to shoot into the sun or whatever. Whether GoPro or dashcam or anything else, YT will squeeze the life out of it. Quality-wise, GoPro is always better but won't have the recording time, dashcam, despite being hi res, will always be inferior, but gives you the recording time. For recording and storage - multiple cards and hard drives every time.

ahh, this is extremely helpful and gives me clarity. It seems like i might have to go with a GoPro plugged into the power source for the whole time because my end goal is to have a clean/clear watch quality when i upload and avoid pixelation or stretch-up or any kind of blurr or similar downgrading.  Maybe i will have to point AC vent to it directly and switch memory cards with multiple 512 GBs.  The blackvue option is very attractive tho, its just that i am concerned about end visual quality. VHTY.

@CodeMan No probs. Just make sure to store the original files safely on a drive. Just a caveat - I used to run a couple of the older GoPros - if they ran for a long time the whole thing tended to overheat - like real hot - so running something for a long time, that is not meant to do so, might be damaging. If you're serious about GoPro for long periods, I would run multiple ones, swap them over to give the overheating ones a rest... Gives you back up options if one bites the dust too..

yes understood, will keep it in mind.

A software-side comment:
I have a note for you that might be helpful, but it only addresses a narrow section of your question and might not be what you're looking for. I'll share in case you're interested.
If the camera hardware you obtain is able to be used as a webcam (i.e., you can plug it in as a USB and it is selectable on your computer), which seems to be possible with a GoPro after a quick google search, a rather minimal Python script using the OpenCV module can collect either individual frames* or segments of video**. Making your own software can really cut down on costs and also allows you to control finer aspects.
Note that this all could be managed with a Raspberry Pi and an external hard drive, which might just barely fit within your size requirements.
Hope this helps!
*easier to store on hard drive, and don't require footage gaps, but requires converting back to video, but that's not too bad
**ready-made video files, but might require small gaps in footage (a few seconds at most) to allow for the computer to save video files

Yes, this is definitely very helpful. Yes i agree it is a great idea to get a script going which can manage storage, with the webcam mode that wud be less resource hungry than other modes. This was good to know and will keep in mind proceeding with my decision.


text:
Multiple animations using the same assets
So I've just started using AE and was wondering what the best way to organise multiple animations was?
So in this case I have a source file (PSD with multiple layers) and I'm playing around doing different animations on the same assets. What I've been doing is dragging the PSD composition down to the timeline and just turning the visibility off on the ones I've already completed.
For this kind of thing is that okay? What about for bigger projects, would it be better to have a separate file for each animation?

I'm happy to share my project folder structure with you. This is what I've used in my professional work for years:

The '_main_comp' is made of the parts. As a soft rule, parts are to generally be kept to below 30s in length or a max of 100 layers. I had noticed that performance tends to drop swiftly if you have too many layers in a single comp.
For the assets, 'AI' is for Adobe Illustrator, 'PSD' is for Photoshop Document and 'AE' is for when you need to import other After Effects files into the current one.
If you are still doing a lot of experimenting, you could also add a 'TESTS' folder where you could keep them all organised. Be warned that AE's performance could also drop dramatically if your project file starts to get too bloated with assets and comps. What I would do if that happens, is to save a new version of my project and strip out anything that I think I no longer need. Though you definitely don't want to create a new file for each experiment, as there are going to be times where you want to copy/paste from one to another. Just keeping good organisation, with good naming conventions should be enough.
Using an underscore is a great way of keeping important or more commonly used things at the top of the stack.


text:
How to move all video files with mp3 audio?
My folder has some video files with mp3 audio and some video files with aac audio. I want to move all files which have mp3 audio to another folder. When I asked my friend, he gave me this script:
mp3ToAAC.sh
#To convert mp3 audio to AAC
for file in *;
do
    if [ $file == "mp3ToAAC.sh" ]; then
        continue;
    fi
    if [ -f "$file" ]; then
        ffmpeg -i "$file" -acodec aac -vcodec copy ../"$file"
    fi
done

That will convert all video files with audio mp3 to aac. Before using this, I want to move the files which have mp3 audio to another directory. I want to run this script only on those files. How to do that?

I think that the question has an error. I shall ask the OP to correct it.
The code to move files is:
#To move mp3 video to parent
for file in *;
do
    if [ "$file" == "moveMp3.sh" ]; then
        continue;
    fi
    if [ -f "$file" ]; then
        audioFormat=$(ffprobe -loglevel error -select_streams a:0 -show_entries stream=codec_name -of default=nw=1:nk=1 "$file")
        if [ -z $audioFormat ]; then
            continue;
        fi
        if [ $audioFormat == "mp3" ]; then
            mv "$file" ../"$file"
        fi
    fi
done

The code to convert mp3 can be:
#To convert mp3 audio to AAC
for file in *;
do
    if [ $file == "mp3ToAAC.sh" ]; then
        continue;
    fi
    if [ -f "$file" ]; then
        ffmpeg -i "$file" -map 0 -c copy -c:a:0 aac ../"$file"
    fi
done


text:
How can I convert and reduce the size of a ts video?
I have season 21 of the Air Crash Investigation TV program. Each episode is around 40-50 minutes and in ts format, but it is around 2.4 GB which is unacceptable. I have 2-3 hours movies that are less than 1.5 GB.
So my question is that how can I end up with video files of around 500 MB (or less) and resolution of 720p with any format?
Thanks

Use software such as Handbrake to compress the files.
Compression is a trade off between file size and video quality.
You can choose how much compression to use in the app by adjusting the quality.


text:
How do I verify that the H264 video stream is encoded with a single slice per frame?
I'm a software tester and I need to test a certain requirement for a vehicle camera that I'm not sure on how to test.
As in the title it's to verify that each frame is encoded with a single slice. This is done for more efficient encoding.
AVTP/h264, configured with high profile, to have only I-frames, progressively encoded.
I'm not that knowledgeable with imaging and video streaming, so any help would be appreciated.

You can use ffmpeg (and grep) to do this.
Run
ffmpeg -i H264file -c copy -bsf:v trace_headers -f null - 2>&1 | grep first_mb_in_slice
This should print out lines of the form
[trace_headers @ 000002087b24c3c0] 8   first_mb_in_slice                     1 = 0
[trace_headers @ 000002087b24c3c0] 8   first_mb_in_slice     00000000101000001 = 320
[trace_headers @ 000002087b24c3c0] 8   first_mb_in_slice   0000000001010000001 = 640

If each frame is a single slice then ALL lines will have value 0 (1 = 0) for first_mb_in_slice. A non-zero value indicates sliced encoding.

Thank you. This is helpful and does workout.


text:
How to avoid black frames with ffmpeg "trim" filter?
When using trim to crop the start and end of a video, the frames leading up to my "crop start" time are static instead of removed.  However, the frames following the "crop end" time are correctly removed.
To clarify- if the input is 10s, crop start is 2s, crop end is 5s, I expect a 3s video.  Instead I get a 5s video, where 0-2s are black frames.
What part of my command could be causing this?
const args = [
    // '-ss',           // not helping
    // `${trimStart}`,  // not helping
    '-i',
    `${file.path}`,
    '-filter_complex',
    `\
        [0]split[body][pre];\
        [pre]trim=duration=${crossfadeDuration / 2},\
        format=yuva420p,\
        fade=d=${crossfadeDuration / 2}:alpha=1,\
        setpts=PTS+(${trimStart + newDuration - crossfadeDuration / 2}/TB)[jt];\
        [body]trim=${crossfadeDuration / 2},\
        setpts=PTS-STARTPTS[main];\
        [main]trim=start=${trimStart}:duration=${newDuration}[main];\
        [main][jt]overlay,${filter}\
        fps=${fps < 24 ? fps : 24},\
        crop=trunc(iw/2)*2:trunc(ih/2)*2,\
        setsar=1:1`,
        // '-an',       // not helping
        // '-shortest', // not helping
        '-y',
    `${out}`,
]

For context- my app is adding seamless loops to videos with an interactive trimmer.  Here is a GIF of what the above command currently does:

I suspect it has to do with PTS, but I'm really struggling to wrap my head around which PTS settings do what depending on their order, especially when dealing with multiple streams of varrying length.

https://ffmpeg.org/ffmpeg-filters.html#trim

Also note that this filter does not modify the timestamps. If you wish for the output timestamps to start at zero, insert a setpts filter after the trim filter.

Add setpts=PTS-STARTPTS after your trim filter


text:
Idea validation - CRF's as a service
I was looking for validation for my startup idea. Please flag if this is off-topic.
Idea: CRF's as a service - When encoding h.264 and libvpx videos, I tend to guess good Constant Rate Factors(CRF's) to make my videos smaller. I bet you guys experience the same. Instead of guessing, why not send the video to a dedicated 'crf-finder' then encode it later? The "crf-finder" would take a single video frame and find the best crf value.
Questions

Do you think this is dumb?
How much would you pay for this?
This is my landing page. Perhaps you could look at it, subscribe to my mailing list or even try it out. I'm not charging - only trying to figure out if this is useful.

This is what crf-finding looks like

I assume you want to identify the CRF value that will either achieve a target file size or a target score on a quality metric like PSNR or VMAF.
However, a single frame is not enough to assess that.
The obtained average bit rate for a CRF encode of a file depends on the visual texture complexity and motion within each scene. So, you would need to process a set of representative range of frames from each scene. That doesn't fit with your proposal which appears to be a rapid assessment tool that looks at one frame (on a mobile device?).
There is an appreciable need for such a service, but it would run on the final encoding machine and examine the whole file, so probably a piece of software or script.

Thank you! I appreciate this.

Yes, it's rapid assessment on a mobile device. My target video consumer would be anyone watching a video on a mobile phone.


text:
Convert MP3 to MP4 looping black video with FFMPEG
Currently I am converting MP3 to MP4 black video using following command line in Windows Registry:
C:\Program Files\ffmpeg\bin\ffmpeg.exe -loop 1 -i "C:\Program Files (x86)\Utilities\BlackVideo\black640x480.png" -i "%1" -c:v libx264 -tune stillimage -shortest "%1.mp4"

It works fine, but FFMPEG isn't that smart to just encode a chunk from keyframe to keyframe and then repeat it without encoding. Instead, every second of the video is encoded, which is slow and causes unnecessary CPU load.
To solve this problem I created a black video with no sound for the first 10 seconds. Now I'm looking for the right FFMPEG command line options to loop this video without re-encoding for as long as the MP3 track lasts.

Use this command to generate a black video for wide playback compatibility.
ffmpeg.exe -loop 1 -i "C:\Program Files (x86)\Utilities\BlackVideo\black640x480.png" -pix_fmt yuv420p -t 10 -c:v libx264 black.mp4
and then
ffmpeg.exe -stream_loop -1 -i "black.mp4" -i "%1" -c:v copy -shortest -fflags +shortest -max_interleave_delta 200M "%1.mp4"
You will need ffmpeg 4.3 or later.

MP4. Corrected.

Thank you. I tried to understand the combination of -shortest and +shortest but didn't prevail. It just works.


text:
Why does this script reduce the bitrate of both the video and the audio stream?
I wrote the following script that is meant to remove the unnecessary audio streams, aka dubbing, as well as subtitles from
the movies in my collection:
#!/usr/bin/bash

echo "What is the path to the source file?"
read if
of=$(echo "${if}"|sed -E 's/(\.)([avimp4kv]{3,3}$)/\1stripped.\2/')
echo "What is the number of the audio stream that you want to copy?"
read no

ffmpeg -v 0 -i "${if}" -map 0:v -map 0:${no} "${of}"

My intent is to save on storage while preserving the original quality of both video and audio stream of my choice.
I noticed that the reduction of the size of the media files is very large. For example:
Todo_Sobre_Mi_Madre_(1999).avi that has 1.4GB and the following streams:
Input #0, avi, from 'Todo_Sobre_Mi_Madre_(1999).avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
  Duration: 01:41:24.67, start: 0.000000, bitrate: 1936 kb/s
    Stream #0:0: Video: mpeg4 (DX50 / 0x30355844), yuv420p, 720x304 [SAR 1:1 DAR 45:19], 1539 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 30k tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:2: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 192 kb/s

was converted to Todo_Sobre_Mi_Madre_(1999).stripped.avi of only 248MB with the following streams:
Input #0, avi, from 'Todo_Sobre_Mi_Madre_(1999).stripped.avi':
  Metadata:
    encoder         : Lavf58.29.100
  Duration: 01:41:24.75, start: 0.000000, bitrate: 341 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 720x304 [SAR 1:1 DAR 45:19], 200 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 24k tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s

I noticed the unintended reduction of the bitrate of both the video, from 1539 kb/s to just 200 kb/s and the audio stream, from 192 kb/s to just 128 kb/s. The resolution remained unchanged. What am I doing wrong? How might I utilize ffmpeg and its -map option to accomplish my goal?

Next time posting, please always include all the ffmpeg output, not just the parts you think are relevant. Thanks!

You need to add -c copy to make ffmpeg copy the bitstreams as-is. This is also called remuxing.
Otherwise it will default to re-encoding each stream, and the chosen defaults usually mean a rather low bitrate (and, consequently a reduction in quality.)
For more info, see the FFmpeg wiki entry on selecting streams.


text:
what the difference between 24/30/60 frames per second in the context of a 7 day/night time lapse video?
So I am looking to record a time lapse video with my used GoPro Hero 7 black that will capture 7 days and nights worth of video of my sprouts under the grow lights, with the final product being a 12 second video. I have been told it depends on whether I want to do 24fps, 30 or 60, but I do not know what the qualitative difference would be as I am a complete beginner.

When you record a timelapse video over a long period of time, you usually only take a single image, then pause for a specific length of time, then take the next image.
Frames per second are usually only considered when you choose to play back these images afterwards.
In the GoPro Hero 7 Black manual, on page 108 it explains how to set the delay time on a time-lapse.
If you want to record over 7 days and nights, to create a 12 second video at 30 frames per second, you would calculate it like this:

A 12 second video at a playback speed of 30 frames per second = 12 x
30 = 360 frames in total.
So recording over 7 days = 7 days * 24 hours * 60 minutes = 10,080
minutes in total.
10080 / 360 = 28 minutes between each image taken
28 * 360 = 10,080 minutes total

You can always choose to take images more frequently (I would, but this requires more storage space).
You can always dispose of them if you don't want to use them, but it gives you the option to either make your time-lapse longer if you decide to later, or to use a higher playback frame rate.
In terms of using other playback frame rates - if you record at 24 or 60 fps, you would need these interval times:

12 * 24fps = 288 frames needed
12 * 60fps = 720 frames needed
10080 / 288 = 35 minute interval
10080 / 720 = 14 minute interval

Other tips:

Use a tripod.
Test the lighting conditions and think about exposure levels on the camera.
Fixed exposure is better than variable so long as it is correctly set.

I am truly a noob, could you expand more by what you mean with "exposure levels"?

You don’t want the sensitivity to light adjusting constantly in your time lapse as it will cause flickering. If your source of light in the video is constant, it’s less of an issue, but if there is natural light in the video (eg a window in the room), the light levels will change over the course of the day, so you need to decide what level of exposure to use in your time lapse. https://en.wikipedia.org/wiki/Exposure_(photography)


text:
How can I build a MOV (QT-rle) file with minimal unnecessary features?
I understand that my title requires further specification, so allow me to elaborate.
I recently finished a model in Blender and rendered 1000 frames to PNG with alpha. The total size was roughly 2 GB for all frames.
However, attempting to store them as a MOV file (QT-rle video codec, no audio) results in a whopping 5 GB file. That's two and a half times the original frames' storage size, for the exact same frames.
I imagine that this is because MOV is an extremely inclusive container with an extremely inclusive chosen codec, and PNG may use a compression scheme that it does not... but beyond an alpha channel, I'm not sure I need any of these things. It would be just as easy to just use the lossless PNGs, wouldn't it?
Normally I would blow this off as the price of video editing, and just delete the file when I know I'm done with it...the problem is, I can't even play it back, full speed, on my computer without it frequently pausing to buffer more of the file into memory. This makes it very difficult to work with, and this is not a slow computer. It's perhaps a year old.
Why does QT-rle in MOV take so much space? How can I adjust its features to take up less? For now, I'm sticking with Matroska/H.264 and PNGs, but the format is likely preferred for a reason and I would like to understand what I'm looking at here.
Thank you kindly.
EDIT: After further research, apparently "rle" stands for "run length encoding". This makes sense, as I've also seen it called "Quicktime Animation", and this style of encoding would do well for drawings with large swatches of consistent color across rows, but terribly for high-detail or HDR images. This might be what I'm looking for... I just chose an inappropriate format, which is bending over backwards to handle my not-animated-looking video. Further study will tell.

OK, I've come to understand the issue with QT-rle, and it isn't that it isn't compressed; it's that it's the worst kind of compression for the type of video I'm making.
QT-rle uses "run length encoding", which relies on long strips of pixels having the same color. In videos in which major hue, saturation, and lightness changes are regular, it packs the file with metadata which inflates its size to unusable levels. If I were working with an animation that had vast patches of solid colors, it would likely work better.
So, that's why I'm dealing with crippling file sizes. Alternatives include storing frames as JPEG2000 or PNG, as I will be now, or other video codecs which happen to include an alpha channel; though there are admittedly few. The other possibility is to composite the alpha to a mask video and use that in post.


text:
Stack two videos side and side but play one after another. Show thumbnail when not playing
I have two videos, that i want to concatenate side by side but second one should play after the first one. If the video is not playing, thumbnail should be shown
Below is the example that i want to achieve using ffmpeg https://twitter.com/sunmor2901/status/1520024861619658752

ffmpeg -i left.mp4 -i right.mp4 -i -filter_complex "[1:v]tpad=start_mode=clone:start_duration=5[rvideo];[1:a]adelay=5s:all=true[raudio];[0][rvideo]hstack[vout];[0:a][raudio]amix[aout]" -map "[vout]" -map "[aout]" output.mp4
You have to manually set the delay of the second (right) video from the 5 seconds in the example.

Thanks above works if both videos are of same resolution. How can i concatenate two videos of two different resolutions along with above effect.    Also, I would like to add small  text below the video describing what the video is all about (as seen in sample video link in question) ..  Is all this possible in one command?


text:
ffmpeg subtitles background issue when multiple lines (using .srt format)
While using ffmpeg to burn .srt subtitles to mp4 files I'm having an issue with multiple text lines  - background is overlaying each other.
Command I'm using:
ffmpeg -i source_video_path.mp4 -vf "subtitles=srt_source.srt:force_style='OutlineColour=&H80000000,BorderStyle=3,Outline=1,Shadow=0,MarginV=25,Fontname=Arial,Fontsize=10,Alignment=2'" video_destination.mp4

Question is - is it possible to overcome the overlay while still having a transparent background while using .srt format or I need to use .ass format as a fix?

You can avoid multiple lines overlaying each other by using BorderStyle=4 together with BackColour=&H80000000 which gives a 50% opaque black color background.
Full command would be:
ffmpeg -i source_video_path.mp4 -vf "subtitles=srt_source.srt:force_style='OutlineColour=&H80000000,BorderStyle=4,BackColour=&H80000000,Outline=0,Shadow=0,MarginV=25,Fontname=Arial,Fontsize=10,Alignment=2'" video_destination.mp4

How to increase the margins to have bigger outside area with those settings? While setting outline=5 I get funny looking outlines which are less transparent than that area which I wanted to get bigger.

Ok, found the way. OutlineColour=&HFFFFFFFF,BorderStyle=4,BackColour=&H44FFFFFF,Outline=6,Shadow=0,MarginV=10. Increased outline and set outline color to full transparency.


text:
Live rotoscoping software (bonus: with reaction to sensor input)
Here's the setup I would like to achieve / the UX I am thinking of having in the end:

Let there be a canopy swing with three seats in front of a green screen.
Any seat is equipped with a sensor, telling me if someone occupies the seat or not.
Sensors tell me the current deflection of the swing.
I have a camera set up in front of the swing delivering a live video feed into my computer.
I have three different 3D modeled characters (people), for example in a game engine. These can programmatically move around in the scene and "sit" on the swing.

Depending on the number of available seats, whenever at least one person sits down on the swing, I would like to live rotoscope-in the missing number of 3D actors (one real person = two 3D actors, two real persons = one 3D actor, three real persons = no 3D actor).
Is there such a software/software bundle/known software setup to achive this?

Research so far:

Adobe After Effects seems to be post-production only, ie. non-live.
Silhouette FX - ditto.
DAZ 3D. Possible candidate, but the manufacturer never answered my emails asking if the above can be achieved.
Blender. Can do my 3D characters but doesn't have any rotoscoping functions.

You seem to be a little confused on what "rotoscope" means, or I'm not understanding the question here. Rotoscoping is tracing an outline of a subject in a video, for purpose of masking or animating. What you seem to be describing here is compositing, which you'll find is a lot easier to research. You may want to look into how to composite 3D characters from a game engine (say, Unreal Engine 4) into a live video scene, which will probably answer your question. For example, UE4 has a tool called "Composure" that allows you to achieve something similar. Here's a guide to get you fully set up.


text:
Is it possible to increase horizontal and vertical padding on ffmpeg burned subtitles - using .srt format?
Using command :
ffmpeg -i source_video_path.mp4 -vf "subtitles=srt_source.srt:force_style='OutlineColour=&H80000000,BorderStyle=4,BackColour=&H80000000,Outline=0,Shadow=0,MarginV=25,Fontname=Arial,Fontsize=10,Alignment=2'" video_destination.mp4

I get

Ideally I would like to increase the subtitles background padding - especially horizontally.

You need to increase value of shadow, like "Shadow=10" and you will add padding to your BG.

Here you can read more about this.
As I know, no way to change x,y axis separately for BG size.


text:
Does any record exist of the animation techniques used producing Disney's Bambi?
I know the movie is old, but if there's so much as a production book of the film it would assist me a great deal.
I'm attempting to confront all of the areas in animation which I'm inexperienced with, which has involved going back to a lot of classics. I have to say, holy hell, I'm watching it again now and I have no idea how they did some of that at the time. An example would be the rippling water reflections or the path of the raindrops rolling off of the plants—I have no idea how they figured that out without modern computer-aided animation. I need to know.
Do any records exist of either Bambi's behind-the-scenes production specifically, or failing that, the techniques used in early Disney animation studios? Where can I find them?
Thank you kindly.

The 'The Illusion of Life: Disney Animation' book by Frank Thomas & Ollie Johnston is a great resource for this.  It's available in hardback, and online in many places.
It covers Bambi directly, and all the classic Disney animation techniques.
Disney's multi-plane camera film is also well worth a watch:

They mention Bambi directly at 4m30.

Thank you for such a prompt answer! I was worried this wasn't well-defined enough for Stack Exchange.

It’s really interesting to see how the Multiplane Camera technique is similar to some ideas in After Effects - 2.5D / “postcards in space”

Layering I'm somewhat familiar with, though it's interesting that they painted some of those frames directly on glass. (I thought they looked like oil.) It's still a staple in compositing and animating today. However, when it comes to things like the rain running along the plants, and the implied need for the Art Director to double as an air-traffic-controller to get it to work right... let's just say I would have loved to be a fly on that wall.

The thing about painting on the back of glass [or cellulose] is it gives a punch to the colour you don't see so well from the front. There's also no paint thickness variation or reflectivity changes in brush strokes to be picked up on camera. Disney sell those as 'Sericels' if you want to see one for real. Repros start at about $2-300, you can't afford the real ones ;) I have a repro Tinkerbell on my wall here. It's beautiful.


text:
FX Console plugin for After Effects not working on M1 Macs
The (very useful) VideoCopilot plugin FX Console doesn't appear to work with M1 Macs with After Effects CC 2022.  Is there any workaround?
When you open the plugin in After Effects, this error appears as the window tries to draw:

It seems they’ve just announced updated M1 versions of most of their plugins, including FX console:
https://www.videocopilot.net/products/m1/

You are my hero. This answer should be accepted.

You can open the Intel version of AE via the CC App Panel as a workaround.

Run After affect Intel version in Creative Cloud App.
Creative Cloud App > Apps > All apps > After effect > Button (...) > Open (Intel)
Done!

AEscripts - QuickMenu. Decent replacement. Does a bit more. Can apply stuff to multiple layers etc. I swapped over to it today and it works great as I' not sure FX Console would ever get updated....

I've bought it - it feels slower to respond than FX Console... (Might be because I'm doing stuff in the background maybe)


text:
Parallel throughput of Intel QuickSync (QSV) for real time streams
I'm using Intel QuickSync to lower CPU loading of real time video transcode with FFmpeg.
Specifically, qsv is used to deinterlace and decode the input video. A special HW module is used for the encoding side.  It works very well, but I'd like to do many streams in parallel (ie, launch multiple FFmpeg processes each transcoding different streams)
My question is: what is the capacity limit of quick sync?  What is it limited by?
The Intel documentation is not very clear other than it uses the internal GPU within the CPU, but not much more.
For example, picking a random i9 CPU from Intel's website says it:

supports QuickSync
has Intel® UHD Graphics 770

But that's about all.  Searching for specs on UHD Graphics 770 only gives a list of CPUs which support it but does not explain anything about the quick sync capabilities.
So, other than trial and error, how would I calculate how many streams are possible with QuickSync on a given CPU?

FFmpeg command line something like:
ffmpeg -loglevel info \
  -hwaccel qsv -c:v h264_qsv \
  -i udp://224.0.0.1:10001?fifo_size=1000000 -map 0:p:72 \
  -c:a aac -b:a 64k \
  -c:s copy \
  -c:v special_hw_encoder \
  -b:v 4M \
  -filter_complex [v:0]deinterlace_qsv,scale_qsv=w=1280:h=720:format=rgb32:mode=hq,hwdownload,format=rgb32,format=yuv420p \
  -flush_packets 0 \
  -f mpegts \
  -mpegts_copyts 1 \
  -mpegts_flags initial_discontinuity \
  -muxrate 5M \
  'udp://239.0.0.1:11001?pkt_size=1316&fifo_size=1000000&bitrate=5000000'

It depends on a lot of factors, but mainly the codec, bitrate and resolution of the source and output files. Unfortunately, I don't know of any websites that catalog the performance of quicksync, but you'll find a lot of user experiences when searching "plex quicksync (CPU model) max streams". Plex is a media player that uses a slightly modified version of ffmpeg to transcode media so it's compatible on client devices.
For instance, this user was able to get 24 1080p to 720p transcodes (mix of H264 and some HEVC) at 1.12x using a 9600k. There's another discussion that's in line with what you're requesting but unfortunately, it doesn't exist or no one has been able to find the data.
The performance will be limited by the iGPUs "Graphics Max Dynamic Frequency", which in the case of the 12900k has a base clock of 300MHz and a max of 1.55GHz. But as you know that doesn't exactly translate to real-world performance.

Thanks!  The info from u/r34p3rex is quite promising. The search term is promising.  I'll post back here anything I find.


text:
Manual Lens Distortion - Continuously Stretching Image
I have an image that has lens distortion on it (barrel or pincushion). This image is used as the background image. I want to get another image, scale it down, layer it on top of the first image, and then have it slide across the screen automatically. Assume this second image has no lens distortion.

In order to make it look very accurate, I need to stretch the image out as it moves from edge to edge. For example, if the background image had barrel distortion, then any two arbitrary reference points on the foreground image should be wider apart in the middle of the image, but closer together on the edges.

I know how to stretch images, but how do I do this on a continuous basis? Where every part of the foreground image is stretched depending on where it is in the background. I use After Effects.
Btw I cannot use lens distortion remover software. It has to be manually done in editing for other specific reasons.

You could use an adjustment layer with the bulge distortion effect or the bezier warp effect applied, and then animate the image underneath. If you don't want that same effect applied to the background, just precomp the image and the adjustment layer.


text:
Manual fade-in/fade-out expression in ffmpeg is not smooth
I want to fade-in/fade-out the saturation of a video based on the time (t). For three videos, the saturation should fade in and fade out at different points in time, starting with 0, 6, and 12 seconds.
Here is the script, using 1.5 seconds for fade-in and 2.0 seconds for fade-out. Each video should have saturation only for 6 seconds, with full saturation only for 2.5 seconds (6-2.0-1.5):
ffmpeg \
  -y \
  -f lavfi -i testsrc=size=640x480:rate=30:duration=18 \
  -f lavfi -i testsrc=size=640x480:rate=30:duration=18 \
  -f lavfi -i testsrc=size=640x480:rate=30:duration=18 \
  -filter_complex "
    [0:v]
      setpts=PTS-STARTPTS,drawtext=text='vid1 - %{pts}':fontsize=24:fontcolor=white,
      hue=s='clip(between(t,0,0+6) + ((t - 0)/1.5) * between(t,0,0+1.5) + (-(t-0+6)/2.0) * between(t,0+6-2.0,0+6), 0, 1)'
    [vid1];
    [1:v]
      setpts=PTS-STARTPTS,drawtext=text='vid2 - %{pts}':fontsize=24:fontcolor=white,
      hue=s='clip(between(t,6,6+6) + ((t - 6)/1.5) * between(t,6,6+1.5) + (-(t-6+6)/2.0) * between(t,6+6-2.0,6+6), 0, 1)'
    [vid2];
    [2:v]
      setpts=PTS-STARTPTS,drawtext=text='vid3 - %{pts}':fontsize=24:fontcolor=white,
      hue=s='clip(between(t,12,12+6) + ((t - 12)/1.5) * between(t,12,12+1.5) + (-(t-12+6)/2.0) * between(t,12+6-2.0,12+6), 0, 1)'
    [vid3];
    [vid1][vid2][vid3]
      hstack=inputs=3[out]" \
  -map "[out]" -pix_fmt yuv420p -f matroska - | ffplay -

The algorithm itself works, as I can use it in a Python program without problems. The issue is that the shift in saturation is instantaneous, i.e., the first video will have full saturation from 0-4, while it should have a fade-in and a fade-out with smooth transitions.
Why is that, and how can I fix it? It's not that t is integer-based … when I use pts*tb instead of t, the issue persists.

I had two errors in the script:

The first between() function should begin not at 0, 6, … and end at 6, 12, …, but have the fade-in duration added to it, i.e. between(t,0+1.5,0+6-2.0) for the first one, and stop at the end minus the fade-out time.

The calculation of the offset for the fade-out was wrong. Instead of (-(t-0+6)/2.0), the offset must be in parentheses, meaning I should use -(t-(0+6))/2.0) (as otherwise the sign is inverted).

Fully functioning code:
#!/usr/bin/env bash

ffmpeg \
  -y \
  -f lavfi -i testsrc=size=640x480:rate=30:duration=18 \
  -f lavfi -i testsrc=size=640x480:rate=30:duration=18 \
  -f lavfi -i testsrc=size=640x480:rate=30:duration=18 \
  -filter_complex "
    [0:v]
      setpts=PTS-STARTPTS,drawtext=text='vid1 - %{pts}':fontsize=24:fontcolor=white,
      hue=s='clip(between(t,0+1.5,0+6-2.0) + ((t-0)/1.5) * between(t,0,0+1.5) + (-(t-(0+6))/2.0) * between(t,0+6-2.0,0+6),0,1)'
    [vid1];
    [1:v]
      setpts=PTS-STARTPTS,drawtext=text='vid2 - %{pts}':fontsize=24:fontcolor=white,
      hue=s='clip(between(t,6+1.5,6+6-2.0) + ((t-6)/1.5) * between(t,6,6+1.5) + (-(t-(6+6))/2.0) * between(t,6+6-2.0,6+6),0,1)'
    [vid2];
    [2:v]
      setpts=PTS-STARTPTS,drawtext=text='vid3 - %{pts}':fontsize=24:fontcolor=white,
      hue=s='clip(between(t,12+1.5,12+6-2.0) + ((t-12)/1.5) * between(t,12,12+1.5) + (-(t-(12+6))/2.0) * between(t,12+6-2.0,12+6),0,1)'
    [vid3];
    [vid1][vid2][vid3]
      hstack=inputs=3[out]" \
  -map "[out]" -pix_fmt yuv420p -f matroska - | ffplay -

In the expr,
clip(between(t,0,0+6) + ((t - 0)/1.5) * between(t,0,0+1.5) + (-(t-0+6)/2.0) * between(t,0+6-2.0,0+6), 0, 1),
the first term will contribute 1 for the entire interval, and the fade-in clause can only add to that, and then ultimately get clipped to 1, so there's no progression for a fade-in to occur. For the fade-out, before clipping, the expr dips below 0 at once, and gets clipped to 0.
Use
hue=s=between(t\,0\,0+6) - (between(t\,0\,0+1.5)*(1-((t - 0)/1.5))+between(t\,0+6-2.0\,0+6)*((t-(6-2.0))/2.0))

Thanks for spotting this. I actually had not one but two (dumb) translation errors from Python to ffmpeg, that explains the issue (posted another answer with the correct solution based on the original filter).


text:
What is the effect used in movie gulliver's travels title cards
I am not a media professional, But kind of mind-blown by the effect used in the Gulliver's travels title cards (in the beginning)
Added few screenshots of it, As i couldn't find the right word to explain this effect.

So the questions are below,

What is it called?
Is there any software/mobile application/effects out there to produce it for mobile cam recorded videos ?

It's known as a tilt-shift, or miniature effect.
Essentially the focus is only sharp in the middle distance, both near & far are blurred. This mimics a shot of a toy town model shot from much closer.
Traditionally it's done with a lens that can actually tilt, but these days can fairly easily be done in post. To get the shot you need to be high up & a long way back, as you'd normally be looking down at toys, & you really need a long-ish lens to 'compress'* the distances to get the best effect.
I have a Nikon camera that can do this [in-camera post] to jpg, but not to video [or even RAW].
In post you can just blur a vignette, top & bottom - it looks most convincing if the field is actually not level, following the main central element of the shot. It's easy enough to experiment in post, as you don't have to commit until you're happy.
There's a decent workthrough on how to do this in Adobe AE [though it's simple enough to do in other suites] - Making a Tilt-Shift “Miniature Effect” Video: Practically and In Post
I also found this - 50 Beautiful Examples Of Tilt-Shift Photography - which personally (if I'm being generous;) I think is split maybe 50/50 with good ones & ones not so great. Study them to see what type of shot works best.
Just for fun, here's one I did in Photoshop in about 2 minutes [actually took longer to make sure the number plates aren't legible ;) from camera to posting. Just a shot of the traffic from my workroom window - nothing special, & I'm not really high enough up or far enough away to really make it work.

*It doesn't really compress, it just looks like it does. [Perspective 101]

Frankly speaking, pretty lot of information to process for me :). But thank you for spending the effort in explaining the details @Tetsujin

Have a look at the Netflix show, Love, Death and Robots - S03E04, Night of the Mini Dead. Even though it's all animation/CGI it is entirely shot with this look.

Sure will do, By any chance you aware any mobile application(I do understand, it is not the perfect option, But how much it is possible through software capabilities) which simulate this effect ?

I honestly don't know. I've never tried video editing on a mobile.


text:
Converted TS to MP4, what is the meaning of new (and multiple SAR, DAR ) in the output video?
I have a file with extension .ts, information given by ffmpeg -i MyMovieFile.ts is:
[mpegts @ 000001f8fc13fa80] start time for stream 0 is not set in estimate_timings_from_pts
Input #0, mpegts, from 'MyMovieFile.ts':
  Duration: 01:49:27.52, start: 0.000000, bitrate: 4319 kb/s
  Program 1
  Stream #0:0[0x102]: Data: timed_id3 (ID3  / 0x20334449)
  Stream #0:1[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1052 [SAR 997:1024 DAR 14955:8416], 25 fps, 25 tbr, 90k tbn
  Stream #0:2[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 191 kb/s

I converted to MP4 using ffmpeg with
-vf scale=1280:720 ^
-map 0:1 -map 0:2 ^
-c:v libx264 -c:a aac ^

After conversion, VLC codec information shows:
Video Resolution = 1280x720 (= Buffer Resolution).
I am happy with this result; If I now run the converted file thru ffmpeg -i, I get
 Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.24.100
  Duration: 01:49:27.52, start: 0.000000, bitrate: 2178 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 2206:2207 DAR 35296:19863], 2042 kb/s, SAR 28684:28697 DAR 458944:258273, 25 fps, 25 tbr, 12800 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]

My question is why am I getting two pairs of SAR/DAR
[SAR 2206:2207 DAR 35296:19863]
SAR 28684:28697 DAR 458944:258273

And would it be better to also specify the expected SAR,DAR during ffmpeg conversion?
For example, [SAR 1:1 DAR 16:9]

The values in the bracket comes from the stream decoder. The values may also be stored in the MP4 container, specifically the PASP box with a different precision. If they differ, ffmpeg will print both.
In this case, they differ at the 7th digit after the decimal point.
  2206/2207 = 0.9995468962392388
28684/28697 = 0.9995469909746663

That answers most of my question, the other part "would it be better to also specify the expected SAR,DAR during ffmpeg conversion" is YES, I have re-converted with two filters, scale + setdar=16/9 and now it only shows 1 pair of SAR,DAR


text:
Resultant Video is always longer than input audio, even though I am using -shortest option of ffmpeg
I am using the following command to make a video from a single image;
ffmpeg -loop 1 -i MyInputImage.png -i MyInputSound.m4a ^
  -c:v libx264 -pix_fmt yuv420p -c:a aac ^
  -shortest MyOutputVideo.mp4

Note that I have used the -shortest option;
But I have noticed my resulting video IS ALWAYS 2 seconds longer than my AUDIO length. Why ?
For example, if audio=5 secs, output vid lenght is 7 secs; if audio=9 secs, output video is 11 seconds long.

This was due to an imperfect implementation of -shortest, now rectified in version 5.0. So, upgrade.

ffmpeg -loop 1 -i MyInputImage.png -t 2 -c:v libx264 -pix_fmt yuv420p ^
   imagevideo.mp4

ffmpeg -stream_loop -1 -i imagevideo.mp4 -i MyInputSound.m4a ^
   -c copy -shortest MyOutputVideo.mp4

"ffmpeg -version" does not show version? ffmpeg version 2022-05-19-git-dd99d34d67-essentials_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 11.3.0 (Rev1, Built by MSYS2 project)
configuration: --enable-gpl
libavutil      57. 24.101 / 57. 24.101
libavcodec     59. 28.100 / 59. 28.100
libavformat    59. 24.100 / 59. 24.100
libavdevice    59.  6.100 / 59.  6.100
libavfilter     8. 38.100 /  8. 38.100
libswscale      6.  6.100 /  6.  6.100
libswresample   4.  6.100 /  4.  6.100
libpostproc    56.  5.100 / 56.  5.100

That's a git build from 2022-05-19 so newer than 5.0 which was released on 2022-01-14

FYI I accepted your answer, but It never resolved the issue, I just ignored the BUGGY shortest cmd; Today I tried again, my audio is 18 secs long, but the video is 20 secs long (exactly as per my original question); And I used the build exactly as you see in my previous comment.

Ok, so I rechecked and it seems the bug fix only works for streamcopy. Use commands in answer edit.

I don't understand your edited answer, you are doing a short video for 2 secs (-t 2) and then you are adding the sound and using -shortest. So the final output will always be 2 secs ? (even if the sound is longer)

Edited to add looping.

Ok makes sense now; I may as well just use my original question, and instead of using -shortest, I will use -t secs (because I already know the length of my audio)

You can still use -shortest in your original cmd but add -fflags +shortest -max_interleave_delta 200M

@Gyan 1) that only decreased the overextension for me, it did not eliminate it. 2) This is ridiculous.

I was lucky to find the version that works as expected. This one:

ffmpeg version 2023-04-17-git-65e537b833-essentials_build-www.gyan.dev

... or any other before Dec 2023
On my Win7, most recent (april-october 2024) builds together with some rare old ones (2017) give totally random lengths. Like, 6 minutes of still image may become a 19 minute video. These were tested and failed:

ffmpeg 2024-10-27-git-bb57b78013-essentials_build-www.gyan.dev
ffmpeg N-114545-g199c479b9a-20240331 by BtbN
ffmpeg N-86383-g4705edb

Also this workaround works in 2024. If we add two empty complex filters for audio and video, the total lengths become equal:
-filter_complex "[1:v]null[v]" -filter_complex "[0:a]anull[a]" -map "[v]" -map "[a]"

As for looping still images, there are at least three ways to achieve it in ffmpeg:

-loop 1
-stream_loop -1
-vf tpad=stop_mode=clone:stop_duration=3600100

Some may work in the given specific environment, some will fail. Curiously the last one used to give me a speed boost in 2023 build, but not in 2024.


text:
How do I increase the size of the black space, so I have more room to reposition these two clips?
I imported two clips into premiere pro, one is some dashcam footage, and the other is the screen recorded off my phone, where the screen shows a map.  (I got premiere pro to synchronise them by audio)  So regarding the two clips, we have the dashcam clip, and the phone screen clip.
I'd like to make both big and side by side..  Or make the dashcam one big and the screen one in the corner. I know there are options to position and scale, in effect controls.
But what I can do seems very limited, because I can only work within the black area, and the black area(within the program window) is so small. I need that black area to be much bigger, much wider, to give me room to put the two clips side by side or to experiment with how I position the two clips.
How can I widen that black area in the program window?

Create a new sequence with the dimensions you need by clicking on File —> New —> Sequence. Common sizes for HD video are 1920x1080 pixels or 3840x2160 for 4K.
Then drag your footage into this sequence. If you need to adjust the size, make sure your clip is selected in the sequence, then go to Effects Settings and adjust the Scale under the Motion settings.
Might be an idea to follow through all of the steps in this tutorial to get the hang of it first:
https://helpx.adobe.com/premiere-pro/using/creating-changing-sequences.html


text:
Suitable alternative to Quicktime RLE for alpha-containing non-cartoon videos?
I'm producing a product that involves a composition of several videos, over alpha layers, and there are surprisingly few options aside from image lists. Quicktime's RLE (Run-Length Encoding) codec allows for an alpha channel, but was designed for animation—the encoding is over single rows and relies on swaths of consistent color, which does not apply to my current video and results in an exorbitantly large file size, making it difficult or impossible to play back in real time on my machine.
Surely there are recommended and hopefully open formats which allow for alpha channels, but have a more reasonable compression scheme. Unfortunately I'm not sure what they are.
Is there a codec recommended for high-color-variation videos with alpha, which provides a workable size?

ProRes 4444 is the go-to for compressed encoding if you want alpha, and you’re doing the encoding on a Mac.  It’s not exactly lightweight in terms of file size, but it’s optimized for playback on Mac hardware.
OpenEXR is a heavyweight codec, used mostly in the VFX industry, is widely supported on different operating systems, and supports alpha and any number of auxiliary data channels, such as ones output by 3D rendering software.  It does support compression, but it’s not as playback-friendly as ProRes.

I've used OpenEXR before, I thought it was only capable of single frames per file though? Did I "whoosh" some important detail? I guess I could always just archive them and compress after the fact.

It’s often best practice to use image sequences instead of videos for compositing. It A) eliminates temporal artifacts B) simplifies the replacement of specific frame ranges, and C) allows resuming renders at the last complete frame in the event of a crash or interruption.


text:
Export Keyframes as Text (After Effects)
Given a list of keyframes, is it possible to download them or export them to be used elsewhere?

Yes it is.  When you select keyframes in After Effects, you can paste them into any text editor and modify them.
Below is a shaped with some position keyframes applied, copied, then pasted into TextEdit on the Mac:

You can tweak them in any editor, then return them back into After Effects, so long as you don't break the formatting.


text:
USB charger for GoPro -- I need 5V, 2A, but does the wattage matter?
I just got a Hero 9 and an Enduro battery.  It came with a USB cable but nothing to connect that cable to the wall socket.  I had thought that I could charge it with the computer, but apparently that's not recommended, as the laptop I had wouldn't (I was told) provide enough power.  I also thought that perhaps GoPro would sell what I needed, but apparently their SuperCharger isn't available, or at least not for the Hero 9.
The GoPro site says I need something that provides 5V and 2A.  I've tried to find that, but am having difficulty.  I went to some local stores, but was told that what they had was meant for mobile phones and would provide "too high" a wattage for a GoPro, and would damage it and/or the batteries.  The components that I found -- the ones that plug into the wall socket and have a spot to plug in the USB cable -- all were something like 15 to 20W.  I have no idea what I'm looking for in terms of wattage.
I would think that GoPro would provide a complete solution for charging their batteries.  Any suggestions much appreciated!

Wattage matters - it is inextricably tied to Voltage & Amperage.
Watts = Amps x Volts
Standard' USB power is 5V, 500mW - which is only 0.1A.
Many computers, especially since USB-C, can negotiate with a device to provide  higher power, but on USB2 really only Apple devices generally display that ability. It was added to them with the advent of the iPad, which needs more power than a phone.
You can get a stand-alone 5v 2.1A [10W] charger from just about anywhere these days, even supermarkets. it is a very common spec & should provide plenty of power for most devices.
It is not in any way 'dangerous' to have a higher Amperage in a supply than needed for the device. Amps are 'pulled' by the device, not 'pushed' by the charger.

Thanks -- but if it doesn't matter to have a higher amperage, does it matter to have a higher wattage?  That is, if it's 5V, would a higher amperage and higher wattage be OK, because it's a "current draw" situation, as you describe?

You can't do one without the other, as already explained. If voltage is your constant, the other two follow the equation.

Thanks.  What equation?  Ohm's law (V = IR), or another?

The one in the answer.

Sorry, my bad, I see it now.


text:
How can I apply a crop to frames before tiling with ffmpeg?
I'm using the following to build a preview filmstrip image by grabbing every Nth frame and tiling them into a grid:
ffmpeg -i "$file" -frames 1 -vf "select=not(mod(n\,$N)),tile=${COLS}x${ROWS}" -y strip.jpg

However the input video has black bars so I'd like to crop them out before grabbing those frames using something like:
-filter:v "crop=1440:1080"

Adding that has no effect on the tiled output image.  I have also tried incorporating that filter into the -vf option to no effect.  Is there any way to accomplish this without a second pass that renders the whole video (temporarily) cropped?  Thanks!

Simply insert crop after the select filter.
-vf "select=not(mod(n\,$N)),crop=1440:1080,tile=${COLS}x${ROWS}"

Thanks - I had tried that but my mistake was apparently that I was adding ":0:0" for the offset.  For some reason if I do that the crop does not apply in this context.


text:
h264/hevc: non-integer frame rates
I'm having a hard time understanding how non-integer frame rates are implemented in h264 and hevc.  For example, I just stepped through a 23.976fps video frame by frame using Shotcut, and looking at the timestamp of each frame, it looks like there are full 24 frames in each second.
How do they do it?  Do the encoders actually write 24 full frames per second to file? (What even would be a non-full frame?)  But that would mean, when playing at 23.976, that to play 1000 seconds you need to render 23976 frames.  But the file contains 24000 frames (does it?)  Do they just drop some frames?  Who does the dropping?  The player?  Or does the encoder drop a frame every n seconds?

It only looks like 24fps at first glance.  From the Wikipedia entry on SMTPE timecode, the section on drop-frame:
“In order to make an hour of timecode match an hour on the clock, drop-frame timecode skips frame numbers 0 and 1 of the first second of every minute, except when the number of minutes is divisible by ten.”
Check the first and second frame of each minute.
A clue that timecode is using drop-frame is when the separator before the frame number is a semicolon instead of a colon, although I’ve seen software ignore this convention.


text:
Using FFMPEG to convert an MKV with multiple subtitles, audio tracks and chapters to a plain mp4
I have MKV files which contain multiple subtitle options, multiple audio options, and multiple chapters.
I'm wanting to convert to MP4. The MKV's are x265 with DD 5.1. I just want x264 MP4's with plain stereo, no subs and the default audio.
All I can find is solutions for converting with hardcoded subs or specific audio tracks. I need all of that stripped away, and more importantly, x265 to x264.

There are multiple questions; I'll try to answer them separately for simplicity.
First of all, converting from mkv to mp4:
The easiest way would be something like this ffmpeg -i input.mkv output.mp4
This will cause ffmpeg to infer the format based on the filename and isn't always possible.
If you need to specify the type explicitly, you can add the parameter -f <format>.
In your case, something like this:
ffmpeg -f matroska -i input.mkv -f mp4 output.mp4
Note: The format before the input (-i) corresponds to the input format, while the format after the input corresponds to the output format.
Next, let's look at the codec:
FFmpeg uses a predefined codec by default; you can disable this by specifying the copy codec using -codec copy.
There are multiple options to specify a codec, depending on the scenario:

-codec copy Use the original codec for all mapped streams
-codec libx264 Convert all video streams to h264 (type of stream is deduced by the codec)
-vcodec libx264 Convert video streams to h264 (-acodec and -scodec for audio and subtitles, respectively)
-c copy Short for -codec copy
-c:v copy Short for -vcodec copy

In your case, something like ffmpeg -i input.mkv -c libx264 output.mp4 should produce the desired result.
Next, audio channels:
FFmpeg already integrates a downmixer; therefore, the standard solution is to use -ac 2 (Set the number of audio channels to 2).
As Dolby digital is probably not supported within mp4, you should change the audio codec as well:
ffmpeg -i input.mkv -c aac -ac 2 output.mp4
A much more detailed answer is provided here.
Next, chapters:
Removing chapters is relatively easy; adding the following option -map_chapters -1 will remove the Chapter-TOC from the output.
Last but not least, stream selection:
The simplest way of selecting a stream is by number, but there are multiple other options:

-map 0:0 use the first stream from the first input file
-map 0:v:0 select the first video stream from the first input file
-map -0:s everything except subtitles from the first input file
-map 0:m:language:eng select by language
-map 0:v:0? use the first video stream of the first input if exists

To conclude this answer, your final command should look something like this:
ffmpeg -i input.mkv \
  -map 0:v:0 \
  -map 0:m:language:eng? \
  -c:v libx264 \
  -c:a aac \
  -map_chapters -1 \
  -ac 2 \
  output.mp4

Output contains:

First video stream
English audio (if exists)
No chapters
Only two audio channels
video codec: h264
Audio codec: aac
Output format: mp4

Hope this helps, and I didn't miss any requirements

Thank you for your very detailed response. The solution was actually quite simple, just ffmpeg -i "C:\video.mkv" -c:v libx264 -c:a libfdk_aac -c:a copy "C:\video.mp4", but I've saved your reply for future use.


text:
Chose what to move and what not to move when synchronizing clips
In Premiere Pro, is it possible to choose which clips move and which is the one that stays put when synchronizing them?
The audio seems to be moved to match one of the videos, and I need the audio to stay put.

I believe I achieved this. When synchronizing, clips are never moved to the left, so I achieved by putting the audio that I wanted to keep still to the right of all the clips that I'm synchronizing to it. I also select it first, just in case.


text:
Is it possible to sync clips in Adobe Premiere Pro when there are more than one clip per track?
I have the recordings from 4 cameras. The recordings were broken into smaller files, something the cameras do by themselves, but the cameras were also turned on and off. I don't know when the boundaries between two consecutive clips is the automatic file cut or a camera on/off.
I want to do a pass watching all the footage on all the angles in multicam mode, to learn what's on each camera and start editing this. The problem that I'm having is that Adobe Premiere Pro doesn't seem to be able to synchronize clips when I select more than one clip per track.
This might help. I'm trying to synchronize this:

and yes, there might be gaps, when a camera was turned off for a bit and turned back on again. That's ok.
I can only synchronize this:

As far as I can see, the answer is no, which means syncing each column of clips by hand.
I understand Premiere Pro wants to avoid one clip conflicting with another, but that's trivial to detect and they could just abort syncing those when that happens. They already avoid synchronizing when the audio doesn't match.

Sync by making a multicam source sequence from the clips in your bin.  You’ll have to rearrange the clips in the timeline since it will send them to different tracks but it will sync all of them


text:
Multicam in Adobe Premiere when sources are split in several files
My cameras and my audio recorders don't give me a single file from a recording session, but instead, I get many sequential clips. I'm trying to create a multi-cam sequence in Adobe Premiere with the 3 cameras and a single high-quality audio track. For reference, the video came for GoPro Hero 9 Black and the audio from a Tascam DR-10L. My sources look like this:

If I just select everything and create a multi-cam sequence, I end with 15 cameras, so what I did was merge all the clips from each camera into a single sequence (I ended up with 3 of those, one for each GoPro), and then use those for the multi-cam. Is that the correct way to handle the video? It seems to work. This is how it ends up looking:

The audio is proving trickier. If I merge the 3 audio files (the ones with the _D suffix I'm not using) into a single sequence, it ends up being a video clip, not an audio clip (if that makes sense):

The problem with that is that multi-cam treats it as a video source, not as the master audio source:

As you can see there, the mic ended up being camera 4, and the master audio is camera 1's terrible audio.
What I tried next was to do a multi-cam with the merged camera clips and the source audio clips (had to skip the 3rd one because there wasn't any overlap, I was already turning cameras off). The problem when I do that is that I end up with two audio tracks instead of one, and they are both only coming through the left channel:

My settings when creating that last multi-cam are these:

The audio from the Tascam DR-10L is mono, while the audio from the cameras is stereo. I'm happy to work in mono, so I selected all clips and switched them to mono:

So, the question is, how do I handle the audio? How do I make a working multi-cam out of all of this with mono sound coming through both channels?

On https://premierepro.net/multicam/ it says:

Many users get audio problems (all tracks panned left) because they’re
creating a new sequence from the Multicam. Don’t. Create a new
sequence manually, then drag your Multicam into that sequence.

Creating the sequence manually and then placing the multicam helped solve this problem.


text:
If function: turn into whole number when decimal is .0
I've created this slider and counter which works just fine going from 5x down to the W:

The problem is that I need to create a condition that when a number hits .0 it becomes a whole number, so in this case below, it shouldn't be 5.0x but 5x:

Here is my current expression:

effect("Slider Control")("Slider").value.toFixed(1) + "x";

Here's the code:
myval = effect("Slider Control")("Slider");
SourceText = (Math.round(myval * 10))/10 + "x"

It's a really non-intuitive thing, but multiplying the value by 10, then rounding it to the nearest whole number, then dividing by 10 gives you what you need.
Think of it as "how many values after the decimal point do I want?" and count the number of zeroes in the number used.

That is not intuitive at all! Thanks for explaining it to me :)


text:
How do I merge two shapes in one during an animation?
I've these shapes:

The first one has three path within, my question is how do I merge these three dots into the big one during an animation?
I saw some tutorials about reshape but when I've tried it, it just appears the mask related to the first shape.

As far as I know, there isn't a great automatic way of doing this in AE.
One technique is to make keyframes on your all shape paths, then paste the initial shapes into the path of the end shape after the required number of frames. The result often isn't good:

You're often better off manually moving all your bezier paths yourself.
PS:
There's a useful script called Masks to Shapes (rd_MasksToShapes.jsx) which was part of the ReDefinery Scripts bundle.  It seems to be offline now, but is archived on the Internet Archive Wayback Machine, but it helps with switching between masks and shapes, but won't help with the morphing


text:
How to copy the file name to the video metadata title?
I have a bunch of video files, They have the correct file name but the title in the metadata is gibberish, I want to copy the file name & set it as the tile in the metadata.

I know how to do it for mkv files on Mac, never tried mp4 - https://apple.stackexchange.com/questions/367737/batch-remove-mkv-titles-only-no-re-encode

You forgot to mention the OS.

For MP4/Mov files (not Mkv), you could use exiftool on the command line.  Your command would be along these lines
exiftool "-Title<Basename" /path/to/files/
This command creates backup files.  Add -overwrite_original to suppress the creation of backup files.  Add -r to recurse into subdirectories.

Thanks @skylinekiller, you saved me a painful manual task.
I've updated your code a little so that I can just drop a .py file into a root directory and leave it to do it's work.
Here's the updated code if it helps anyone:
import glob
import subprocess
import os
import sys

def mp4_string(title):
    name, name_extension = os.path.splitext(os.path.basename(title).replace("'", "\\'"))
    return name

def mkv_string(title):
    name, name_extension = os.path.splitext(os.path.basename(title))
    return name

def exec_mp4(mp4name):
    mp4name_title = mp4_string(mp4name)
    subprocess.run(["kid3-cli", "-c", f"set title '{mp4name_title}'", mp4name], shell=True)

def exec_mkv(mkvname):
    mkvname_title = mkv_string(mkvname)
    subprocess.run(["mkvpropedit", "-e", "-q", "info", "-s", f"title={mkvname_title}", mkvname], shell=True)

def mp4():
    for mp4name in glob.glob('**/*.mp4', recursive=True):
        exec_mp4(mp4name)
        print(f"Title metadata of {mp4name} has been changed")

def mkv():
    for mkvname in glob.glob('**/*.mkv', recursive=True):
        exec_mkv(mkvname)
        print(f"Title metadata of {mkvname} has been changed")

if __name__ == "__main__":
        mp4()
        mkv()
        sys.exit(1)

You will need python, MKVtoolnix and Kid3-cli for this. Exif actually rewrites the file; this method just writes the metadata.  Leaps and bounds quicker.  Huge thank you to  Harvey at Github
Run this script from Python. I copy this file into the parent directory where I want the files to be edited.  Then within that parent directory, I go to the address bar and type cmd in the address bar, then type the command below to run the script.
python remeta_mp4.py mp4 for the current directory only and python remeta_mp4.py mp4 -r to change all mp4 files in its subdirectories
Copy and save into notepad and ensure save as .py extension.
import glob
import subprocess
import os
import sys

def mp4_string(title):
    name, name_extension = os.path.splitext(os.path.basename(title).replace("'", "\\'"))
    return name

def exec_mp4(mp4name):
    mp4name_title = mp4_string(mp4name)
    subprocess.run(["kid3-cli", "-c", f"set title '{mp4name_title}'", mp4name], shell=True)

def mp4(recursive=False):
    if recursive:
        for mp4name in glob.glob('**/*.mp4', recursive=True):
            exec_mp4(mp4name)
            print(f"Title metadata of {mp4name} has been changed")
    else:
        for mp4name in glob.glob("*.mp4"):
            exec_mp4(mp4name)
            print(f"Title metadata of {mp4name} has been changed")

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print("Usage: python rmeta.py mp4 [-r] for recursive operations")
        sys.exit(1)

    action_type = sys.argv[1]
    recursive = False
    if len(sys.argv) > 2 and sys.argv[2] == "-r":
        recursive = True

    if action_type == "mp4":
        mp4(recursive)
    else:
        print("Usage: python rmeta.py mp4 [-r] for recursive operations")
        sys.exit(1)

If you want to be able to double-click the .py file instead of using cmd prompt, you can use the below code. The code below will write ALL .mp4 files in the current AND subdirectories.  Just make sure you save it as .py file
import glob
import subprocess
import os
import sys

def mp4_string(title):
    name, name_extension = os.path.splitext(os.path.basename(title).replace("'", "\\'"))
    return name

def exec_mp4(mp4name):
    mp4name_title = mp4_string(mp4name)
    subprocess.run(["kid3-cli", "-c", f"set title '{mp4name_title}'", mp4name], shell=True)

def mp4(recursive=True):
    if recursive:
        for mp4name in glob.glob('**/*.mp4', recursive=True):
            exec_mp4(mp4name)
            print(f"Title metadata of {mp4name} has been changed")
    else:
        for mp4name in glob.glob("*.mp4"):
            exec_mp4(mp4name)
            print(f"Title metadata of {mp4name} has been changed")

if __name__ == "__main__":
mp4()


text:
Transition to bring overlay into view is making mov background go lighter but not mp4
So I have an animated background, I use slide to bring something into view, its not taking up the entire screen, just an image sliding in and back out again on one side of the screen, when the slide animation is happening the background (a mov file) become brighter, then goes darker again once the slide in is finished.
I tries converting a mov file to a mp4 and put that in instead and the lightning of the background didn't happen when I slid in the sane png file (though the converted file appears to be permanently a little lighter, animation or not which I'm not sure why at the moment but I'll stick with that and just make it darker again to suit.
Anyone else ever experienced this or know why it is?

I think I know the answer, the main difference between the file types is that the mov file actually had its opacity reduced below 100% and that seems to be a factor, TIL...


text:
Is 10 frames a second the lowest h.265 can go?
I produce videos that are mainly audio with some slides as visuals.
The slides change about once every 30 seconds, so even at a frame rate of 1fps my video would play smoothly.
When I try and export my video from Premiere Pro the lowest frame rate h.265 encoding allows is 10fps. Is that limit put in place by the Codec?

To answer the title question exactly, no, the theoretical floor for H265 framerate is probably less than 1fps. But you don't want to fiddle with framerate anyway. It won't help you produce a quality video within your spec requirements (unless some unusually low framerate is in your specs).
When making videos from slides presentations is tempting to believe that you will gain meaningful file size reductions by lowering the framerate, but this notion is completely false. It is also false that you will gain meaningful quality increases with no size increase.
H265 is very good at interframe compression. If you take a static image and make a 30fps H265 video from it, the resultant file will be pragmatically identical to 1fps, or even 60fps versions.
Continuing on pragmatism, most end user players I've looked at for this issue struggle to play framerates under 15fps. In my experience, your videos won't play smoothly at 1fps. Any quality gains or size reductions are meaningless if end users cannot play the file.
You need to render your file with a variable bitrate. I'm not familiar with Primere Pro; and complete control over your renders, as can be attained from ffmpeg, may not be available, but I'm sure you have a VBR option. Try it out, and leave the framerate at the standard 30fps. Optionally, render for your permanent archive, then process with ffmpeg for end user distributions.

Can ffmpeg go onto youtube etc.?

@Connor Yes, see here. ffmpeg is a command line video encoding tool. It's very robust, but has a steep learning curve. I was recommending to still use primere, but with a variable bitrate.

Okay thank you! In fairness, h.265 did seem to produce a very small file size compared to h.264. About 4 times smaller.

@Connor H265 will compress better everytime, but there's still some instances where it's less reliable for end users. If your ultimate distribution channel is YouTube, I'd favor the fastest workflow without sacrificing quality. In terms of render time, both h264 and h265 will take a while (with h264 typically being faster), but the smaller file reduces upload time. Other codecs will render fast, but have low compression (big files), so you lose on the upload time. If you're doing this task frequently, play around with your workflow and available codecs. It'll benefit you later.


text:
Why do my NDI Sources not appear in Windows (or OBS on Windows)
I noticed recently that even when on a 'known good' configuration of computer and network, NDI sources could not be found even by NDI Studio Monitor or by the OBS plugins that provide NDI sources.
This problems appears to be intermittent in nature, often going away after various investigations.

After some diagnostics we eventually determined this to be caused by a strange issue in windows where if you switch between Wireless networks then mDNS starts to misbehave. (Helped, enormously, by this thread: https://docs.microsoft.com/en-us/answers/questions/101168/mdns-not-sending-queries-to-the-network.html)
To fix the issue, you can simply disable the wireless interface, then re-enable it. This is not the same as 'turning off your wifi'. You must do this disable through the Control Panel -> Network and Internet -> Network Connections screen.
If you restart the NDI Studio Monitor you should now see all your missing sources!


text:
Increasing brightness and visibility of .avi files?
I have some videos which I took during some experimental work which ended up being so dark that the details can't really be seen (these are of spheres hitting a body of liquid and splashing).
It will be a bit difficult for me to re-do the experiments so was wondering if someone  can explain how I can fix these videos (.avi files) to make the details more visible.  The jpegs below are cut from certain frames of the video to show the problem.

The free video editing tool Davinci Resolve will do the job. But be aware that there is already much quality lost in your video files due to the low brightness together with video compression. You will be able to make it bright again, but you will not be able to restore full quality!

Make sure Davinci Resolve is supported on your hardware and platform
Download and install Davinci Resolve
Open Davinci Resolve, create a new project
Load your avi-files into Davinci Resolve and create a new timeline from your video file(s).
Go To the "Colors" tab (at the bottom of the screen) and look for the "Curves" section. Play around with the curves until you like your result.
Go to the Deliver Tab (at the bottom right of the screen) and export your video footage.


text:
Why is FFmpeg adding a minute to videos created with an audio source & image source?
I've been using FFmpeg to combine an audio file (.wav) and an image (.jpg) into a video (.mp4), the command I looked up seemed to work when testing it, so I tweaked it a bit (mostly just adding the scale argument) to fit that I needed and wrote a python script to run through the whole folder and create the videos.
They seemed fine until I noticed one was a lot longer than intended, and when I loaded all the videos & songs into VLC, every video was exactly one minute longer than the audio source was.
This is the command I've been using:
ffmpeg -loop 1 -framerate 1 -i "{image}" -i "{audio}" -c:a aac -b:a 128k -s 1080x1080 -shortest "{name}"
The curly brackets are just for python's .format() function, I've tested it with specific files just in the command prompt and I get the same output. Here's said output for a test I did:
ffmpeg version N-91869-g5632044939 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20180813
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --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-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 19.101 / 56. 19.101
  libavcodec     58. 29.100 / 58. 29.100
  libavformat    58. 18.100 / 58. 18.100
  libavdevice    58.  4.103 / 58.  4.103
  libavfilter     7. 29.100 /  7. 29.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
Input #0, image2, from 'cover.jpg':
  Duration: 00:00:01.00, start: 0.000000, bitrate: 1031 kb/s
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 810x810 [SAR 72:72 DAR 1:1], 1 fps, 1 tbr, 1 tbn, 1 tbc
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, wav, from '15 Intermission ~ Applaud The Dog!.wav':
  Metadata:
    encoder         : FL Studio 20
  Duration: 00:00:16.18, bitrate: 1411 kb/s
    Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
  Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[swscaler @ 0000014cab299600] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0000014cab314300] using SAR=1/1
[libx264 @ 0000014cab314300] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0000014cab314300] profile High, level 3.2, 4:2:0, 8-bit
[libx264 @ 0000014cab314300] 264 - core 157 r2932 303c484 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: 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=250 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'vid/15 Intermission ~ Applaud The Dog!.mp4':
  Metadata:
    encoder         : Lavf58.18.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc, progressive), 1080x1080 [SAR 1:1 DAR 1:1], q=-1--1, 1 fps, 16384 tbn, 1 tbc
    Metadata:
      encoder         : Lavc58.29.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.29.100 aac
frame=   76 fps= 57 q=-1.0 Lsize=     798kB time=00:01:13.00 bitrate=  89.5kbits/s speed=54.8x
video:536kB audio:256kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.658655%
[libx264 @ 0000014cab314300] frame I:1     Avg QP: 8.10  size:534314
[libx264 @ 0000014cab314300] frame P:19    Avg QP: 7.98  size:   565
[libx264 @ 0000014cab314300] frame B:56    Avg QP:13.34  size:    58
[libx264 @ 0000014cab314300] consecutive B-frames:  1.3%  0.0%  3.9% 94.7%
[libx264 @ 0000014cab314300] mb I  I16..4:  5.4% 25.8% 68.8%
[libx264 @ 0000014cab314300] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  2.3%  0.0%  0.0%  0.0%  0.0%    skip:97.7%
[libx264 @ 0000014cab314300] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.4%  0.0%  0.0%  direct: 0.0%  skip:99.6%  L0: 7.5% L1:92.5% BI: 0.0%
[libx264 @ 0000014cab314300] 8x8 transform intra:25.8% inter:68.4%
[libx264 @ 0000014cab314300] coded y,uvDC,uvAC intra: 98.1% 85.1% 84.5% inter: 0.2% 0.1% 0.0%
[libx264 @ 0000014cab314300] i16 v,h,dc,p: 13% 13% 55% 18%
[libx264 @ 0000014cab314300] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 14% 12% 12% 10%  9% 10%  8% 12%
[libx264 @ 0000014cab314300] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 15%  8%  8% 10% 10%  9%  8% 10%
[libx264 @ 0000014cab314300] i8c dc,h,v,p: 35% 28% 27% 11%
[libx264 @ 0000014cab314300] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000014cab314300] ref P L0: 98.6%  0.0%  1.2%  0.2%
[libx264 @ 0000014cab314300] ref B L0:  5.4% 94.6%
[libx264 @ 0000014cab314300] kb/s:57.72
[aac @ 0000014cab28c740] Qavg: 145.257

I can't for the life of me figure out why this is happening, would anyone know and have a solution? Again, this happens with every audio file I try and with different images as well.

There was a bug with -shortest. Upgrade to a recent git build (5.1 series won't do).

Yeah, that'd do it, I always forget to update stuff like this. Thank you!


text:
How can I make 4K videos shot at night with a Google Pixel 6 less grainy?
By default, 4K videos shot at night with a Google Pixel 6 can be very grainy:

How can I make 4K videos shot at night with a Google Pixel 6 less grainy?

There's not much you can do. Either make the entire video darker or use some form of denoising software. Unfortunately, to get the video to be as bright as you see, it requires amplifying the image quite a bit which also amplifies the otherwise hard to see noise.


text:
Attach objects to wall without camera tracking in After Effects
I want to attach a video to a wall that appears in a main video, like this:

Problem is that video is static shot, is not a track movement. So, I watched videos that explain how to make Motion 3D Tracking, with the Camera track, but it does not work, and I think is due to my video is static. So, how can I put another video with perspective there? I mean, I want to use something similar to the PS Perspective Crop Tool.

If it's a static shot, you don't need any tracking at all.
Use the built-in Corner Pin tool to reposition the corners of the thing you want to stick on the wall:

If you want to make it look more convincing afterwards, you could:

Add a tiny bit of movement to the whole comp,
Add motion blur to your sign, add a subtle shadow to the pinned sign matching the direction of the light in the video,
Make sure the colour correction and grain/noise on your sign match those of your background video

Worked. Thank you so much!

What you're looking for is called planar tracking. Instead of tracking points, planar tracking tracks whole clusters of pixels within a rectangle, or a plane (hence the name planar). Fortunately ,most After Effects versions come with a basic version of the most popular planar tracker, Boris FX Mocha. Just search "Mocha AE" in the Effects & Presets panel.