1 lien privé
Vous avez déjà remarqué comment le volume varie d'une vidéo à l'autre sur YouTube, ou pire, comment certaines pubs sont 10 fois plus fortes que le contenu ...
The Best 7 Video Resizers for Linux
https://www.sysgeeker.com/blog/the-best-7-video-resizers-for-linux-resize-your-videos-with-ease.html
How to Crop and Resize a Video Using FFmpeg
https://www.sysgeeker.com/blog/the-best-7-video-resizers-for-linux-resize-your-videos-with-ease.html
On line Video Compressor
https://www.freeconvert.com/video-compressor
https://invideo.io/tools/compress/video-compressor/
How can I reduce a video's size with ffmpeg
https://unix.stackexchange.com/questions/28803/how-can-i-reduce-a-videos-size-with-ffmpeg
How to extract images from video file?
https://unix.stackexchange.com/questions/185877/how-to-extract-images-from-video-file
This article explores FFmpeg's capabilities for converting video, audio, and image files with practical examples in Linux.
FFmpeg is a powerful multimedia framework that contains various tools for different tasks such as playing audio/video files, converting between MP3 to avi, etc.
Récemment découvert, FFmpeg Explorer est une plateforme facilitant l'utilisation du logiciel open-source FFmpeg pour manipuler fichiers vidéo et audio. Elle propose une liste de codecs et formats, des guides, tutoriels, et des ressources pour résoudre les problèmes courants. Pour maîtriser FFmpeg, consultez les guides, pratiquez et utilisez les ressources supplémentaires.
Apprenez à utiliser FFmpeg afin de pouvoir manipuler des fichiers vidéo et audio (décoder, encoder, transcoder, multiplexer, démultiplexer…) !
This tutorial will show you step by step how to merge SRT subtitles with an MP4 video or movie permanently.
In linux
ffmpeg -i Movie.mp4 -vf subtitles=Movie.srt Movie2.mp4
FFmpeg will now convert the MP4 video to another MP4 video with hardcoded subtitles.
This may take a while.
Convert AVI to MP4 using FFmpeg with and without re-encoding the AVI file. Also, learn to install FFmpeg and do a lossless conversion from AVI to MP4 using FFmpeg.
Ok, if you are in a hurry to convert AVI to MP4 using FFmpeg, then simply run the following FFmpeg command. It should work for most of the use-cases.
ffmpeg -i input_filename.avi -c:v copy -c:a copy -y output_filename.mp4
The WebM Project has been slowly getting more support from the browser community with Edge 14 adding support in the Anniversary edition of Windows 10. At the same time more .webm files are created by new HTML5 APIs like WebRTC when recording WebRTC sessions and the the MediaStream Recorder API.
Use ImageMagick® to create, edit, compose, and convert digital images. Resize an image, crop it, change its shades and colors, add captions, and more.
The magick identify program describes the format and characteristics of one or more image files:
https://imagemagick.org/script/identify.php
Pour réduire le poids de l'image en conservant la résolution:
convert input.jpg -auto-orient input.jpg
puis:
ffmpeg -i input.jpg output.jpg
While there are a lot of tools for reducing video file sizes, most of them depend on FFMPEG. Learn how to reduce video file size using FFMPEG in Linux.
To convert a file using default FFmpeg settings, use the following command:
on passe de 120Mo à 80Mo
ffmpeg -i inputfile.video outputfile.video
ffmpeg -i x.mp4 -vcodec libx265 -crf 28 z.mp4
On passe de 120Mo à 40Mo
ffmpeg -i x.mp4 -vf "scale=iw/2:ih/2" v.mp4
On passe de 120Mo à 30Mo et de 1280x720 à 640x360
I tested most of the other proposed answers to this question. The test data conclusions are below. These are the proposed answers that I tested:
(BR) Modify the bitrate, using:
ffmpeg -i $infile -b $bitrate $newoutfile
(CR) Vary the Constant Rate Factor, using:
ffmpeg -i $infile -vcodec libx264 -crf 23 $outfile
(SZ) Change the video screen-size (for example to half its pixel size), using:
ffmpeg -i $infile -vf "scale=iw/2:ih/2" $outfile
(BL) Change the H.264 profile to "baseline", using:
ffmpeg -i $infile -profile:v baseline $outfile
(DF) Use the default ffmpeg processing, using:
ffmpeg -i $infile $outfile
DATA
"size" - percent pixel size of the converted video in relation to the original.
"bitrate" - bitrates of original and converted videos.
"definition" - pixel size of videos.
"convert" - time to convert the video in seconds.
I calculated the target bitrate for (BL)using the proposed method.
=== File A - How Node Is Helping To Propel Angular-Fnbixa7Ts6M.mkv ===
original BR CR SZ BL DF
-------- --- -- -- -- --
size 64152 kb 214% 76% 40% 83% 76%
bitrate 411 kb/s 883 313 165 342 313
definition 1920x1080 1920x1080 1920x1080 960x540 1920x1080 1920x1080
convert -- 648 509 225 427 510
=== File B - Using GraphQL with Angular _ By - Lee Costello-OGyFxqt5INw.mkv ===
original BR CR SZ BL DF
-------- --- -- -- -- --
size 410301 kb 33% 109% 28% 143% 109%
bitrate 2687 kb/s 880 2920 764 3843 2920
definition 3840x2160 3840x2160 3840x2160 1920x1080 3840x2160 3840x2160
convert -- 2307 3188 1116 2646 3278
CONCLUSIONS
The (SZ) method is definitely the quickest method. It was 2X to 4X faster. This can be very much an issue on high-def videos, since all of the other methods took longer to convert than the actual length of the video! For example, The (CR) method took 53 minutes to convert the 21 minute video.
The (SZ) method is definitely the best method if the definition of the video is larger than the definition of the screen that will be displaying it. For example, if your phone can only display a 1080p picture, sending it a 3840x2160 video is just wasteful. It would be best to half its size to 1080p.
Some of the proposed answers actually INCREASED the size of some videos. For example, the (BR) method more than doubled the size of the 1080p sample. It did however make the 2160p size one-third. For the high-def sample, the (CR), (BL) and (DF) methods all INCREASED the size of the video.
Correct (or best) Answer
It is always best to first lower the resolution to the maximum supported by your target display.
If you want to reduce file size further, it will depend on personal choices. You can either reduce information content or increase compression.
You can lower the resolution more if that is not something that concerns you.
If the video doesn't include fast action scenes, you may want to lower the frame rate.
If you have a powerful processor and space is the only issue, you can increase the compression rate.
Bit rate is a combination of multiple factors. So just telling ffmpeg to lower the bit rate may not give you the results you want.
Another way of lower information content is to lower the color depth. How to do this was not yet discussed.
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.
Explains how to install FFmpeg with NVIDIA GPU acceleration hardware support on Linux to speed up encoding with ffmpeg command.
How to find the NVIDIA cuda version:
https://www.cyberciti.biz/faq/how-to-find-the-nvidia-cuda-version/#more-149900