Quantcast
Channel: VideoHelp Forum
Viewing all articles
Browse latest Browse all 45649

.mp4 cant play on WMplayer. Tried to change container and work. How to bat?

$
0
0
Hi everyone,

I have some .mp4 files which are not playing in Windows Media Player(Error: Windows Media Player cannot play the file. The Player might not support the file type or might not support the codec that was used to compress the file), but does play in VLC. I tried to change the container from .mp4 to .flv using a .bat* and after i changed it back to .mp4 and the file started playing normally without the error message. Does anyone have an idea of what it might be or how I can write a a command fot batch convertion that changes the containers in all folders and them change ir back to .mp4 and save in another folder (or will I have to do folder by folder?)

I used ffmpeg and the command i put in the batch file was:

the firtst .bat: to change the container from .mp4 to another container(i choose .flv)

for %%a in ("*.mp4") do ffmpeg -i "%%a" -vcodec copy -acodec copy "%%~na.flv"
pause

the second .bat: to change back to .mp4:

for %%a in ("*.flv") do ffmpeg -i "%%a" -vcodec copy -acodec copy "%%~na.mp4"
pause

I wrote this on notepad and then saved .bat. After changing all files i wrote the way back.

I dont know exactly what it does, but i know it fixes any issues.

Can someone help me to write it better and make it work with the whole directory and then save it to another directory to not overwrite the older files?

Thanks!

Viewing all articles
Browse latest Browse all 45649

Trending Articles