[FFmpeg-user] Is this a video file?

Reindl Harald h.reindl at thelounge.net
Fri Feb 28 14:24:48 CET 2014

Am 28.02.2014 14:02, schrieb Tom Horsley:
> I thought it would be simple to use ffprobe to ask the
> question: "Is this a video file?", but it turns out
> to be more complicated than I thought :-).
> For instance, a plain text file shows up with
> a codec_type of video because, of course, it could
> be rendered as video.
> So is there a simple way to ask if a file is
> already video?
> I'm trying to find all the videos in a directory
> with all sorts of different codecs, file extensions,
> and wot-not that are mixed with lots of other
> kinds of files as well

for that the file command may be more suiteable

[harry at srv-rhsoft:~]$ file /audio/Bendl.mp3
/audio/Bendl.mp3: Audio file with ID3 version 2.3.0, contains: MPEG ADTS, layer III, v1, 192 kbps, 44.1 kHz, Stereo

[harry at srv-rhsoft:~]$ file /data/dist-upgrade-f20.log
/data/dist-upgrade-f20.log: UTF-8 Unicode text

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 246 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20140228/cd117164/attachment.asc>

More information about the ffmpeg-user mailing list