User:Joger/FFmpeg

From Qt Wiki
< User:Joger
Revision as of 10:29, 25 August 2024 by Joger (talk | contribs)
Jump to navigation Jump to search

FFProbe

FFProbe is used to inspect media, for example to view format or stream information. To view a file's format and stream information, you can use the following command line. It will print out information about the file's individual streams, such as video and audio streams, and also the container format.

ffprobe -v error -show_streams -show_format -print_format json <name_of_media>

Useful options

  • <code>-v error</code> suppresses FFprobe's header and decoding information so that we only see the interesting output information.
  • <code>-print_format json</code> argument makes the output easier to read.
  • <code>-select_streams v</code> argument will only print 'video' streams. It can be replaced by <code>a</code> to show only 'audio' streams, or <code>s</code> to show only 'subtitle' streams.

FFMpeg

Low latency streaming

> mediamtx
> ffmpeg -filter_complex ddagrab=video_size=1024x890:output_idx=0:framerate=60,hwdownload,format=bgra -fflags nobuffer -vcodec libx264 -tune zerolatency -f rtsp rtsp://127.0.0.1:8554/webcam.h264
> ffplay rtsp://127.0.0.1:8554/webcam.h264 -fflags nobuffer -flags low_delay -framedrop