[FFmpeg-user] Is this a video file?

Reindl Harald h.reindl at thelounge.net
Fri Feb 28 14:47:05 CET 2014



Am 28.02.2014 14:36, schrieb Tom Horsley:
> On Fri, 28 Feb 2014 14:24:48 +0100
> Reindl Harald wrote:
> 
>> for that the file command may be more suiteable
> 
> It might be, but there are apparently just as many different
> things I'd need to recognize in the "file" command output
> as there are types of video files to recognize :-). For
> instance:
> 
> zooty> file ThePowerOfThree.mpg
> ThePowerOfThree.mpg: MPEG sequence, v2, program multiplex
> 
> It doesn't even say the word "video" anywhere for mpg files :-(.
> 
> zooty> file time-ThePowerOfThree.avi 
> time-ThePowerOfThree.avi: RIFF (little-endian) data, AVI, 320 x 180, ~30 fps, video: H.264 X.264 or H.264, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)

RTFM aka "file --help"

[harry at srv-rhsoft:/data/autotest/parts/ffmpeg/targets]$ file --mime-type *
images:           inode/directory
test_2p.aiff:     audio/x-aiff
test_2p.avi:      video/x-msvideo
test_2p.flac:     audio/x-flac
test_2p.flv:      video/x-flv
test_2p.m4a:      audio/x-hx-aac-adts
test_2p.m4v:      video/mp4
test_2p.mov:      video/quicktime
test_2p.mp3:      audio/mpeg
test_2p.mp4:      video/mp4
test_2p.mpg:      video/mpeg
test_2p.ogv:      application/ogg
test_2p.vob:      video/mpeg
test_2p.wav:      audio/x-wav
test_2p.webm:     video/webm
test_2p.wma:      video/x-ms-asf
test_2p.wmv:      video/x-ms-asf
test_2p.x264.mp4: video/mp4
test_2p.xvid:     video/mp4
test.aiff:        audio/x-aiff
test.avi:         video/x-msvideo
test.flac:        audio/x-flac
test.flv:         video/x-flv
test.m4a:         audio/x-hx-aac-adts
test.m4v:         video/mp4
test.mov:         video/quicktime
test.mp3:         audio/mpeg
test.mp4:         video/mp4
test.mpg:         video/mpeg
test.ogv:         application/ogg
test.vob:         video/mpeg
test.wav:         audio/x-wav
test.webm:        video/webm
test.wma:         video/x-ms-asf
test.wmv:         video/x-ms-asf
test.x264.mp4:    video/mp4
test.xvid:        video/mp4

[harry at srv-rhsoft:/data/autotest/parts/ffmpeg/targets]$ mv test.xvid test.unknown
[harry at srv-rhsoft:/data/autotest/parts/ffmpeg/targets]$ file --mime-type test.unknown
test.unknown: video/mp4

-------------- 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/d75dff2b/attachment.asc>


More information about the ffmpeg-user mailing list