The opposite of a human-readable format.
Less evil are BLOBs that come from Reproducible builds.
Invented for Bitcoin.
So dominant that it is usualy called just "zip".
You select a sample noise-only area, and it remove noise from the entire video for you:
In simple terms, represents keystrokes of a piano, but it can likely also represent other effects (TODO confirm: bend, vibrato, slides, attack strength)
Can contain multiple parallel tracks as seen from the Wikipedia example: en.wikipedia.org/wiki/File:MIDI_sample.mid
You can see what it contains well with GUI music editor.
MIDI is fun. It is a basic high level representation of most instrumental music, including beats.
To actually listen to MIDI, you need a software synthesizer, which knows what sound to make for each note. One way to specify such instruments is the SoundFont file format.
Convert MIDI to more common standalone formats:
Contains instructions on how to synthesize MIDI.
Extension: sf2.
Can be imported for example by:
- vmpk
- Csound with
sfload
: www.csounds.com/manual/html/sfload.html
Opens a virtual MIDI piano GUI. It just works on Ubuntu 20.04: askubuntu.com/questions/34391/virtual-midi-piano-keyboard-setup/1298026#1298026
VMPK is a virtual device that replicates what you would get by connecting a physical MIDI keyboard to your computer. It is not a software synthesizer on its own. But it does connect to a working synthesizer by default (Sonivox EAS) which makes it produce sounds out-of-the box.
TODO: then I messed with my sound settings, and then it stopped working by default on the default "MIDI Connection" > "MIDI Out Driver" > "Network". But it still works on "SonivoxEAS".
A hello world of actually connecting it to a specific software synthesizer manually on Advanced Linux Sound Architecture with
aconnect
can be found at: askubuntu.com/questions/34391/virtual-midi-piano-keyboard-setup/1298026#1298026Save to a MIDI file: askubuntu.com/questions/709673/save-as-midi-when-playing-from-vmpk-qsynth/1298231#1298231
Reasonable default key mappings to keyboard covering 2 octaves.
3 multiple simultaneous keys did not work (tested "ZQI"). This might just be a limitation of my keyboard however.
TODO how to save to a
.mid
file? askubuntu.com/questions/709673/save-as-midi-when-playing-from-vmpk-qsynthThe generic tool recommendation question: unix.stackexchange.com/questions/7425/is-there-a-robust-command-line-tool-for-processing-csv-files
Lots of features, but slow because written in Python. A faster version may be csvtools. Also some annoyances like obtuse header handing and missing features like grep + cut in one go: csvgrep and select column in csvkit.
Simple example:
output:
printf '00,11,22\n33,44,55\n' | csvgrep -H -c2 -r '^11$' | tail -n+2
00,11,22
More verbose description:
There seems to be no way without a pipe, you seem to need to reparse the columns, e.g. the tutorial at: csvkit.readthedocs.io/en/latest/tutorial/2_examining_the_data.html#csvgrep-find-the-data-you-need does:
csvcut -c county,item_name,total_cost data.csv | csvgrep -c county -m LANCASTER
A compiled executable under
/usr/bin/csvtool
, has an Ubuntu 23.04 package: manpages.ubuntu.com/manpages/lunar/en/man1/csvtool.1.htmlThere seems to be no sane filtering mechanism however: stackoverflow.com/questions/46540752/using-csvtool-call-to-filter-csv-in-bash
Build failed with
undefined reference to pcre_config
on Ubuntu 23.04: github.com/DavyLandman/csvtools/issues/18Unfortunately it is lacking some basic options, like optional header + selecting column by index on
csvgrep
(though csvcut
has it). The project seems kind of dead.Also unclear if it allows to filter + print only selected columns.
Is this the one?
The fact that you cannot have trailing commans in lists or dicts as in
is one of the most infuriating design choices of all time!!!
3,
at:
{
"asdf": [
1,
2,
3,
]
}
echo '[{"a": 1, "b": 2}, {"b": 3}]' | jq '.[] | select(.a) | .a'
1
Bibliography:
Do you know what is worse than XML? Pseudo XML: stackoverflow.com/questions/5558502/is-html5-valid-xml/39560454#39560454
XML predecessor.
SGML predecessor.
XPath kind of died with the rise of CSS selectors around the beginnning of the 2010's. But that is a shame. XPath is a good standard, and was generally more powerful than CSS selectors for many many years.
Represents image pixel by pixel, rather than by mathematical primitives such as done in vector graphics:
Smaller files, scalable image size, and editability. Why would you use anything else for programmatically generated images?!?!
Companies have been really slow to support SVG features in their browsers, and that is very saddening: medium.com/@michaelmangial1/introduction-to-scalable-vector-graphics-6450c03e8d2e
You can't drop SVG support for
canvas
until there's a way to run untrusted JavaScript on the browser!SVG does have some compatibility annoyances, notably SVG fonts. But we should as a society work to standardize and implement a fix those, the benefits of SVG are just too great!
Examples:
- svg/svg.svg a minimal somewhat sane SVG:
- if the
width
andheight
properties were not given, you get the default 300x150, which seems to be set in the SVG standard:
- if the
- how to add na SVG image to a HTML file:
- svg/svg.html: external image. The included file is svg/svg.svg.
- svg/inline.html: inline.
- svg/billion-laughs.svg
- svg/html.svg
- svg/triangle.svg
- svg/viewBox.svg: this attribute allows you to control the default SVG
svg width=
andheight=
while keeping the coordinates of the drawing untouched. If theviewBox
aspect ratio differs from the width/height ratio, you likely want to play withpreserveAspectRatio
, otherwise you would get white spaces by default on the generated image - CSS with SVG:
- svg/style.svg: inline CSS
- svg/style-external.svg: external CSS with:
<?xml-stylesheet type="text/css" href="svg.css" ?>
, see also: stackoverflow.com/questions/18434094/how-to-style-svg-with-external-css- svg/subdir/style-external.html: is the relative CSS relative to the HTML or to the SVG? Answer: to the SVG... OMG. So how to make it work reliably?
- svg/current-color.html and svg/current-color.svg: illustrates
fill="currentColor"
. Only works for inline SVG however... See also: stackoverflow.com/questions/13000682/how-do-i-have-an-svg-image-inherit-colors-from-the-html-document/13002311
- JavaScript with SVG:
- svg/defs.html hows how
defs
works- svg/defs-external.html tries to include external
defs
from svg/defs.svg, but that fails like everything else related to external SVGs
- svg/defs-external.html tries to include external
This is a pain point as of SVG 1.1...
Examples at svg/background.html which answers from stackoverflow.com/questions/11293026/default-background-color-of-svg-root-element/11293812:
- svg/background-rect.svg
- svg/background-viewport-fill.svg: was part of SVG 1.2, but that whole standard got dropped. Not implemented neither in Chromium 85 nor Firefox 93 as of 2021.
This pain reflects directly on Inkscape: set SVG background color in Inkscape.
The major problem with SVG is text computer fonts. If you make an image with text that depends on one computer font and it is not present in the viewer's machine, it will use some other font, which may overlap with other elements of the image. Some libraries Matplotlib solve this by writing characters as curves, but this produces large files and unsearchable text. The inability of different computer platforms to standardize fonts that must always be present is a major issue.
TODO:
Dropped in favor of SVG 2.
PNG reference implementation. Ahh, if feels good to have a dominating open source reference implementation.
Demo of using it by Ciro Santilli: stackoverflow.com/questions/1362945/how-to-decode-a-png-image-to-raw-bytes-from-c-code-with-libpng/36399711#36399711
It's not super easy to use at first.
And it sometimes says that the basic drawing thing you want to do is off the project's scope.
But as you learn more about it and further generalize the concepts, there are often reasonable reasons for those design choices.
And the UI looks good :-)
Examples:
- superuser.com/questions/167873/how-do-i-draw-a-box-in-gimp you need to go on a top menu to draw a rectangle
Some answers by Ciro Santilli:
Inkscape is a a good software for editing/creating SVG files.
Its functionality is fundamental for as a software for drawing geometry diagrams, as it is a good middle ground between algorithmic generation, and raster graphics.
At 1.0.2, its UI is a bit terrible:
- the way the menus open on the right with title below the window...
- several defaults are atrocious, e.g. export drawing rather than page
And it crashes from time to time on Ubuntu 21.04. And it has some glaring bugs, e.g.:
But still, it is a very good initiative.
What would be really amazing is if they had constraints: gitlab.com/inkscape/inbox/-/issues/1465 like proper CAD software, it would make it possible to not have to redo entire diagrams when you want to change a small part of them.
There's a tiny little crosshair that you can drag around to set the center of rotation.
And there's a button to make that crosshair snap: inkscape.org/forums/questions/can-a-pivotingtransfrom-crosshair-be-moved-and-made-to-snap-to-a-node-or-a-grid-point/#c14432
This is related to the underlying SVG pain point of SVG background color:
For PNG export:
This seems like a decent option, although it has bugs coming in and out all the time! Also it is quite hard to learn to use.
To get started:
- import a clip
- drag it onto the track area
Shortucts:
- Shift + R: cut tracks at current point. You can then select fragments to move around or delete.
- Shift mouse click drag: select multiple clips: video.stackexchange.com/questions/21598/select-range-of-clips-in-kdenlive
To set the video length, search for "set outpoint" on "monitor".
Add subtitles:then drag on top of the video track. To add only to part of the video, cut it up first.
- Effects
- Dynamic text
Preview has no sound on Ubuntu 20.10. Fixed as of Ubuntu 22.04.
Sound worked on Ubuntu 21.04 though, but it then soon crashed with:
= = SET EFFECT PARAM: "rect" = 0=1188 0 732 242
MUTEX LOCK!!!!!!!!!!!! slotactivateeffect: 1
// // // RESULTING REQUIRED SCENE: 1
Object 0x557293592da0 destroyed while one of its QML signal handlers is in progress.
Most likely the object was deleted synchronously (use QObject::deleteLater() instead), or the application is running a nested event loop.
This behavior is NOT supported!
qrc:/qml/EffectToolBar.qml:80: function() { [native code] }
Killed
On Ubuntu 22.04 haven't crashed yet.
Ubuntu 23.04 broke the clip drag and drop!
Worked on Ubuntu 20.10.
The UI is a bit too buggy to bear.
How to unsplit, can't find on shotcut 21.05.01: forum.shotcut.org/t/is-it-possible-to-unsplit/1466/2
Background noise reduction: couldn't easily find out how, especially with automatic profile detected based on a selected region as mentioned at audacity profile-based background noise removal:
Ubuntu 20.10 crash...:
exceptions:ERROR Unhandled Exception
Traceback (most recent call last):
File "/usr/bin/openshot-qt", line 11, in <module>
load_entry_point('openshot-qt==2.5.1', 'gui_scripts', 'openshot-qt')()
File "/usr/lib/python3/dist-packages/openshot_qt/launch.py", line 97, in main
app = OpenShotApp(argv)
File "/usr/lib/python3/dist-packages/openshot_qt/classes/app.py", line 218, in __init__
from windows.main_window import MainWindow
File "/usr/lib/python3/dist-packages/openshot_qt/windows/main_window.py", line 45, in <module>
from windows.views.timeline_webview import TimelineWebView
File "/usr/lib/python3/dist-packages/openshot_qt/windows/views/timeline_webview.py", line 42, in <module>
from PyQt5.QtWebKitWidgets import QWebView
ImportError: /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5: undefined symbol: _ZN4QRhi10newSamplerEN11QRhiSampler6FilterES1_S1_NS0_11AddressModeES2_, version Qt_5_PRIVATE_API
On Ubuntu 20.10, just:
ffmpeg -i input.mp4 -vf "subtitles=subtitle.srt" output.mp4
To change font size: stackoverflow.com/questions/21363334/how-to-add-font-size-in-subtitles-in-ffmpeg-video-filter
The default appears to be 24, so just multiply that by whatever seems like a reasonable factor.
ffmpeg -i input.mp4 -vf "subtitles=subtitle.srt:force_style='Fontsize=64'" output.mp4
Note howver that .ass subtitle files can contain style information, which ffmpeg respects. Aegisub can produce and preview such styles, making .ass one of the best options.
Written in C#.
This worked well on 3.2.2 Ubuntu 20.10. Recommended.
First import video with:
They don't have an
aegisub-3.2 ourbigbook-parent.mkv
aegisub
executable without the version number. Amazing.If you already have a subtitle file that you want to edit, then just pass it on as well:
aegisub-3.2 ourbigbook-parent.mkv ourbigbook-parent.ass
Ctrl + P: play and pause video.
Ctrl + 3: set current substitle start time.
Ctrl + 4: set current substitle end time.
Enter: finish editing the current entry and start a new one.
Good shortcuts and user experience.
No waveform viewer: github.com/otsaloma/gaupol/issues/49 so unusable.
Not to be confused with Subtitle Edit.
As of 0.54.0 this feels featureful, but extremely buggy or lacking UI obvious enhancements that would be simple to implement, and offer huge value:
- fundamental not defined out of box, e.g. Tiny forward/backwards. You can define them yourself, but they should be provided.
- github.com/SubtitleEdit/subtitleedit/issues/4976 can't export SubRip?
- can't interact with video on waveform?
It is hard to understand how that project reached this weird featureful but crappy state. Feels like they just gave push permission to a bunch of random people.
A Microsoft format for flashing microcontrollers by copying files to a magic filesystem mounted on host, e.g. as done on the Micro Bit and Raspberry Pi Pico.
Articles by others on the same topic
There are currently no matching articles.