Search code examples
libavcodeclibav

Using libav without generating output file


I use libav for an application in which transform coefficients of video should extracted. But the output file of libav is not important in this application. There is memory limitation and I don't want produce the output file.

I read some documentations about libav along with its help. But I couldn't solve this issue. How can force libav from producing the output file?


Solution

  • If you want to decode your file without output, you can use the following approaches:

    1: specify its output format as null 2: specify its output as null:

    In windows and linux you can use this command:

    avconv.exe -i input.mkv -f null null
    ./avconv -i input.mkv -f null /dev/null
    

    Base on (ffmpeg description) -f Force input or output file format. The format is normally auto detected for input files and guessed from the file extension for output files, so this option is not needed in most cases.

    And The second null specify its output as null.