I want to retrieve the time length of a MP3 file with gstreamer with a command on the console. But I don't know how.
I tried the following command
gst-launch filesrc location=$myMediaFile ! decodebin2 ! fakesink
but I got the following result:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 370731000 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline .
The time 370731000ns does not correspond to the time of the media which was 86 seconds.
If you have gst-discoverer you can get time length with this command line: gst-discoverer-0.10 -v $myMediaFile