Mass changing extension .m4v to .mp4


I recently purchased a MBL and moved all of my video to the Shared Videos section of the device.

Unfortunately I had a substantial number of file with the m4v extension ( from Handbrake). 

Twonky thinks these files are music and will not serve the video.

In another thread some one  suggested that all I had to do was change the extension to .mp4.

I did not want to manually execute a large number of ‘mv’ commands by hand,

After consulting the bash manual I decided to use:

for f in *.m4v ; do mv "$f" "${f/%.m4v/.mp4}" ; done

I ssh’ed to the directory containing .m4v files and executed the above command,

It successfully converted all of the .m4v files to .mp4 files and Twonky will now

serve the videos :slight_smile:



Nice to know!! Most of the times just changing the extension doesn’t work due to the encoding but it’s really nice to know it works with Twonky! :smiley:

GENERALLY speaking, changing from m4v to mp4 shouldn’t matter.

m4v is apple’s extension for “iPxd” compliant files.   m4v is generally **ALWAYS* h.264 and AC3 or AAC audio.

However, going from mp4 to m4v may not work because mp4 is a more generalized container.

*technically*, AC-3 isn’t supported in an mp4 container.   It’s considered a “Private Stream.”

That being said, most hardware players treat both formats identically… just not Apple.  :) 

1 Like

What device were you trying to serve these files to?