Open-source News

AMD Zen 4 SMBA & BMEC Features Still Working Their Way To The Linux Kernel

Phoronix - Sun, 01/22/2023 - 19:25
Two quality of service features new with the Zen 4 processors are still seeing their software support squared away ahead of mainlining in the Linux kernel...

How Linux rescued precious audio files with FFmpeg

opensource.com - Sun, 01/22/2023 - 16:00
How Linux rescued precious audio files with FFmpeg Don Watkins Sun, 01/22/2023 - 03:00

Recently I was asked by a customer to create compact discs of priceless family recordings. My client insisted that the media be delivered as compact discs and not as digital files in an MP3 player or other similar device. One of the source recordings was on a compact disc and in AIFF format. As such my client could not play this media that contained her husband's voice. I was able to convert it using Audacity, and then was able to burn it to a compact disc with Brasero, which has been my go to CD creation tool.

The balance of the audio files were in MP3 format. I was able to create compact discs with Brasero very quickly. There was, however, one file that was so large that it exceeded the capacity of the compact disc medium. This large file contained nearly two hours of audio. The capacity of compact discs is 72 minutes.

This presented a problem. How could I split the large file into smaller segments that would allow me to create media and fit on media that my client could use? I decided to use a DVD instead of a compact disc. Using a DVD provided me with a much larger capacity disc, but how could I convert the MP3 files to a format that would allow me to create a DVD? I tried using HandBrake, but was unable to convert MP3 to MP4 format because MP4 expected a video stream, and I had no video. Then I discovered that I could use FFmpeg to convert the files.

Convert media files with FFmpeg

If you're looking for a powerful tool to help you with your audio and video files, look no further than FFmpeg. FFmpeg is highly versatile and able to support an impressive range of popular formats like MP3, MP4, and AVI. You can also use it to convert files between different formats, which was very useful in my case.

You can easily install FFmpeg on your Linux system in a terminal on Fedora and similar distributions:

$ sudo dnf install ffmpeg

On Debian and similar distributions:

$ sudo apt install ffmpeg

According to its man page, "FFmpeg is a very fast video and audio converter that can also grab from a live audio and video source. It can also convert between arbitrary sample rates and resize video on the fly with a high-quality polyphase filter." FFmpeg has excellent documentation in addition to an extensive man page.

The command-line interface of this tool might seem daunting for newcomers, but this feature is what makes it so powerful. Developers and system administrators can easily write scripts to automate complex tasks. If you make the most of this feature you can streamline your workflow like a pro.

Using the command-line interface, I was able to convert the MP3 file to the required MP4 format using the following command:

$ ffmpeg -f lavfi -i color=c=black:s=1280x720:r=5 \ -i audio.mp3 \ -crf 0 -c:a copy -shortest output.mp4

The -f lavfi option sets a virtual input device as the source of the video stream. Essentially, this creates a video file (which is what a video DVD requires) instead of an audio file. The audio file I actually care about gets included thanks to the -i audio.mp3 option. The video that gets created is a black screen, as defined by -i:

color=c=black:s=1280x720:r=5.

More Linux resources Linux commands cheat sheet Advanced Linux commands cheat sheet Free online course: RHEL technical overview Linux networking cheat sheet SELinux cheat sheet Linux common commands cheat sheet What are Linux containers? Our latest Linux articles

I ran into a snag using Brasero with this new MP4 file. Brasero would not create a DVD without the addition of a couple of cstreamer codec. From some quick research, I found another open source DVD creation program called DevedeNG that had everything I needed built-in. Upon installing the DevedeNG program, I was able to create the DVD media in 20 minutes. Your time may vary, depending on your computer system. DevedeNG is licensed under GPLv3.

Solving problems with open source

FFmpeg is licensed under the GNU Public License. FFmpeg is always evolving! The project is actively maintained and updated on a regular basis. This gives you the latest features, improvements, and bug fixes so you can rest easy knowing your audio and video formats are supported.

