Reply to topic

Rendering an MP4 but with WAV sound

stamkorg
Registered Member
Posts
3
Karma
0

Rendering an MP4 but with WAV sound

Tue Oct 17, 2017 8:05 am
Hello,

Is it possible to make a new rendering profile to have an MP4 video but with a wav quality sound?

Kdenlive can export as wav files (sound only). So this might be possible, but what is the code to do that? Which audio codec? Which parameters?.....

Thanks

SK
humanbeing
Registered Member
Posts
48
Karma
0
OS
hello,

WAV is an audio container. yours is MP4 for both audio and video. WAV contains audio encoded as PCM. you can't mux a PCM stream into an MP4 file in KDENLiVE. theoretically, you could use Audio Lossless Coding [ALS] in MP4, but FFMPEG can't encode in it.

i guess you'd better off changing your container from MP4 to MKV to get lossless audio in your video.
vpinon
KDE Developer
Posts
652
Karma
5
OS
When you define your own render profile, you have a link to the MLT documentation.
What you want is PCM audio codec => ac=pcm_s16le
replacing in the standard MP4 profile gives:
properties=x264-medium f=mp4 vcodec=libx264 acodec=pcm_s16le g=120 crf=%quality

Also a link to our (slightly old) doc:
https://userbase.kde.org/Kdenlive/Manua ... Parameters
humanbeing
Registered Member
Posts
48
Karma
0
OS
vpinon wrote:properties=x264-medium f=mp4 vcodec=libx264 acodec=pcm_s16le g=120 crf=%quality

that results in a crash when the rendering starts. at least in my version of KDENLiVE.
stamkorg
Registered Member
Posts
3
Karma
0
Thanks for your answers.
Yes, I tested with "acodec=pcm_s16le" but it crashes and says that this codec is not recognised or something like that.

I asked that because under other programs, when I was on windows, it was possible to combine whatever I wanted for the video with whatever I wanted for the audio part.
So, it should be possible.

And of course, being interested essentially in the sound, I would like to avoid to export very heavy files.
Stetsbequem
Registered Member
Posts
123
Karma
-1
stamkorg wrote:Is it possible to make a new rendering profile to have an MP4 video but with a wav quality sound?

As far as I can gather nope:
Code: Select all
melt -query "audio_codecs"

Why not Matroska (mkv)?


Either you choose the right job for the tool, or the right tool for the job.
vpinon
KDE Developer
Posts
652
Karma
5
OS
Oh right sorry, you have to change to MOV (close to MP4 container, but more flexible) or MKV
stamkorg
Registered Member
Posts
3
Karma
0
Stetsbequem wrote:
stamkorg wrote:Is it possible to make a new rendering profile to have an MP4 video but with a wav quality sound?

As far as I can gather nope:
Code: Select all
melt -query "audio_codecs"

Why not Matroska (mkv)?


Yes

But the idea was to have the best possible sound in a small file, because my videos are essentially made with 1 or 2 photos and a piano audio file.
As you can understand the priority is not the video here.
So I was searching for a solution to avoid multiGb exported files.
vpinon
KDE Developer
Posts
652
Karma
5
OS
You are messing between container (MP4/MOV/MKV) and video codec.
H264 (common video codec in MP4, but there can be others) can also be contained by MOV and MKV. But MP4 is more restrictive in term of codec diversity, and eg doesn't allow PCM audio, what MOV & MKV do (you can put almost anything in those, maybe FLAC audio would be a good idea).
The final file size depends on several parameters, for pictures staying long on screen you could increase the GOP size (-g parameter) : GOP=250 with 25fps means the codec is forced to re-save a full frame every 10sec (+you could maybe decrease the framerate, except if you use fades)

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Bryan ??, Google [Bot], grahm, keithw, Lupccs, Mace68, Raxker, Yahoo [Bot]