>Find data: ffmpeg -i video.mp4 >example result, excluding the ffmpeg data: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.41.100 Duration: 01:22:02.50, start: 0.000000, bitrate: 3667 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 3500 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s (default) Metadata: handler_name : SoundHandler >among other things, in the 'Stream #0:0' line, you can find the fps of the file >Trim stuff: >either ffmpeg -ss 00:01:00.5 -i input.mp4 -to 00:02:01.1 -c copy output.mp4 >or, if you want to specify the duration in seconds ffmpeg -ss 00:01:00.5 -t 60.6 -i input.mp4 -async 1 output.mp4 >the last one depends on fps >say, you have 30 fps, so any ms would have to be a multiple of 1/30 or ~0.033 >Youtube: youtube-dl -F [link] >this should give you the list of available video and/or audio formats >and then you do youtube-dl -f [number]+[number] [link] >first number has to be video, tho >second number is optional if the first one doesn't say video only