Skip to content

FFprobeKit output is not as expected, no matter what the commands and files are #531

Closed
@tasy5kg

Description

@tasy5kg

Description

FFprobeKit.execute(command).getOutput() result is not as expected, no matter what the commands and files are.


To Reproduce

Sometimes I want to get media properties with FFprobe commands. As sample scripts mentioned on https://trac.ffmpeg.org/wiki/FFprobeTips ,

to get the format duration:

ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 input.mp4

It should just return something like 30.024000, and I got similar results when using the FFmpeg command line tool on my computer.

But when I try to execute it in FFprobeKit:

FFprobeKit.execute("-v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "+path).getOutput()

It always returns something like this:

1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
und
VideoHandler
[0][0][0][0]
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
und
SoundHandler
[0][0][0][0]
38.058000
isom
512
isomiso2avc1mp41
Lavf58.45.100

Another example:

To get frame rate, without formatted:

ffprobe -v error -select_streams v:0 -show_entries stream=avg_frame_rate input.mp4

When using the FFmpeg command line tool on my computer, it should return something like this:

[STREAM]
avg_frame_rate=32835/569
[/STREAM]

Execute it in FFprobeKit:

FFprobeKit.execute("-v error -select_streams v:0 -show_entries stream=avg_frame_rate "+path).getOutput()

returns:

[STREAM]
avg_frame_rate=32835/569
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
DISPOSITION:captions=0
DISPOSITION:descriptions=0
DISPOSITION:metadata=0
DISPOSITION:dependent=0
DISPOSITION:still_image=0
TAG:language=und
TAG:handler_name=VideoHandler
TAG:vendor_id=[0][0][0][0]
[/STREAM]
[FORMAT]
TAG:major_brand=isom
TAG:minor_version=512
TAG:compatible_brands=isomiso2avc1mp41
TAG:encoder=Lavf58.45.100
[/FORMAT]

It seems these strange outputs are returned regardless of the command and file.


Expected behavior

Returns consistent results with command line tools.


Environment

  • Platform: Android 12
  • Architecture: arm64-v8a
  • Version: com.arthenica:ffmpeg-kit-min:4.5.1-1
  • Android Studio version: 2021.2.1 Patch 2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions