content
basic
Pgm/ppm to 264/265
ffmpeg -v error -y -r 15 -i %08d.ppm -vcodec libx264 -pix_fmt yuv420p -b:v 50M out.mp4
Pgm/ppm to yuv
ffmpeg -v error -y -r 15 -i %08d.ppm -pix_fmt yuv420p out.yuv
Flags
-v : loglevel, error means show all logs
-y : overwrite output files without asking
-r : framerate, fps
-i : input file name
-vcodec : video codec
-pix_fmt : pixel format
-b:v : bitrate
Transformat
PCM to .wav
ffmpeg.exe -f s16le -ar 8000 -i <file name> -ar 8000 <file name.wav>
MP4 to FLV
ffmpeg -i input.mp4 -codec copy output.flv
dump MP4 info
ffmpeg -i input.mp4
ffprobe -i input.mp4 -show_format -show_streams -show_frames > xxx.json
# get audio track only
ffmpeg -i input.mp4 -vn output_audio.mp3
# get video track only
ffmpeg -i input.mp4 -an output_video.mp4
dump to .csv
ffprobe -i 4K.mp4 -select_streams v -show_frames -of csv -o 4K.csv
dump to .xml
ffprobe -i 4K.mp4 -select_streams v -show_frames -of xml -o 4K.xml
player
RTSP or HTTP/FLV and record
ffmpeg -rtsp_transport tcp -i rtsp://<DUT IP>:9554/live/0 -t 30 -c copy out_h265_0.265