Hi, i could convert mkv files to mp4 using mkvtoolnix software.
BUt i do not know how to customize my video output to h264 and audio to mp3 from the original video format in mkvtoolnix
is that possible please
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 23 of 23
-
-
There is no actual difference if the file is .mp4 or .mkv ,it's just a container. Since MKVToolnix doesn't actually recode anything, you're not "converting" anything.
The software is practically used to mux/demux audio/video streams,subtitles,chapters,etc or apend multiple files or split them (e.g. split by sizes or extract by specific timecodes).
There's a comandline tool called FFMPEG, that actually can do everything you described. -
Hi, sviests,
Then please give the formula. i know something in ffmpeg
i want to convert the video codec to x264 of h264 or h264 and audio to mp3.
the original codec is advanced codec of video and audio which does not play in my tv, which ofcourse support mp3
please only give the formula , and i will substitue with my input file -
Try simply:
Code:ffmpeg -i "inputfile" -ac 2 "outputfile.mp4"
If you absolutely want MP3 you can try:
Code:ffmpeg -i "inputfile" -c:a libmp3lame "outputfile.mp4"
-
Code:
ffmpeg -i "yourfile.mp4" -vcodec h264 -b:v 4000k -c:a mp3 -b:a 256k "output.mp4"
ca is relative to audio: choose 128 or 192 or 256 or 320 -
hi, lomero, what if my file is not mp4, but mkv.
Will ffmpeg realize mkv format.
Hi, sneaker, you have given two formula, one for video and other for audio, is it not
Could you combine both to get h264 and mp3
hi, lomero, if mkv is reallized in formula, i will choose and try your formula, will select 2000and 128 -
hi, lomero, your formula works , but take long time to process and completlle.
i used any video converter and selected the same parameters and converted it , its speed is very good .
Thanks for all the help -
Of course. It's reencoding the video and audio. You can use faster encoder settings. The quality won't be as good though. Try preset verfast:
Code:ffmpeg -i "yourfile.mkv" -vcodec h264 -preset veryfast -b:v 2000k -c:a mp3 -b:a 128k "output.mkv"
Code:ffmpeg -i "yourfile.mkv" -vcodec h264 -preset veryfast -crf 20 -c:a mp3 -b:a 128k "output.mkv"
-
None of this is possible in MkvToolNix.
You say you are trying to convert mkv to mp4? I assume you mean MPEG-4 Part 2 onwards > But with an Mp3 audio stream ?
A compliant mp4 cannot contain an Mp3 audio stream. Is there any reason you need the audio stream to be mp3 ? What device will you be playing your mp4 on ?
You don't have to re-encode anything, just convert its format, so will take minutes, not hours if you are seeking a 'normal' compliant mp4..
With these default settings ffmpeg will produce a compliant mp4, which by definition, cannot contain an mp3 audio stream.
Code:ffmpeg -i input.mkv -c copy output.mp4
Code:ffmpeg -i input.mkv -c:v mpeg2video -c:a mp3 output.mpg
Last edited by codehound; 7th Jun 2020 at 12:57.
-
hi, codehound,
i need mp3 audio, even vlc have it as the first default, as old say 2016 tv deos not support aac, if that is what you mean
my tv does not play if the extension is mkv.
it does play x-264 and mp3.
if what you say is correct, the mp4 would not contain mp3, then why this is not played in tvs
if your first code is taken, then, it may even just produce the converted file as opus audio, which is not supported by most of the 2016 model tvs.
please clarify. mp4 cantainer can be anthing in audio like opus advanced codec. -
HI, lomero,
is that your clue that , after converting the file to mkv extension, i could just rename it as extension .mp4 to play, as the container inside your formula is for h264 and mp3 audio. -
No. But you can simply change the output file extension on the ffmpeg command line to mp4 to directly create an mp4 file:
Code:ffmpeg -i "yourfile.mkv" -vcodec h264 -preset veryfast -crf 20 -c:a mp3 -b:a 128k "output.mp4"
-
-
-
-
If the video codec is supported (x264 as stated) you can convert the audio stream only.
Use my clever FFmpeg-GUI, load your video. Set Audio modify, convert to mp3. In the multiplex section set your video as videostream, the new created mp3 as audiostream an remux as mp4. This file should play fine on your TV. -
hi codehound, it was humble on your part. i found the compatabie in vlc and so i replied that way.
Moreover, if i change only the audio, the advanced mp4 video codec are not supported in older model.
That is why , i prefer h264 and mp3 audio. my tv suppport mp3 but not aac.
i tried vlc , but it is mostly not saving correctly the subtitle as per the tutorial. mkvtoolnix came in handy in that aspect in embedding subtitles, but mkv does not allow changes in the video and auiio codec. So, what i am doing is just adding subtitle if necessary in mkvtoolnix and then using avc, i convert to comapatible h264, ie.x264 mp3 format.
regarding ffmpeg conversion , it takes more minutes than avc -
Last edited by jagabo; 8th Jun 2020 at 22:36.
-
Similar Threads
-
Mkvtoolnix edit by timecodes causes audio and video to lose sync
By Daskroon in forum EditingReplies: 4Last Post: 22nd Mar 2020, 11:59 -
how to change language video and audio in batch with mkvtoolnix in cmd
By pawelaut in forum Newbie / General discussionsReplies: 2Last Post: 15th Feb 2020, 14:20 -
How to convert only Audio (DTS to AAC/AC3) for Video File in MKVToolNix GUI
By brijeshkumarsingh in forum Video ConversionReplies: 1Last Post: 28th Nov 2018, 07:11 -
Different audio format after appending video clips using MKVToolNix
By Modify_inc in forum Newbie / General discussionsReplies: 13Last Post: 3rd Jan 2017, 20:47 -
Cant merge mkv video and audio with mkvtoolnix?? any ideas?
By kjy in forum Newbie / General discussionsReplies: 5Last Post: 6th Jan 2016, 11:37