SuprBay: The PirateBay Forum

Full Version: Batch Script to Convert File Extensions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been using this batch script to convert multiple .flv files to .mp4

Code:
ren *.flv *.mp4

Is there a script that will batch convert .mp4 to .avi?

Converting 80+ videos, each in excess of 50mins from .mp4 to .avi is long, tedious and very very time consuming using e.g. AVS Video Converter.

I found THIS tutorial but, although i got it to convert to .avi, the videos played ok but with no sound.
Here's the code i used after following the initial instructions:

Code:
for %%a in ("*.*") do ffmpeg -i "%%a" -c:v libx264 -preset slow -crf 20 -c:a libvo_aacenc -b:a 128k "newfiles\%%~na.avi"
pause

BTW: I've to convert these as i'm streaming them via KODI to my TV and KODI won't/can't play .mp4

Thanks in advance
i don't think .avi container likes aac audio.
i also don't think you need to re-encode the video stream.
have you tried simply remuxing into mkv?
or using mp3 audio with .avi container?
(Apr 13, 2015, 14:27 pm)bob5695 Wrote: [ -> ]i don't think .avi container likes aac audio.
i also don't think you need to re-encode the video stream.
have you tried simply remuxing into mkv?
or using mp3 audio with .avi container?

Hi bob5695. I know nothing about audio/visual encoding etc but here's how far i've got. I'm using ffmpeg with a front end GUI named WinFF. After a lot of trial and error below is a screen of the settings that allowed me to convert the .mp4 files to .avi.
Once i can stream them to my TV i'm not too converned about high quality but with a test, with the settings below, on 2 .mp4 files converted. They seem to have turned out not so bad   Undecided

[Image: vgTZP81.png]
while re-encoding the video stream may not damage the quality too much, if done correctly, it may still be unnecessary,
and it will 100% certainly be much much much slower than remuxing.

i've been reading about kodi, and 'they' claim kodi can play .mp4 files.

for some reason, in real life, or at least in your case, it doesn't.

pick one of those files and run a test on it.
drop it onto mkvmerge and output it as .mkv.

also, when you speak of .mp4 (the bottle) it says nothing about the a/v streams inside it (the beverage inside the bottle).
what kind of video and audio do those files have? check it with mediainfo, so you know what you're dealing with.
Sorry i'm just replying back now bob. Well, i started from scratch as i think i done more bad than good with my initial attempt at conversion.
So here's how things are so far. I was able to find the three torrents i needed again all on 1 site (rutracker.org).
THIS ONE   THIS ONE   and   THIS ONE.

All have been uploaded in .mp4 format. MediaInfo from the first video from the 70-410 torrent (70-410 R2 - 01 Series Introduction) is below the spoiler:

MediaInfo1


I then threw it into mkvMerge like you said and converted it, below the spoiler is the revised MediaInfo after the file was converted:

MediaInfo2

So what do you think? The .mkv file now plays in KODI. Only issue seems to be the audio needs to be tweaked which i don't have a clue how to do Tongue

Just in case you need them. Here's the original file i worked with:

https://www.mirrorcreator.com/files/0AZS....m4v_links

And here's the .mkv converted version:

https://www.mirrorcreator.com/files/HMKY....mkv_links
both files play perfectly on my end. what do you mean by 'audio needs to be tweaked'?
also, instead of remuxing, have you tried simply renaming the extension from .m4v to .mp4?
(Apr 15, 2015, 01:42 am)bob5695 Wrote: [ -> ]both files play perfectly on my end. what do you mean by 'audio needs to be tweaked'?
also, instead of remuxing, have you tried simply renaming the extension from .m4v to .mp4?

It goes back to my OP bob. KODI doesn't seem to like .mp4? As for the audio issue. I've an extremely old TV (12 yrs min) which i refuse to replace lol so i think the audio issue is more to do with my TV than the conversion.
I ran some of them on my kids "SMART" TV and there's absolutely no loss in audio quality.

MANY thanks again mate for your help Smile
(Apr 15, 2015, 15:29 pm)LowOrbit Wrote: [ -> ]It goes back to my OP bob. KODI doesn't seem to like .mp4?

yeah, but what i understood to be .mp4 files turned out to be .m4v files,
and i assumed maybe kodi wasn't so happy with the .m4v extension.
Yeah they were listed on the torrents description, and post download as .mp4. Only after running MediaInfo as you suggested did i see that they were originally .m4v files?

They're playing now through KODI as .mkv conversions. Would there be a reason why, in your opinion, that the original uploader converted them to .mp4? Would it not make more sense to upload the files unadulterated and then the downloader can do what they want with them :/
(Apr 15, 2015, 17:38 pm)LowOrbit Wrote: [ -> ]Yeah they were listed on the torrents description, and post download as .mp4. Only after running MediaInfo as you suggested did i see that they were originally .m4v files?

They're playing now through KODI as .mkv conversions. Would there be a reason why, in your opinion, that the original uploader converted them to .mp4? Would it not make more sense to upload the files unadulterated and then the downloader can do what they want with them :/

i actually opened all three torrents and noticed one contains .m4v files, another contains .mp4 files, and the other contains .flv files.
any decent player can handle any of those file types, and the a/v streams can be muxed/re-muxed into any of those containers.
i have no idea what their original format was, nor what made the uploader choose whatever formats he chose.
he could've chosen .mkv just as well, but you know, there are so many containers available...