First we use the code below to access the metadata. I am not sure what version of fluent-ffmpeg you are using, nor have I tested this on a Windows platform I just started using fluent-ffmpeg today and the solution I am providing is based on my observations. ffprobe gathers information from multimedia streams and prints it in human- and machine-readable fashion. So is there any solid way to find out if the file is audio only or video from the metadata? Or should I use ffmpeg commandline to find it out? I am not why there is a "resolution" since it is a pure audio file. mp3 file through fluent-ffmpeg,the result looks something like this: video: But some strange things happened that this doesn't work on Windows platform (I have tried Windows 7 64bit and Windows 2008) using the latest ffmpeg. if both resolution.w and resolution.h are 0, then this file is an audio. For example it can be used to check the format of the container used by a multimedia stream and the format and type of each media stream contained in it. You must also have ffprobe installed (it comes with ffmpeg in most distributions). Most features should work when using avconv and avprobe instead of ffmpeg and ffprobe, but they are not officially supported at the moment. Otherwise, it will attempt to call ffmpeg directly (so it should be in your PATH ). Similarly, fluent-ffmpeg will use the FFPROBEPATH environment variable if it is set, otherwise it will attempt to call it in the PATH. I have tried on Mac OS to use the "resolution" attribute in the metadata to tell if a file is audio only or video, i.e. Best JavaScript code snippets using fluent-ffmpeg. ffprobe gathers information from multimedia streams and prints it in human- and machine-readable fashion. If the FFMPEGPATH environment variable is set, fluent-ffmpeg will use it as the full path to the ffmpeg executable. It is very good that fluent-ffmpeg provides functions to get the metadata of a video and audio file. I am using node-fluent-ffmpeg module in NodeJS.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |