Video – How to Find Media Files Not Encoded with a Specific Codec

codecsfindvideo

I would like to standardize my video collection on a specific video codec (for instance the x265 High Efficiency Video Codec). I know I can obtain the codec in use from a single file using for instance 'mediainfo filename | grep "Codec ID"' Which will output the video codec followed by the audio codec for each file like:

Codec ID                                 : V_VP8
Codec ID                                 : A_VORBIS

I've reviewed man find but I can't seem to figure out how to accomplish this. Any ideas?

Best Answer

You can get a sorted list of your codec specific media files under the working directory by

$ mediainfo * | grep -v codec_id | grep .file_extension | cut -f2 -d: > list.txt

where codec_id is the codec in question (ex. h264) and file_extension is the extension of the container in question (ex. .mkv)

but if the file names have blank spaces between names then the command will not work as desired.