Avidemux, a good video editor

If you don’t need a sophisticated video editing, but a linear editing one, Avidemux can be still a good option.

However it has not an official updated release (for Ubunutu) since 2022. An alternative to get it updated is flatpack, but with flatpack Avidemux uses a very huge quantity of disk space.

Another good linear video editing app would be Lesslosscut, but it is an app even bigger (and sucking ram) than Avidemux. Not to speak of installation problems with wayland.

So I resolved to:

  • uninstall avidemux flatpack and so free an huge space on disk:
flatpak uninstall org.avidemux.Avidemux
flatpak uninstall --unused
  • download a Nightly automated build and install it. In this way: I unpacked the files and do this command:
sudo dpkg -i *.deb

and I fixed missing dependencies

sudo apt update
sudo apt install libqt6core6 libqt6gui6 libqt6widgets6 libqt6network6 libqt6openglwidgets6
sudo apt install libfaac0

sudo apt –fix-broken install

Now I have an updated Avidemux app, with a fair space usage.

Get subtitles from a mkv

1) With Mkvtoolnix, if there is a subtitle in a mkv, you can easily extact it, deselecting all the other tracks and then giving the command “start multiplexing”: it will save that track as a mks file.

2a) If that track is a text one, you can easily convert it in a srt with this command (with a subtitle editor you could have to do another, easy conversion from an ass format to a real srt format):
mkvextract tracks "your-mks-file.mks" 0:a-name-you-want.srt.

2b) It the track is an image one (i.g. with one .sup file or two .sub e .idx files) you should use some online tool, such as subtitlestools.com so that from two files, sub e idx, you can one file srt. It could be a long process, waiting for your time aftr other users. But that webpage should keep working even you go offline and the day after you come back to download your srt file.

Sometimes however the easiest way is to find your srt files online, i.g. with OpenSubtitles.

Create a video with a static image from an audio file

In Linux this is possible in a terminal, with the following command:

ffmpeg -loop 1 -i image.jpg -i audio.mp3 -c:v libx264 -tune stillimage -c:a aac -b:a 192k -vf "scale='iw-mod(iw,2)':'ih-mod(ih,2)',format=yuv420p" -shortest -movflags +faststart out.mp4

How to cut a video where you want (beyond keyframes)

With editor like Avidemux you can cut a video only in correspondence with certain specific points (the Keyframes). Otherwise the video is corrupt. But there are applications that allow you to overcome this limit: for example ShotCut.

To use it a simple way is to add the video to the timeline (with “+”), and to set a cut point (with “][“), so splitting the video, and then to remove the undesired part (after selecting it). Then export the resulting video.

how to merge video files

Two ways:

1) via terminal

you can use this code

mkvmerge -o outfile.mkv infile_01.mp4 \+ infile_02.mp4 \+ infile_03.mp4

2) graphically

by using f.e. Avidemux:

  • open the first video file
  • go to the end of that file
  • append the second, and go to the end
  • then append all other possible video files
  • if you plan to merge several video (such as several films), you can queue instead of save (immediately) the files

VLC and chapters

VLC is a good player, but it can happen that if you create only one mkv chapter, it doesn’t recognize it (unlike other player such as, in Linux, SMPlayer).

To fix this you have to add at least two chapters,

syncing subtitles troubles

framerate

Correcting subtitles framerate may be very important to sync it with audio/video. You can select all subtitles with an editor, and change framerate (for example to 25 from 23.976).

Thereby you should see the video correctly (with VLC or others).

the ultimate solution

If adjusting framerate didn’t fix your problem, you can try an excellent tool (for Linux, Windows and Mac as well): SubSync, whicth works syncing audio with subtitles, and was able so far to solve all my sincing subtitles problems.

You could have a permissions problem working the first time with SubSync, but you will find easily on the web.

how split a mkv with subtitles

You can use mkvtoolnix, then go to -> output, and -> splitting -> by parts based on timestamps -> and there you can write the beginning and the end of the part you want extract (without spaces: like 1:02:07-1:04:40, for example).

How to change encodig of “.srt” Subtitle File in UTF-8

To encode your SRT file in UTF-8 (for instance: “video.srt”), please follow this process:

1. Rename (F2) the “video.srt” file with your PC in “video.srt.txt”.
2. Launch a text app, like Kate.
3. Click on the “File” menu then select “Save the file as…”.
4. In coding option, select “UTF-8”. Then save your file.
5. Rename (F2) the file “video.srt.txt” to “video.srt”.
Done!

from: Zappiti Player 4K [EN]