11 votes
Accepted

Difference between duration_ts and duration in ffprobe output?

duration is in seconds, e.g. 15.9 duration_ts is in the media's time_base, e.g. 1/30014 * 479000 = 15.959219
SlimSCSI's user avatar
  • 1,070
4 votes

How to make video play with correct aspect ratio

For a H264 stream, use the h264_metadata bitstream filter ffmpeg -i in.mp4 -c copy -bsf:v "h264_metadata=sample_aspect_ratio=4/3" out.mp4
Gyan's user avatar
  • 33.2k
4 votes

Why is ffprobe showing another bitrate than the one I encoded with?

Why is the duration changed? MP3s may not display accurate duration, depending on whether a Xing header was written, and whether the MP3 encoding is Variable Bit Rate (VBR) or a Constant Bit Rate (CBR)...
Gyan's user avatar
  • 33.2k
3 votes
Accepted

Fix mp3float Header missing without re-encode

Right now the only solution I found is a two steps process: Extract the mp3 stream: $ ffmpeg -i input.avi -c:a copy input.mp3 Combine it back into the original AVI container: $ ffmpeg -i input.avi -i ...
malat's user avatar
  • 256
2 votes

How to make video play with correct aspect ratio

If you want to change the Sample Aspect Ratio (aka Pixel Aspect Ratio) without reencoding use mkvmerge or mp4box: mkvmerge mkvmerge -o "out.mp4" --aspect-ratio-factor 0:4/3 "in.mp4" mp4box mp4box -...
drake7's user avatar
  • 421
2 votes

Why I can't check the bit rate on some videos?

For mkv files, you can use mkvpropedit —add-track-statistics-tags to add stream level data.
Jeff Rice's user avatar
2 votes

change output order of FFprobe

The order in which sections are printed is hard-coded and insensitive to user specification. This is the layout in the source. if (do_read_frames || do_read_packets) { ... } if (do_show_programs) { .....
Gyan's user avatar
  • 33.2k
2 votes
Accepted

Why does ffmpeg flip upside-down the video when concatenating with -f concat?

The concat demuxer amalgamates all its inputs and presents them as a single input. It takes the properties of the first input as representing the properties of the amalgam. Since the 1st input has a ...
Gyan's user avatar
  • 33.2k
2 votes

Find duration only with ffprobe in Windows

First, if you just want information about a file, you should probably use "ffprobe", not "ffmpeg". Otherwise you'll get an answer, but you'll also have an error return status. As ...
garryw's user avatar
  • 21
1 vote

Convert video from webm to mp4 using ffmpeg

That anomalous file likely has been detected (wrongly) to have a high frame rate. Use ffmpeg -i video1.webm -fps_mode passthrough -f mp4 video1.mp4 Your ffmpeg version should be recent i.e. at least ...
Gyan's user avatar
  • 33.2k
1 vote
Accepted

ffmpeg showing "landscape resolution" for portrait video

ffprobe is correct. Generally, cameras will store portrait videos as landscape along with metadata to indicate to players if the video needs to be re-oriented for display. See the following in the ...
Gyan's user avatar
  • 33.2k
1 vote

ffmpeg and ffprobe existing library or an add-on, pros/cons of building one myself

ffprobe can output json, making it a lot simpler: import json from subprocess import run, PIPE, DEVNULL import sys def ffprobe_json(filename): proc = run( [ "ffprobe", "-...
stribika's user avatar
  • 211
1 vote
Accepted

Using ffprobe to detect black frames outputs duplicate results

The input is read via the lavfi device, and the tags are inserted by the blackdetect filter inside the filtergraph. So, they are present in the packets emitted by the filtergraph. Then, once decoded, ...
Gyan's user avatar
  • 33.2k
1 vote
Accepted

FFmpeg: Getting this error while trying to add a logo to video (Unable to find a suitable output format for ..)

The entire filtergraph should be one argument. '-filter_complex','scale=1920:1080[main];[main][1]overlay=x=main_w-overlay_w-(main_w*0.01):y=main_h-overlay_h-(main_h*0.01)',
Gyan's user avatar
  • 33.2k
1 vote

Hello ffmpeg heroes - please help me with ffmpeg/ffprobe commands to decode a video for me?

It is all about the proprietary codec, i.e. IMM5. The VLC and FFMPEG can't deal with it except patching the avcodec manually using https://patchwork.ffmpeg.org/project/ffmpeg/patch/20190716170703....
xer-rex's user avatar
  • 792
1 vote

Why I can't check the bit rate on some videos?

Bitrate isn't calculated from stream size, but the number is saved in file as special field/metadata. Now, the problem with ffmpeg (or rather libmatroska) and Matroska (MKV) muxer is it doesn't save ...
Krzysiu's user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible