ffmpeg - need help with syntax to run


  1. Posts : 426
    Windows 10 64-bit Ver 1909, OS build 18363.535
       #1

    ffmpeg - need help with syntax to run


    I'm unfamiliar with ffmpeg but I wanted to check the integrity of a video file since it may not have completed downloading correctly. The general advice everywhere online is to use ffmpeg with this syntax:

    [path to ffmpeg.exe executable] -v error -i [path to video file] -f null - >[path to error.log]

    But I'm not great with command lines. I must be doing something wrong. The path to where I extracted the Windows ffmpeg.exe is C:\Programs\ffmpeg-4.1.1-win64-static\bin\ffmpeg.exe. The video file is in G:\Downloads.

    So what exactly do I type to get this to run? And do I enter it into the run command or from the command prompt?

    Or is there another piece of freeware that can do this?
      My Computer


  2. Posts : 3,275
    Win10
       #2

    I don't know that exact command but try this:

    Open a command prompt and enter

    "C:\Programs\ffmpeg-4.1.1-win64-static\bin\ffmpeg.exe" -v error -i "G:\Downloads\my test file" -f null - >"C:\temp\error.log" 2>&1

    nb:
    -replace my test file with the actual name of your own file
    -use quotation marks as shown ( useful if there are spaces in file/folder path names )
    -error.log can be located where you want it ( I have shown it in C:\temp" )

    (note: it takes a long time to complete and returns no output if no errors found)
      My Computers


  3. Posts : 11,247
    Windows / Linux : Arch Linux
       #3

    Hi folks
    I'm sure this command is available on Windows version too but this should show all the options (I'm on a Linux Console)

    jim@hestur ~]$ ffmpeg --help

    output from this command is :

    ffmpeg version 2.8.15 Copyright (c) 2000-2018 the FFmpeg developers
    built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
    configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
    libavutil 54. 31.100 / 54. 31.100
    libavcodec 56. 60.100 / 56. 60.100
    libavformat 56. 40.101 / 56. 40.101
    libavdevice 56. 4.100 / 56. 4.100
    libavfilter 5. 40.101 / 5. 40.101
    libavresample 2. 1. 0 / 2. 1. 0
    libswscale 3. 1.101 / 3. 1.101
    libswresample 1. 2.101 / 1. 2.101
    libpostproc 53. 3.100 / 53. 3.100
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

    Getting help:
    -h -- print basic options
    -h long -- print more options
    -h full -- print all options (including all format and codec specific options, very long)
    See man ffmpeg for detailed description of the options.

    Print help / information / capabilities:
    -L show license
    -h topic show help
    -? topic show help
    -help topic show help
    --help topic show help
    -version show version
    -buildconf show build configuration
    -formats show available formats
    -devices show available devices
    -codecs show available codecs
    -decoders show available decoders
    -encoders show available encoders
    -bsfs show available bit stream filters
    -protocols show available protocols
    -filters show available filters
    -pix_fmts show available pixel formats
    -layouts show standard channel layouts
    -sample_fmts show available audio sample formats
    -colors show available color names
    -sources device list sources of the input device
    -sinks device list sinks of the output device
    -hwaccels show available HW acceleration methods

    Global options (affect whole program instead of just one file:
    -loglevel loglevel set logging level
    -v loglevel set logging level
    -report generate a report
    -max_alloc bytes set maximum size of a single allocated block
    -y overwrite output files
    -n never overwrite output files
    -ignore_unknown Ignore unknown stream types
    -stats print progress report during encoding
    -max_error_rate ratio of errors (0.0: no errors, 1.0: 100% error maximum error rate
    -bits_per_raw_sample number set the number of bits per raw sample
    -vol volume change audio volume (256=normal)

    Per-file main options:
    -f fmt force format
    -c codec codec name
    -codec codec codec name
    -pre preset preset name
    -map_metadata outfile[,metadata]:infile[,metadata] set metadata information of outfile from infile
    -t duration record or transcode "duration" seconds of audio/video
    -to time_stop record or transcode stop time
    -fs limit_size set the limit file size in bytes
    -ss time_off set the start time offset
    -sseof time_off set the start time offset relative to EOF
    -seek_timestamp enable/disable seeking by timestamp with -ss
    -timestamp time set the recording timestamp ('now' to set the current time)
    -metadata string=string add metadata
    -target type specify target file type ("vcd", "svcd", "dvd", "dv" or "dv50" with optional prefixes "pal-", "ntsc-" or "film-")
    -apad audio pad
    -frames number set the number of frames to output
    -filter filter_graph set stream filtergraph
    -filter_script filename read stream filtergraph description from a file
    -reinit_filter reinit filtergraph on input parameter changes
    -discard discard
    -disposition disposition

    Video options:
    -vframes number set the number of video frames to output
    -r rate set frame rate (Hz value, fraction or abbreviation)
    -s size set frame size (WxH or abbreviation)
    -aspect aspect set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
    -bits_per_raw_sample number set the number of bits per raw sample
    -vn disable video
    -vcodec codec force video codec ('copy' to copy stream)
    -timecode hh:mm:ss[:;.]ff set initial TimeCode value.
    -pass n select the pass number (1 to 3)
    -vf filter_graph set video filters
    -ab bitrate audio bitrate (please use -b:a)
    -b bitrate video bitrate (please use -b:v)
    -dn disable data

    Audio options:
    -aframes number set the number of audio frames to output
    -aq quality set audio quality (codec-specific)
    -ar rate set audio sampling rate (in Hz)
    -ac channels set number of audio channels
    -an disable audio
    -acodec codec force audio codec ('copy' to copy stream)
    -vol volume change audio volume (256=normal)
    -af filter_graph set audio filters

    Subtitle options:
    -s size set frame size (WxH or abbreviation)
    -sn disable subtitle
    -scodec codec force subtitle codec ('copy' to copy stream)
    -stag fourcc/tag force subtitle tag/fourcc
    -fix_sub_duration fix subtitles duration
    -canvas_size size set canvas size (WxH or abbreviation)
    -spre preset set the subtitle options to the indicated preset



    Cheers
    jimbo
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 11:11.
Find Us




Windows 10 Forums