This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Simply merging picture+audio in a container w/o processing

Tags: None
(comma "," separated)
User avatar
rica
Registered Member
Posts
11
Karma
0
OS
Hello, I'm new to these forums. I'm old to Linux (Kubuntu), but new to rendering (Kdenlive). I use Kubuntu 18.04 and Kdenlive 17.12.3.
My problem: Did download from PBS some operas at the Met, but they came in two mp4 files each, one with the picture and the other with the sound.
Video (picture): H264 - MPEG-4 AVC (...), 1280x720, etc.
Audio (sound): MPEG AAC Audio (mp4a), Sample Rate 48000Hz, bps 32.

Rendered these files in a mp4 container, trying different settings, but all issued unsatisfying results. Mainly, what bothered me was the jerky image compared to the original. I don't bother about the file size, as it's not for publishing on the net, just for personal use. But even the highest quality rendering option produced a jerky image, while the file size jumped to 150% of the original a+v.

What I'm looking for is a simple way to merge the a&v in an mp4 container, without any additional processing. It is self understood that the lengths of the a&v files (on the timeline) are the same, start to end.
Any suggestions please?
Thanks.


rica
vpinon
KDE Developer
Posts
708
Karma
6
OS
Hello,
Kdenlive is not the tool for that.
FFmpeg is what you need: ffmpeg -i infile1 -i infile2 -map ??? outfile (sorry I don't remember the map syntax, I let you search and try).
Maybe there are gui tools, I haven't searched for long, often it limits a lot what you can do...
User avatar
rica
Registered Member
Posts
11
Karma
0
OS
Thanks vpinon.
Good to learn that Kdenlive (or similar apps like Pitivi) won't do the merging job I need.
Checked the man ffmpeg, and will do a serious reading soon. At a quick look I believe I found what I needed, but have to learn the syntax.
Also found a FFmpeg GUI: WinFF, but seems to do only processing like Kdenlive (not the simple a&v merging, too).
Thanks again.


rica
User avatar
rica
Registered Member
Posts
11
Karma
0
OS
Got it (assuming the input files, as well as the output one, are all in Home/Videos). This is for a .mp4 video to be muxed with a .mp4 (mp4a which is an .aac format) audio file.
Code: Select all
ffmpeg -i /home/username/Videos/VideoFileName.mp4 -i /home/username/Videos/AudioFileName.mp4 -c copy /home/username/Videos/MuxedFileName.mp4

If audio file is of another format, ffmpeg might automatically transcode it to .aac before muxing. If transcoding doesn't happen, code below should do the job (.waw is an example):
Code: Select all
ffmpeg -i /home/username/Videos/VideoFileName.mp4 -i /home/username/Videos/AudioFileName.waw -c:v copy -c:a aac /home/username/Videos/MuxedFileName.mp4

Thanks again vpinon for pointing me to ffmpeg.

Sources:
https://streaminglearningcenter.com/blo ... files.html
and especially:
https://superuser.com/questions/277642/ ... -in-ffmpeg


rica


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]