How to get h264 video info?

I’ve found out that the best way for this is using FFprobe with -show_streams parameter. It shows both h.264 profile and B-frames usage for video streams of the movie. ffprobe -show_streams -i “file.mp4” [STREAM] index=0 codec_name=h264 codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 profile=High codec_type=video codec_time_base=1001/48000 codec_tag_string=avc1 codec_tag=0x31637661 width=1920 height=1080 has_b_frames=0 sample_aspect_ratio=0:1 … Read more

ffmpeg video compression / specific file size

if you are targeting a certain output file size the best way is to use H.264 and Two-Pass encoding. There is a great example here but it’s too large to copy-paste: https://trac.ffmpeg.org/wiki/Encode/H.264#twopass You calculate your target bitrate using bitrate = target size / duration and you launch ffmpeg two times: one pass analyzes the media … Read more

FFmpeg: high quality animated GIF?

I’ve written a tool specifically for maximum quality: https://gif.ski ffmpeg -i video.mp4 frame%04d.png gifski -o clip.gif frame*.png It generates good per-frame palettes, but also combines palettes across frames, achieving even thousands of colors per frame. If you want to reduce the video dimensions, add a scaling filter: ffmpeg -i video.mp4 -vf scale=400:240 frame%04d.png If you … Read more

Framerate vs r vs Filter fps

-framerate is an input per-file option. It is meant for input formats which don’t have a framerate or PTS defined, image sequences being an example. -r can be either an input or output option. As an input option, it retimes input frames at that rate. As an output option, it will duplicate or drop frames … Read more

ffmpeg vs mencoder

You are right, mencoder uses ffmpeg. Mencoder is actually a universal interface to a number of different codecs or codec libraries like ffmpeg. So, beyond ffmpeg, mencoder can be compiled with support to x264, xvid, lame mp3 and various others that I haven’t used. The point is that if you have the correct mplayer/mencoder binary … Read more

How to change keyframe interval?

You’ll need to reencode. Set x264’s keyint parameter to 5*fps and disable scenecut. If your fps is 24 for example : ffmpeg -i <input> -vcodec libx264 -x264-params keyint=120:scenecut=0 -acodec copy out.mp4 This is obviously not optimal for quality but it’ll match your demand. Edited to change no-scenecut to scenecut=0, as per sigh-boy suggestion.

Enabling libfdk_aac in ffmpeg installed with Homebrew

Homebrew v2.0 dropped all of the extra options that are not explicitly enabled in each formulae. So the –with options no longer work if you use the core Homebrew formulae. Instead you can use a third-party repository (or “tap”) such as ​homebrew-ffmpeg. This tap was created in response to the removal of the options from … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)