Which is the "correct" content-type for FLAC? - mime-types

Some software uses audio/flac. Some uses audio/x-flac.
MDN suggests that x-flac is "non-standard". But based on what?
But this appears to be the official registry for audio/ types... and audio/flac doesn't appear on it. Has nobody ever registered flac there? Whyever not?
In 2021, what is the correct place to determine the list of "standard" content-types, and what is it for FLAC?

In 2022 Mozilla seems to have the answer:
The Free Lossless Audio Codec (FLAC) is a lossless audio codec; there
is also an associated simple container format, also called FLAC, that
can contain this audio. The format is not encumbered by any patents,
so its use is safe from interference. FLAC files can only contain FLAC
audio data.
audio/flac
audio/x-flac (non-standard)
So, depending on that I go with audio/flac. It seems to work for me on a Grav website.

Related

Java path object Vs File

I am trying to find a read that differentiates the advantages of using a Path object over the File object in java. I see a comparison of the API here http://docs.oracle.com/javase/tutorial/essential/io/legacy.html but don't really see the real advantages anywhere. Any pointer will be appreciated!
Generally one could say that both classes have different focus.
File is designed for file handling (creating, deleting, ...) while Path is focused on filename parsing.
File seems to have most functionality of Path included but there may be special cases where Path suits better.
Please see the documentation sites (especially methods overview) java.nio.File and java.nio.file.Path for further information.

How Do I Get the Suggested File Extension for a Document Format?

The OWL API supports many different output document formats. I would like to give the user a choice of which format to use, but each format should have a different file extension, such as .ttl for Turtle and .rdf for RDF. Does the API provide a way to get a suggested file extension for a given format?
If there isn't a way, I wish there were!
There is nothing to do this at the moment. I have opened an issue for it:
https://github.com/owlcs/owlapi/issues/346
Edit: There's now an Extensions enum that links (some of) the format classes to (some of) the most common file extensions.
Usage: `Iterable formats=Extensions.getCommonExtensions(RDFXMLDocumentFormat.class);'
This is available in the master, version4 and version5 branches. Will be available in the next releases of OWL API.

How to convert MP4 (h264/aac) file to F4F fragments for HDS (Adobe)

I am looking for some input on how to programmatically convert mp4 files to fragmented f4f files with accompanying manifests.
I currently have an implementation for creating segmented MPEG2-TS files with accompanying manifest for Apples HLS, and want to create a similar piece of software for Adobes HDS.
My code is based on Libav (alternatively, ffmpeg), so I was hoping they had native support for muxing f4f files, but I have not been able to find any resources for it.
What I am specifically looking for:
How (if) the format is used in libav?
If there is any special requirements (such as the h264_mp4toannexb filter required for converting MP4 to MPEG2 TS)?
Any sample code (even if it's not using libav/ffmpeg)
An easy-to-read manifest specification.
I'm afraid you have to read mp4/f4f specification, and implementation it your self.
MP4 file format: ISO/IEC 14496-14
f4f file format: It is included in the f4v specification.(http://www.adobe.com/cn/devnet/f4v.html)
The code of mod_h264_streaming (http://h264.code-shop.com/trac) may be helpful.

Programmatically capture X11 region with ffmpeg in C/whatever

There is an input format option to ffmpeg -- x11grab which allows one to capture specified region and output it to file/stream. I'm trying to do the same thing programmatically, but i haven't found any non-basic tutorials/reference for ffmpeg API.
I wonder, how it is possible to open x11 region with avformat_input_file or something like this. Or should i do it with XCopyArea/etc?
(Any programming language will satisfy)
There are many applications that take a screenshot. Major hint: it's open source, use the source. If you can't find the code in ffmpeg, any example application will do:
http://git.gnome.org/browse/gnome-screenshot/tree/src/screenshot-utils.c#n425
This is gnome-screenshot source code. This example uses gdk_get_default_root_window().

How would I use gstreamer to stitch a set of images together to form a video slideshow

I'd like to take a set of images and a sound track and use that to form a basic video slideshow using gstreamer.
There seems to be a lot of documentation and examples of basic gstreamer usage like playing a video or audio file, or even transcoding and the like. But I can't seem to find anything particularly useful for, I suppose, video editing tasks.
I feel that I have a decent grasp of the fundamentals of gstreamer, but I'm having trouble conceptualising how I would join the dots, so to speak. Specifically the bit where I take a set of images and turn them into a single video output.
The module MultiFileSrc will do that for you.
From the doc
The multifilesrc element is used to read a collection of sequentially named files, e.g., 00001.jpg, 00002.jpg, 00003.jpg, etc., into a GStreamer pipeline.
== Example Pipeline ==
This pipeline reads the files 00001.png, 00002.png, etc., decodes them, and then reencodes the video into Ogg/Theora.
gst-launch multifilesrc location=%05d.png \
caps="image/png,framerate=30/1,pixel-aspect-ratio=1/1" ! \
pngdec ! ffmpegcolorspace ! video/x-raw-yuv,format=(fourcc)I420 ! \
theoraenc ! oggmux ! filesink location=output.ogg
Use pitivi.
If you want to write the program anyway you should use gnonlin, the library pitivi is built upon. You would be putting together a gnlcompositon. See also http://wiki.pitivi.org/wiki/PyGST_Tutorial
Images Slideshow in Gstreamer
try this for an alternative solution. Worked for me.
Do you want to write a program? I think you should check out ffmpeg for making a video by providing a set of images. Its cross platform and hence may suit your need.
I hope it helps.
If you want related to gstreamer library then you can check out source code of various gstreamer based open source applications here.

Resources