Video Editing: How to add audio?

Audio editors, music players, video players, burning software, etc.
Post Reply
Message
Author
gabtech
Posts: 107
Joined: Sun 14 Apr 2013, 11:42

Video Editing: How to add audio?

#1 Post by gabtech »

Hi puppians. I just made a video using greengeek's pupslider app. now I want to add audio to the video. How do I mix video and audio in puppy?

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Combining video and sound files

#2 Post by mikeslr »

Hi gabtech,

Which Puppy? I don't know of any way to combine video and sound except by using a video creation/editing application. Most Puppies will be able to use some version of Openshot. Several have a version of Kdenlive. There are a few other video editing applications that will only work under specific Puppies such as Kino --never used it-- which was built for some, now old, Puppies; or Shotcut under an old version of FatDog; or flowblade which, IIRC, ran only under Tahrpup.

AFAIK, all video editing applications are difficult to build if you have to start by downloading binaries and libraries or, alternatively, compile from scratch. Hence my question, "Which Puppy?". With that information someone else or I can point to an existing application which may be just a simple download and install or sfs-load.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#3 Post by rufwoof »

For a simple combination of audio and video using command line ...

Code: Select all

ffmpeg -i "vid.mp4" -i "aud.mp3" -shortest out.mp4
Video editors such as OpenShot are good for adding things and aligning sound to image etc. Again however for a simple command line alternative, if after the above combination you find that the video and sound are out of sync by say 5.67 seconds then you can use ...

Code: Select all

ffmpeg -i "out.mp4" -itsoffset 5.67 -i "out.mp4" -map 1:v -map 0:a -c copy "video-delayed.mp4"
if the video is ahead of sound or

Code: Select all

ffmpeg -i "out.mp4" -itsoffset 5.67 -i "out.mp4" -map 0:v -map 1:a -c copy "audio-delayed.mp4"
if sound is ahead of video
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

gabtech
Posts: 107
Joined: Sun 14 Apr 2013, 11:42

Video Editing

#4 Post by gabtech »

Thanks rufwoof.

gabtech
Posts: 107
Joined: Sun 14 Apr 2013, 11:42

Video Editing

#5 Post by gabtech »

Hello mikesir. I'm using bionicpup64.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#6 Post by mikeslr »

Hi rufwoof,

Thanks for the info and recipe for using ffmpeg from the command-line to combine sound and video. Regretfully, I can't rely on my flaky memory to accurately retain code. As a result I either have to maintain copious notes --and remember where I put them-- or research anew each time they are needed. It's just more efficient for me to use an application with a GUI whose on-screen tools act as mnemonic devices.

Under BionicPup64 there are two video editing applications which can be used. Mike Walsh provided the recipe for installing Openshot 1.4.3, http://murga-linux.com/puppy/viewtopic. ... 73#1005173. I can confirm that this works as I used PaDS 1.1.4, http://www.murga-linux.com/puppy/viewto ... 922#998922 to combine the debs Mike Walsh noted into an SFS. Note, Openshot 1.4.3 is an "older" version. The most recent, I believe is 2.4.1. But it is larger and more dependent on Qt and probably demands more computer resources to employ. My flaky recollection suggested that 666philb had provided the newer version via Menu>setup>quickpet, Click the A & V tab. But after updating --Menu>Setup>Puppy Updates-- it wasn't there.

What was there was Kdenlive + vlc. Flame wars have been started as to whether Kdenlive or Openshot is better. But unless you're so used to how Openshot manages things that Kdenlive will trip you up, I'd suggest using kdenlive via quickpet. Update Bionicpup64 as noted above. Then select Kdenlive + Vlc from Quickpet's A&V drop-down list. Not all the offered repos worked. distro.ibiblio.org did. A kdenlive SFS was downloaded directly to my /mnt/home and loaded to what appeared to be a functioning GUI.

You can use both Kdenlive and Openshot, but not at the same time. Their versions of python (or mtl?) conflict. So if you installed (rather than created an SFS) Openshot via Mike Walsh's recipe, Kdenlive won't work. But if you created an Openshot SFS, Kdenlive will work after unloading the Openshot.SFS. And to use Kdenlive, unload the Openshot SFS.

While you're using Quickpet, you may want to download the Avidemux pet. Avidemux is (comparitively) a light-weight application for cutting/splicing and combining video clips. It can also be used to convert codec. But, it doesn't enable the overlaying of sound with video so as to combine them.

p.s. There are other possibilities. But they either involve a steep learning curve --cinelerra which works under any Puppy-- or finding and installing foundation framework (qt5) and/or libs --flowblade, shotcut whether built via deb assembly or to employ available AppImages, Flatpaks etc.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#7 Post by rufwoof »

For Openshot to be fully functional you also need inkscape (not the version that comes with Puppy's but rather the fuller version) and blender ... and the 'right' versions. Even the Debian repo didn't match the versions last time I looked (quite some months ago now, so maybe its improved).

Inkscape is used for the likes of adding text titles, whereas blender is used for animation effects. It can (may?) work OK without those for other general video editing purposes.

kdenlive is quite nice, but not as intuitive IMO as Openshot. But again its many months since I've used either.

Remember if you boot frugal/run in ram as I do, its quite easy to blow the available ram space when video editing, so best set it to run on hdd or, as I do, have a large swap (I have a 16GB encrypted swap partitions to supplement 4GB of ram). As otherwise, part way into a render it will just lockup and you lose all your work.
Regretfully, I can't rely on my flaky memory to accurately retain code. As a result I either have to maintain copious notes --and remember where I put them-- or research anew each time they are needed.
I like cli/tui (text user interface) for that Mike. I have tilda terminal that drops down Quake style when F1 is pressed (F1 toggles hide/show) I have a menu where when options are clicked (or entered) another tilda tab is opened with that program. One is a notes files in which I store reminders and whilst quite lengthy is easily searched (and/or edited). Presently I use calcurse for my diary/calendar, but a single text file for your calendar is nicer in many respects for its ease of moving things around and searching, so much so I've been meaning to move over to using that instead of calcurse. A nice feature with tilda terminal is that you can click hyperlinks and they open in your default browser, and its easy to cut commands out of your 'notes' and paste them to the command line. So even though its cli/tui, more often I'll be using the mouse to follow menu options or cut/paste etc. Mostly I'm only actually typing things when I'm doing the likes of posting here or on other boards, or mail lists, irc or BBS messages. cli/tui is also nice for when you connect to remote servers, as the interface remains the same. I run email, irc and bbs's from hashbang.sh for instance, so even if I power off a session, I can reboot and reconnect and carry on from where things were before (tui windows and content all exactly the same as when left).
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#8 Post by greengeek »

gabtech wrote:Hi puppians. I just made a video using greengeek's pupslider app. now I want to add audio to the video. How do I mix video and audio in puppy?
rufwoof wrote:For a simple combination of audio and video using command line ...
mikeslr wrote:Thanks for the info and recipe for using ffmpeg from the command-line to combine sound and video. Regretfully, I can't rely on my flaky memory to accurately retain code. As a result I either have to maintain copious notes --and remember where I put them-- or research anew each time they are needed. It's just more efficient for me to use an application with a GUI
Using rufwoof's suggested syntax I wrote a simple gui to make it easy to add an mp3 soundtrack to an mp4 file (such as those produced with my pupslider gui)

Has no fancy features like synchronisation but is useful for adding background music.

"Slidesound" gui thread here
Attachments
slidesound_gui.jpg
(26.86 KiB) Downloaded 204 times

Post Reply