convert .wmv to .mp4

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Oscar_NL

convert .wmv to .mp4

Post by Oscar_NL »

Hello,

I have on my local Mint install a folder which does have subfolders,
in those subfolders are .wmv files located.

Since one of my online scripts does not recognize .wmv,
I would like to convert the .wmv files over to .mp4 format.

It should keep quality/duration/dimensions + orginal file name, but just get the extension replaced.

Is here someone that can point me into the right direction ?
Thanks in advance.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
remoulder
Level 17
Level 17
Posts: 7621
Joined: Fri May 09, 2008 1:14 pm

Re: convert .wmv to .mp4

Post by remoulder »

[Edit] your original post and add [SOLVED] once your question is resolved.

“The people are my God” stressing the factor determining man’s destiny lies within man not in anything outside man, and thereby defining man as the dominator and remoulder of the world.
nomko

Re: convert .wmv to .mp4

Post by nomko »

WinFF can do the trick. Works easy and has an easy to use GUI. And it is also available in the repo's.
http://winff.org/html_new/
Last edited by nomko on Tue Nov 20, 2012 3:07 am, edited 1 time in total.
cra1g321

Re: convert .wmv to .mp4

Post by cra1g321 »

You could also maybe check out Transmageddon - http://www.linuxrising.org/index.html

or Arista Transcoder - http://www.transcoder.org/

I think both are available in Linux Mint.
Oscar_NL

Re: convert .wmv to .mp4

Post by Oscar_NL »

Thanks all,

Unfortunately still not able to get mp4 files + have the folder structure untouched, or copied.
My location is movie/category/a/ and then it might be that this folder "a" does have 100 or 200 dirs in it,
which should be kept in tact.
some of the above softwares don't support batch files.
With about 1400 files to encode, that would take me to long, I'm Sure Mint can be my supporter :)
:)
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: convert .wmv to .mp4

Post by Flemur »

If you want batch conversion, which you didn't mention at first, try ffmpeg; the winff GUI to ffmpeg can help create a command-line to work from. Avidemux has some batch capabilites, but they're very poorly implemented.

Convert anything (change *.mp4 to whatever, e.g. *.wmv) to medium-quality .avi files:
++
for i in *.mp4; do
echo "Converting: " $i;
ffmpeg_avicon $i ;
done;
rename 's/\.mp4//' *.avi
++

ffmpeg_avicon script:
+
/usr/bin/ffmpeg -i $1 \
-f avi -vcodec mpeg4 -vtag XVID \
-b 400k -qmin 6 -qmax 9 \
-acodec libmp3lame -ab 64k -ac 2 \
-threads 2 \
$1.avi
++
Makes output files named "originalname.mp4.avi" -> "originalname.avi" with the "rename" above.

Use winff to see what to change in the ffmpeg params to to convert TO mp4.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Oscar_NL

Re: convert .wmv to .mp4

Post by Oscar_NL »

Hello Flemur,

Thank you for this. Meanwhile tried to convert 1400 .wmv files to .mp4 format.
I initiated to do this with ffmpeg, but since it's depricated, "avconv" is recommended.

The command I use is :
avconv -i '/home/user/a/b/c/_Done_Uploaded/abc/2292/filename-0.wmv' -f mp4 -acodec mp2 '/home/user/a/b/c/_Done_Uploaded/abc/2292/filename-0.mp4'
When I add the first 100 lines like above, but just with increasing filename-1.wmv, filename-2.wmv etc,
after about 30 of 35 converted files the following msg does pops up:

File '/home/user/a/b/c/_Done_Uploaded/abc/2292/filena
avconv -i ' already exists. Overwrite ? [y/N]
*Please note the broken file name, and missing .ext !

Choosing "y" or "N" doesnt make much difference, it will try to convert 1 or 2 files more, and then closes it's process.

I also tried to have the paths without use of the Apostrophe Sign.

If my rules are this
avconv -i '/home/user/a/b/c/_Done_Uploaded/abc/2292/filename-0.wmv' -f mp4 -acodec mp2 '/home/user/a/b/c/_Done_Uploaded/abc/2292/filename-0.mp4'
avconv -i '/home/user/a/b/c/_Done_Uploaded/abc/2292/filename-1.wmv' -f mp4 -acodec mp2 '/home/user/a/b/c/_Done_Uploaded/abc/2292/filename-1.mp4'

How one would get this the best in a bash batch script, since I'd not think the command line will accept 1400 lines.
Locked

Return to “Sound”