I am using ffmpeg to convert videos to mp4 in my PHPMotion project. I am not able to convert wmv and m4v video to mp4 format. I've pasted the command that I used to convert wmv and m4v:
ffmpeg -i 1.wmv -ab 128 -b 1200 test.mp4
ffmpeg -i 1.m4v -ab 128 -b 1200 test.mp4
When I use this codes, i got an error message:
Output #0, mp4, to 'test.mp4':
Stream #0.0: Video: mpeg4, yuv420p, 640x360, q=2-31, 1 kb/s, 90k tbn, 24 tbc
Stream #0.1: Audio: 0x0000, 44100 Hz, stereo, s16, 0 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Unsupported codec for output stream #0.1
How can I solve this issue?
Method 4: How to convert M4V to MP4 using FfmpegOpen Ffmpeg and hit “Open” to add M4V video. Choose “Save as” menu to set “MP4” as output video format. You can adjust “Bitrate calculator” and “Video parameters” in detail. Hit “Encode” button at the bottom to convert M4V video to MP4 for free.
Because WebM is a well-defined format, FFmpeg automatically knows what video and audio it can support and will convert the streams to be a valid WebM file.
FFmpeg can input most container formats natively, including MP4, . ts, MOV, AVI, Y4M, MKV, and many others. This is the output file.
For those who still find this question today, because they're trying to play m4v
files that their hardware or software generated, but none of the players they try will play them: m4v
is not just a playable media container, but is also used as a pure stream format by a number of commonly used tools and video capture devices, so that it can be used to burn the video directly to disc. This is especially likely when you're using something like Adobe's Creative Suite set of tools for video production.
To turn an "unplayable" m4v
stream (that your capture device/software suggests should totally be playable) into the kind of video file you're used to, tell ffmpeg to copy the stream into an mp4
container:
$> ffmpeg -i input.m4v -vcodec copy -acodec copy output.mp4
Or, using the combined a/v codec shorthand flag:
$> ffmpeg -i input.m4v -c copy output.mp4
No actual encoding happens, so this will only take a few seconds, if not less. Done deal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With