ffmpegvideo-processingffprobetranscoding

Is there a way to specify the decoder in ffprobe


I am using ffprobe to extract information from a video file using following command on AWS VT1 that has hardware accelerated decoders available

ffprobe -of json -show_streams -show_frames -show_format -i video.mp4

The above command still performs decoding using CPU.

I know that in case of ffmpeg, I can specify the decoder like this

ffmpeg -c:v mpsoc_vcu_h264 -i video.mp4 -f null -

I was wondering if it is possible to specify a decoder to ffprobe as well.


Solution

  • I asked those that should know, and they say ffprobe has to do a full decode for this analysis (AVFrames can't be gotten otherwise), and there is no way to choose the codec, or to use hardware acceleration.

    I was recommended to look into the trace_headers BSF and given this command:

    ffmpeg -v verbose -i input -map 0:v -c copy -bsf:v trace_headers -frames:v 5 -f null pipe:

    That dumps info in encoded form. Example: pic_width_in_mbs_minus1 = 239 which indicates 240 * 16 = 3840 pixels width for the file I used to test this.