Matthew on Nostr: I had a need to upload a video. A requirement was that the file size be 20MB or less. ...
I had a need to upload a video. A requirement was that the file size be 20MB or less.
The video I took was 50MB. I used this ffmpeg command to keep the same video content and duration, but reduce the file size to about 18MB. Perfect!
ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset medium -movflags +faststart -c:a aac -b:a 128k output.mp4
#ffmpeg #linux #video
Published at
2025-06-11 17:10:11Event JSON
{
"id": "2ef8a9c4399325f3759c93cb3190abcd3c21060a8920d7e46e340ab56fd1ffdf",
"pubkey": "b8e4bdf064008eab98416329cf8f063206eaaba9e98f3f34b89cc4f10c60ad56",
"created_at": 1749661811,
"kind": 1,
"tags": [
[
"t",
"ffmpeg"
],
[
"t",
"linux"
],
[
"t",
"video"
],
[
"client",
"moStard",
"31990:877308276be50ce9bafa7e5e374e4fcbf5e9859a21918f34baefd000746b7d35:1732044917"
]
],
"content": "I had a need to upload a video. A requirement was that the file size be 20MB or less. \n\nThe video I took was 50MB. I used this ffmpeg command to keep the same video content and duration, but reduce the file size to about 18MB. Perfect!\n\nffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset medium -movflags +faststart -c:a aac -b:a 128k output.mp4\n\n#ffmpeg #linux #video",
"sig": "b8601d62d681e171dea0f8764542e0a0ececb365c0de7c8d239abce1a1c074c8a2fdc2cfb2a9dde7af99b4d6ddc50598957e1ddc01b5e5a107528fd67360600a"
}