Another way I could have resolved the space issue was by burning the MP3 audio as data files onto the DVD, leveraging the 4 GB of space available on the DVD for just the audio data. The DVD would have basically been, in that scenario, a hard drive. You'd insert it into your computer and listen to the MP3 file through music player software.

The way I ended up burning the audio DVD created a media DVD, which is recognized by either a computer or a DVD player. Because there's an "empty" video stream (it's actually not empty, it has black pixels in it), DVD players recognize the media as a movie. This means that when you listen to the audio track, you're actually watching a blank video with accompanying audio.

There's no right or wrong way to solve these puzzles. What's important is that you know how to get to the place you need to be. The goal was to preserve audio that was of particular importance to my client, and open source made it possible.

FFmpeg is a highly versatile tool that supports a range of popular formats like MP3, MP4, and AVI. You can also use it to convert files between different formats.

Image by:

WOCinTech Chat. Modified by Opensource.com. CC BY-SA 4.0

Linux Audio and music What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Linux 6.2-rc5 Released - The Kernel Will Most Likely Be Extended Through 6.2-rc8

Phoronix - Sun, 01/22/2023 - 08:55
Linus Torvalds just released Linux 6.2-rc5 a day early compared to his usual Sunday ritual as a result of traveling. Due to an uptick in activity this week and the downtime around Christmas / end-of-year holidays, Torvalds is planning on this cycle spanning through Linux 6.2-rc8 before going gold...

helloSystem 0.8 Released As macOS Inspired FreeBSD Desktop OS

Phoronix - Sun, 01/22/2023 - 05:50
Following the demise of PC-BSD/TrueOS, the most compelling BSD-based desktop operating system with a pleasant out-of-the-box user experience is helloSystem. The helloSystem OS has been aiming to be the macOS of the BSDs and for the past few years has been building a macOS-inspired desktop atop FreeBSD. Out today is helloSystem 0.8 as their newest version built atop FreeBSD 13.1...

AMDGPU Linux 6.3 Addition To Help With Optimized Buffer Placement

Phoronix - Sun, 01/22/2023 - 01:00
On Friday AMD sent out another round of feature patches for new kernel graphics driver material they have readied in advance of the Linux 6.3 kernel cycle...

NVIDIA Contributes linux_dmabuf v4 Feedback Support To XWayland

Phoronix - Sat, 01/21/2023 - 22:00
NVIDIA engineer Austin Shafer has contributed linux_dmabuf v4 feedback protocol support for upstream XWayland. This is working towards allowing scan-out modifiers that a compositor advertises to be delivered to X11 applications under (X)Wayland...

IBM Looks To Squeeze Support For Future Power "Dense Math" CPUs Into GCC 13

Phoronix - Sat, 01/21/2023 - 19:41
Back in November IBM engineers sent out compiler patches for "future" CPUs and notably added new dense math instructions. At the time they noted the new target "may or may not be present" in future IBM Power processors but now they are hoping to get these "future" patches squeeze into the GCC 13 compiler...

DualShock 4 Controller Support Being Dropped From HID-Sony In Favor Of New Driver

Phoronix - Sat, 01/21/2023 - 19:17
With the Linux 6.2 kernel Sony DualShock 4 controller support was added to the "hid-playstation" driver as the newer open-source driver maintained by Sony and started out originally in supporting the PlayStation 5 DualSense controllers. The DualShock 4 controller was long supported by the "hid-sony" driver while now in the Linux 6.3 kernel that support will be removed...

More Improvements Come To KDE Plasma Wayland, KF6 Development Enters Next Phase

Phoronix - Sat, 01/21/2023 - 19:05
KDE developers have had a busy start to 2023 with preparing Plasma 5.27 for release as the final feature version in the Plasma 5 series. Work on Plasma 6.0 and KDE Frameworks 6 continues heating up...

Pages