RPi_Mike
Posts: 20
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Sun Dec 24, 2017 11:25 am

Gadgetguy wrote:
Sun Dec 24, 2017 7:37 am
Sorry I didn’t mean to hijack your thread ... Could you tell me whether your version of ffmpeg yielded the ffplay component of ffmpeg ... would you be able to test play a hd video with ffplay ... I gathered from your tutorial that your video output from mpv only comes in two flavours: full screen and the native size of the video ... I wonder if it would be too much to ask if you could try the hack ... to output ... to a window of specified size at a predetermined location...

As with your last extremely long post about the supposedly wonderful benefits of the SMPlayer GUI, FFplay is yet another off-topic matter. My tutorial doesn't even mention FFplay! Nonetheless, as a courtesy, I will answer your technical question.

I did not tamper with anything in the FFmpeg source code, so yes – my build creates everything in there, including the standard FFplay component. FFplay is more of a testing tool and was never intended as a standard media player. That's not my opinion – it's the description from the official FFmpeg website: FFplay "is mostly used as a testbed for the various FFmpeg APIs".

The standard version of FFplay that comes with FFmpeg's source code does NOT support hardware acceleration – at least not on the Raspberry. As a result, it is simply NOT able to play HD video without massive stuttering. I hesitate to even discuss this matter because not only is it off-topic, but it might confuse novice readers and create the false impression I'm somehow revealing a deficiency in my build. It is NOT a deficiency, nor is it even slightly relevant to my tutorial. Quite frankly, I'm not even sure why you're asking about FFplay. And please – I don't even want to know. That can only lead to even more confusing off-topic material on this thread. But I have no doubt you have your reasons. You've admitted to being a Linux beginner that loves to fiddle with your Raspberry and conduct all kinds of experiments. That's your business, and if you want to create a separate thread entitled "Gadgetguy's FFplay experiments", have at it!

Finally, you gathered wrong about the capabilities of my mpv build. Its behavior is EXTREMELY CUSTOMIZABLE and is NOT limited to "two flavors". You can absolutely control the size and location of any video. It's not a "hack" either – it's just one of the HUNDREDS of standard customizable features that come with mpv. Personally, when I want to enjoy a video, I'm not looking to "multitask" – especially not on a $35 computer with limited resources. When I want to enjoy a video, I want to enjoy a video! And again, I honestly don't want to clutter this thread with why you like to do that. It's just not relevant. But as you requested, I temporarily added ONE line to mpv's configuration file (mpv.conf) to shrink a full-blown 1080p video down to a tiny overlay. Here are two quick examples:

EXAMPLE 1 – TINY VIDEO IN UPPER-LEFT CORNER:

geometry=20%+0+0

The numerical values in the above line are saying "make the video 5 times smaller (20%) across the diagonal and 5 times smaller (20%) down the vertical. In the aggregate, that means it's 5 x 5 = 25 times smaller than full screen. In terms of surface area, that's only 4% of my screen! The "0+0" refers to the X and Y location you want for the UPPER-LEFT CORNER of the video. In this case, it means "I want the top-left corner of my video to appear 0 pixels from the left of my monitor, and 0 pixels from the top of my monitor".

EXAMPLE 2 – TINY VIDEO IN UPPER-RIGHT CORNER:

For this example, simple math is in order. My monitor is 1920 pixels across. 20% of 1920 is 384. And 1920 - 384 = 1536. That means the upper-left corner of the video should start at 1536 on the X axis and 0 on the Y axis. As a result, the following line will place a tiny video in the upper-right corner of my screen:

geometry=20%+1536+0

In both of these examples, tapping the "f" key instantly toggles the video back and forth between FULL SCREEN and TINY SCREEN. Mpv handles it beautifully in the blink of an eye.

I previously included other brief examples of the many things you can do to customize mpv (in Appendix 1 of my tutorial). But if you want to know any more about the full range of options available in the latest version of mpv, please visit their official website and read their extremely thorough manual:

https://mpv.io/manual/stable/

crispn
Posts: 5
Joined: Tue Jan 24, 2017 1:35 pm

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Thu Dec 28, 2017 11:38 am

Hi,

I came upon this tutorial and have been stepping through, literally, partly as a way of familiarizing myself with linux but also hoping to be able to digitize some old camcorder DV tapes I have lying around.

So a Big Thanks, first of all to Rpi_Mike for the effort he's made.

Anyhow, I get to step 10, (libass subtitle renderer) and on the './configure --enable-shared' step I am getting...

configure: error: Package requirements (fribidi >= 0.19.0) were not met:

No package 'fribidi' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables FRIBIDI_CFLAGS
and FRIBIDI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


Has anyone else encountered this and know of a solution?

Debian version 9.3 and I didn't do the rpi_update.

RPi_Mike
Posts: 20
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Fri Dec 29, 2017 2:03 am

crispn wrote:
Thu Dec 28, 2017 11:38 am
Big Thanks, first of all to Rpi_Mike for the effort he's made.

Anyhow, I get to step 10, (libass subtitle renderer) and on the './configure --enable-shared' step I am getting...

configure: error: Package requirements (fribidi >= 0.19.0) were not met: No package 'fribidi' found

{I have} Debian version 9.3

My initial comment is not directed to you or your post – it's just a general observation for ALL readers: My tutorial was hard to create but it's RELATIVELY easy to follow. The key word is "relatively"! In other words, all you need to do is "mindlessly" copy and paste my command lines into the Terminal window. As long as you meet the simple conditions in my "requirements" section and follow my two basic "warnings", you should be OK. However, it's extremely easy to make mistakes on mindless tasks! There are more than 70 separate copy and paste steps in my procedure. If the user accidentally fails to correctly copy even one character, FUHGETTABOUTIT! If the user accidentally gets two lines out of sequence, FUHGETTABOUTIT! If the user accidentally skips a step, FUHGETTABOUTIT! And finally, if the user decides to "modify" my instructions even slightly, who knows what might happen!

I have found the best way to run through my tutorial is to have two (and only two) non-overlapping windows on your screen – the Terminal window on your left and the Text Editor on your right. That way, you can easily copy and paste between the two windows and keep track of the exact step you're on. (Please see the "Critical Tip" section of my tutorial for more detail.)

Now, let me address the specific error you report. I obviously didn't see what you did in the moments leading up to your problem, so all I can do is start with the most likely cause and work my way down.

The key element in your error message is this:

"configure: error: Package requirements (fribidi >= 0.19.0) were not met: No package 'fribidi' found"

In plain English, that means that either (1) a package named fribidi is not currently installed on your system or (2) a "sub-package" referred to as fribidi – which comes as part of a larger package – is not currently installed on your system.

In this case, since there's no such thing as a package with the exact name of "fribidi", the second scenario applies. All the "fribidi" stuff you need comes with the package named "libfribidi-dev". The "lib" prefix means it's a software library and the "dev" suffix means it's for "development" purposes – building from source code, for example.

It's also letting you know that even if you have "fribidi" installed on your system, that by itself is not good enough. Instead, it must also be at least version 0.19.0 – OR GREATER!

Due to my careful efforts, I'm pleased to report that my tutorial already included the correct package. Not only that, the version number is more than sufficient as well. Here's proof:

In Step 3 of my tutorial, you will see the following stanza:

sudo apt-get install git wget autoconf automake build-essential pkg-config checkinstall libsdl2-dev libtool libva-dev libvdpau-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev texinfo libfribidi-dev libfontconfig1-dev libfreetype6-dev libjpeg-dev gnutls-dev libluajit-5.1-dev python-docutils libbluray-dev libtheora-dev libvorbis-dev linux-headers-rpi2 libomxil-bellagio-dev

As you can see, "libfribidi-dev" is highlighted in bold. It's one of the 27 standard software packages that my instructions download and install from the official Raspbian Stretch repository – via the standard "sudo apt-get install" command.

To check on the exact version number that's currently in the repository, enter the following command in Terminal:

apt show libfribidi-dev

As long as you first ran "sudo apt-get update" to update your available package list – which my tutorial instructs you to do in Step 2 – you should get the following results (as of this writing). The results are verbose, so I'm only including the first two relevant lines:

Package: libfribidi-dev
Version: 0.19.7-1

This version of "fribidi" is more than sufficient to meet the needs of libass. However, this is *NOT* telling you that you have this package and version number on your system! It's only telling you that this item is AVAILABLE in the package repository.

To find out if you actually have the correct package installed on your system, you need to run this:

dpkg --status libfribidi-dev

If you followed my instructions in Step 3 correctly, it should yield the following results (truncated again to show only the relevant lines):

Package: libfribidi-dev
Status: install ok installed
Priority: optional
Source: fribidi
Version: 0.19.7-1

As you can see, since version 0.19.7 is "equal to or greater than" version 0.19.0, the package included in my tutorial is more than sufficient to meet the requirements of the libass subtitle renderer. If, however, you got a message that says "package 'libfribidi-dev' is not installed" – or it shows an older version number – it means you probably didn't install all the required dependencies listed in Step 3. There are other possibilities, however. I will address those in a moment.

I didn't make up any of these package requirements, by the way – these (mandatory) dependencies are solely dictated by FFmpeg, mpv, and the various encoders. Mpv, for example, will not compile without libass. And two of the dependencies are required by the Raspberry's unique GPU architecture.

If the entire stanza with all 27 packages in Step 3 was properly copied and pasted IN ONE SHOT – as indicated by my instructions – it's hard to imagine how one package buried in the middle of all that could end up missing. In fact, it's basically impossible. However, if for some reason a user chose to break the stanza up into separate chunks – perhaps to examine the resulting Terminal feedback for each individual package – it would greatly increase the chance that the user might make a transcription error. I'm not suggesting you did this, but it's certainly reasonable for me to mention this possibility.

Now, there are some other things that could generate this error message. One of them would be adding your own "prefix" to the "./configure" line in Step 10. Another would be downloading something other than the exact version of "libass-0.13.7.tar.gz" that's listed in the "wget" line of Step 10. All of this, of course, would fall under the "do not modify my instructions" rule.

Also, be aware that there's no specific intelligence behind the error message's reference to "environmental variables". That's generic text that CAN be useful, as a consideration, in some circumstances. But if you followed my instructions to the letter, there's absolutely no reason to mess around with environmental variables. Unless you're a very advanced user, attempting to redefine the paths is only going to dig an even deeper hole.

Hopefully, my observations have shed light on your problem. But if it's still not clear what the issue is, I would try the following troubleshooting steps: First, completely delete the "libass-0.13.7" folder, as well as the "libass-0.13.7.tar.gz" file that you downloaded via wget in Step 10 (libass). Both of these items should be in the "FFmpeg_Build" folder. After you've deleted both items, completely re-do Step 3 to make sure you have all the required dependencies. Don't worry – the package manager will automatically know what's already been installed and not installed – so just re-run the entire stanza with all 27 packages in it. Then, start Step 10 (libass) all over again from scratch! Also, if you previously chose to ignore the "fribidi" error and then decided to skip Step 10 entirely, you'll have to re-do every step thereafter from scratch – Step 11, Step 12, etc. That's because there is NO MERCY with a procedure like this! All steps must work correctly. And all steps must be done in the correct sequence. If even the slightest corner is cut, my tutorial will not work properly.

If, after all that, you're *STILL* getting weird error messages, there's only one remaining course of action: Download NOOBS (or Raspbian if you're more advanced) from raspberrypi.org/downloads. If you choose NOOBS, make sure it's regular NOOBS and not NOOBS "lite". And if it's Raspbian, make sure it's regular Raspbian – not Raspbian "lite". All of this is mentioned in my "requirements" section. You would then use the downloaded image file to create a brand-new, unaltered, fresh copy of Raspbian on another SD card. Or, if you're a more advanced user and have backed up all your data and have access to a second computer, you could NUKE your existing SD card and re-install a fresh copy of NOOBS or Raspbian. Creating a brand-new SD card is the only way to know for certain that you have a clean, undamaged, unaltered copy of Raspbian Stretch before you begin my tutorial – or anything else you wish to do on your system! And if you do go to that trouble, make sure you use the "SD Card Copier" tool to make a duplicate of your brand-new SD card on a second SD card. It only takes 10 minutes! That way, if you encounter any weird problems with anything in the future, you can be back in business in minutes instead of hours. (Please see "Warning #2" in the instructions section of my tutorial for more detail.)

One last thing: You said you have "Debian" version 9.3. I realize that Raspbian is almost completely based on Debian, but if you're running the standard version of the Raspberry Pi's official operating system on a real Raspberry Pi, it's simply not possible that you have "Debian" 9.3.

I'm guessing you either meant to say Raspbian, or maybe you're rather technical and ran this command:

cat /etc/debian_version

That will yield the answer "9.3" if your system is fully updated (as of this writing). But that's just a generic command that's common to Debian and most Debian variants (including Raspbian). However, to get SPECIFIC information on your Raspberry's operating system, you need to run this command instead:

lsb_release -a

If your system is fully updated, it will yield the following results (as of this writing):

No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.3 (stretch)
Release: 9.3
Codename: stretch

NOTE: In case you get a "command not found" message, first run this: sudo apt-get install lsb-release

If the above results say anything other than Raspbian 9.3 (Stretch), it means you either have the wrong operating system or an older version of the current operating system. To make sure you have the very latest version of Raspbian Stretch, be sure to run "sudo apt-get update" and then "sudo apt-get dist-upgrade" (after safely backing up your data, of course).

Finally, just to make sure you really have a Raspberry Pi 3, run this command:

cat /proc/device-tree/model

It should yield this answer:

Raspberry Pi 3 Model B Rev 1.2

crispn
Posts: 5
Joined: Tue Jan 24, 2017 1:35 pm

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Fri Dec 29, 2017 11:13 am

RPi_Mike - Thanks for taking the time to analyse my problem and reply to my post. It is appreciated.

First of all, to clarify my 'Debian 9.3' comment, yes I did do a 'cat /etc/debian_version'.

If I do the 'lsb_release -a' I get this...

No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.3 (n/a)
Release: 9.3
Codename: n/a

Note that I have 'n/a' instead of stretch - not sure if that is relevant?

My Pi3 started life as Jessie Lite with a USB hard drive holding the OS in one partition and another partition being used for storing ip camera recordings. I upgraded this to Stretch rather than load the Stretch image directly as I wanted to avoid having to re-load the OS via the SD card onto the USB HDD. I had thought that the Lite version would satisfy my needs as I was primarily interested in encoding DV camcorder tapes rather than viewing anything on the Pi.

Although I was copying and pasting the steps from one screen to the other I think it's possible that I did in fact miss step 3 in my haste. I have tried your suggestion of deleting the libass folder and tar.gz file and repeating step 3 but this gives me a new problem (which in itself corroborates my theory that I missed step 3 or I would have seen this the first time).

When I do the entire step 3 stanza I get the following...

The following packages have unmet dependencies:
linux-headers-rpi2 : Depends: linux-headers-4.9.0-4-rpi2 but it is not going be installed
E: Unable to correct problems, you have held broken packages.


It looks as though there may be an underlying problem with my installation and you stress the importance of this in your reply, the provenance of my OS is not the same as yours, in particular the fact that I upgraded Jessie rather than starting with a Stretch image, and so I think I will take several steps back and start afresh with a virgin Stretch (non-lite) image and take it from there. This will take me some time.

Once again I do appreciate the time you have put into both the original tutorial and your reply - it certainly is fulfilling one of my aims - to become more familiar with Linux. It has also taught me a new word - stanza - that should be worth a few points in scrabble!

Wishing you and all forum readers a Happy 2018.

RPi_Mike
Posts: 20
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Sat Dec 30, 2017 8:59 pm

crispn wrote:
Fri Dec 29, 2017 11:13 am
RPi_Mike - Thanks for taking the time to analyse my problem and reply to my post. It is appreciated.

My Pi3 started life as Jessie Lite with a USB hard drive holding the OS in one partition and another partition being used for storing ip camera recordings. I upgraded this to Stretch rather than load the Stretch image directly as I wanted to avoid having to re-load the OS via the SD card onto the USB HDD. I had thought that the Lite version would satisfy my needs as I was primarily interested in encoding DV camcorder tapes rather than viewing anything on the Pi.

Although I was copying and pasting the steps from one screen to the other I think it's possible that I did in fact miss step 3 in my haste.

I'M GLAD I COULD HELP:
Above all, I appreciate your honesty in revealing your system's non-standard nature – on both the hardware level and the software level.

It's always frustrating when something doesn't work, no matter what the actual reason. And frustration can quickly turn to anger. So for some, it would have been very tempting to simply blame my tutorial without disclosing the full story. What impresses me even more is that your identity, like almost everyone else on here, is completely anonymous. It reminds me of the saying: "The true test of a man’s character is what he does when no one is watching." So thank you, crispn!

You clearly have a good sense of the situation at this point, so the rest of this post is solely for the benefit of other readers:


HARDWARE:
A standard Raspberry Pi has its operating system on a standard SD card in the standard internal SD card slot. Can you boot a Raspberry from other devices? Yes you can. Is it possible that a NSA-sponsored consortium of researchers from Stanford and MIT have secretly figured out how to boot a Raspberry from an external, partitioned, USB-connected holographic memory cube? Yes, I suppose that's possible. But none of these arrangements would qualify as a standard Raspberry Pi configuration. Would my tutorial work on such a system? WHO KNOWS! But let me quote the Raspberry Pi's official documentation on this matter:

Be warned that this feature is experimental and does not work with all USB mass storage devices.

SOURCE: https://www.raspberrypi.org/documentati ... des/msd.md


OPERATING SYSTEM, PART I:
Will my tutorial work on a "lite" version of Raspbian just as well as the standard, full version of Raspbian? NO IT WILL NOT. In fact, it will NOT WORK AT ALL! This is explicitely stated in my "REQUIREMENTS" section.


OPERATING SYSTEM, PART II:
Will my tutorial work on a version of Raspbian Stretch that was "upgraded" from Raspbian Jessie? Maybe it will, maybe it won't. But don't take my word for how much faith we can have in such a system. Instead, I will close with the Raspberry Pi Foundation's official release statement:

RASPBIAN STRETCH HAS ARRIVED FOR RASPBERRY PI

How to get Raspbian Stretch

As this is a major version upgrade, we recommend using a clean image; these are available from the Downloads page on our site as usual.

Upgrading an existing Jessie image is possible, but is not guaranteed to work in every circumstance.


SOURCE: https://www.raspberrypi.org/blog/raspbian-stretch/

crispn
Posts: 5
Joined: Tue Jan 24, 2017 1:35 pm

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Wed Jan 03, 2018 8:32 pm

Hi Rpi_Mike,

Sorry to be a pain but I'm still encountering a problem.

I have started from scratch by downloading the Raspian Stretch (non-lite) image onto a fresh SD card. The only divergences between my installation and those in the tutorial are these ...
1) running a USB HDD with the sd card only acting at power up to point to the HDD root (i.e. not booting from the hdd)
2) installed motioneye (not motioneyeos) as I have 2 other Pi's with cameras feeding video streams
3) installed samba so I can share the motioneye captured videos to a windows desktop
4) running headless, using putty as SSH
I don't think these should make a difference, but happy to be advised otherwise.

This has been running for a few days and is perfectly stable.

cat /proc/device-tree/model

Code: Select all

Raspberry Pi 3 Model B Rev 1.2
lsb_release -a

Code: Select all

No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 9.3 (stretch)
Release:        9.3
Codename:       stretch
so far so good.

Now when I follow the steps 1 thru 11 ( I actually printed them off and ticked each sub-step as I went, just to be sure) I have no problems or warnings until I get to step 11 on the make-j4 command. This gives (after about 20 minutes)...


Code: Select all

libavcodec/libtheoraenc.c: In function ‘encode_init’:
libavcodec/libtheoraenc.c:211:5: warning: ‘avcodec_get_chroma_sub_sample’ is deprecated [-Wdeprecated-declarations]
     avcodec_get_chroma_sub_sample(avc_context->pix_fmt, &h->uv_hshift, &h->uv_vshift);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libavcodec/libtheoraenc.c:39:0:
libavcodec/avcodec.h:5703:6: note: declared here
 void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC      libavcodec/libvorbisenc.o
CC      libavcodec/libvpx.o
CC      libavcodec/libvpxdec.o
CC      libavcodec/libvpxenc.o
CC      libavcodec/libx264.o
CC      libavcodec/ljpegenc.o
libavcodec/libx264.c: In function ‘X264_frame’:
libavcodec/libx264.c:282:9: error: ‘x264_bit_depth’ undeclared (first use in this function)
     if (x264_bit_depth > 8)
         ^~~~~~~~~~~~~~
libavcodec/libx264.c:282:9: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/libx264.c: In function ‘X264_init_static’:
libavcodec/libx264.c:892:9: error: ‘x264_bit_depth’ undeclared (first use in this function)
     if (x264_bit_depth == 8)
         ^~~~~~~~~~~~~~
ffbuild/common.mak:60: recipe for target 'libavcodec/libx264.o' failed
make: *** [libavcodec/libx264.o] Error 1
make: *** Waiting for unfinished jobs....

Now I have done some googling on this and I think this post may be significant, as it refers to versions of libx264 and recent changes.

https://github.com/jb-alvarado/media-au ... issues/675

Sorry to be a pain as I am at the limit of my Linux knowledge, but am I right in thinking that the version of libx264 that I got in the step 11 stanza (the ./configure step has '--enable-libx264' as the 4th parameter) is incompatible with the version of ffmpeg obtained just 3 sub-steps earlier, also in step 11? If that's the case, surely all recent followers of this tutorial will be experiencing the same problem?

Happy to help with running diagnostics, and thanks in advance.

RPi_Mike
Posts: 20
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Thu Jan 04, 2018 2:40 am

crispn wrote:
Wed Jan 03, 2018 8:32 pm
Sorry to be a pain as I am at the limit of my Linux knowledge, but am I right in thinking that the version of libx264 that I got in the step 11 stanza (the ./configure step has '--enable-libx264' as the 4th parameter) is incompatible with the version of ffmpeg obtained just 3 sub-steps earlier, also in step 11? If that's the case, surely all recent followers of this tutorial will be experiencing the same problem?

There's nothing wrong with the "version" of libx264 in Step 11. The configure line is simply enabling the x264 encoder when FFmpeg compiles. So even though your error message presents itself in Step 11, the source of your problem is actually in Step 5.

Before I explain all this, however, let me step back and provide a 30,000-foot view:

A sly lawyer would love the last sentence of my "Fully Tested and Proven to Work" section. It clearly states the following: "At the time of this writing, I can confidently say that as long as you follow my instructions to the letter, you will achieve success!"

That means my words of confidence became null and void on December 13, 2017 – just one day after my tutorial was posted!

For example, the Raspberry Pi Foundation might issue a standard system update that could unintentionally "break" a critical dependency that my tutorial relies on. The update itself might be perfectly legitimate and represent an overall improvement for the Raspberry – but it could still trigger an unknown sequence of events that would make my dated statements utterly non-applicable. This could happen on any random day, week, or month.

If I were Microsoft or Apple, I would have the resources and money to assign a dedicated team to constantly test and re-test my tutorial as the larger software environment continuously evolved. But I'm doing all this for FREE, so my tutorial is definitely an "as is" offering.

Now, back to the issue you encountered: It appears that two weeks *AFTER* my tutorial was published, something beyond my control happened to the x264 source code. Since my build of FFmpeg depends on x264, that could easily trigger problems during the compile phase of FFmpeg.

Since you're still learning the Linux ropes, you might find some value in this brief explanation:

In somewhat oversimplified terms, source code typically comes in two basic forms:

1: Constantly updated "git" versions (sometimes referred to as "daily snapshots").

AND

2: "Locked-in" stable release tarballs.

They each have their pros and cons. In theory, since "git" versions are typically updated on a daily or weekly basis, they offer the latest improvements. The downside is that because these inherently experimental versions are continually evolving, unanticipated things can happen!

There's also a cultural element to all this. Once the code inside a tarball is locked in, the developers generally move on and don't look back. They have a vested interest in keeping everyone focused on the latest "git" version instead of the old tarballs – simply because they have a good-faith desire to get continuous feedback and make improvements on the CURRENT code (not the old code). They also assume that if you're advanced enough to compile from source code, you must also be advanced enough to live life on the bleeding edge!

But when it comes to RELIABILITY and PREDICTABILITY, there's nothing like a "stable release" tarball. That's because you're dealing with FIXED CODE that will never change. This allows you to test and validate a static target, instead of a constantly changing target.

I was aware of all this when I created my tutorial, so I wanted to use predictable tarballs whenever possible. The bottom line is that my tutorial worked perfectly when I tested and published it. It therefore made no sense to take an unnecessary risk of "breaking it" with constantly changing git code. Unfortunately, due to the cultural element I just described, some of the developers have made it extremely difficult or impossible to find the "stable release" tarballs! In other words, they sometimes hide them on their websites in undocumented folders. They much prefer to keep pushing the current git code, so they often have no incentive to make the location of the tarballs obvious. For example, if you go to the official x264 website, all you'll see are the git versions and "daily tarballs". Although the latter has the word "tarball" in it, you'll also note that it has the word "daily" in it. These are basically the same thing – they both represent the current, "non-stable" release of the source code.

Fortunately, after some Googling, I found the "secret" location of the x264 stable release tarballs! Sure enough, they've been placed in an unadvertised folder.

I have therefore updated Step 5 of my tutorial (libx264) to grab a stable release tarball. Previously, Step 5 pulled the daily git version with the git clone command (with a URL ending in ".git"). But now it uses the wget command to pull a stable release tarball (with a URL ending in "stable.tar.bz2").

Since Step 5 has now fundamentally changed – and because it has a direct impact on the success of Step 11 – you must now do the following to start from a CLEAN SLATE:

1: sudo dpkg -r x264

2: Completely delete the "x264" folder inside the "FFmpeg_Build" folder

3: Completely delete the "ffmpeg-3.4" folder inside the "FFmpeg_Build" folder

4: Completely re-do my newly updated Step 5 (libx264)

5: Completely re-do Step 11 (FFmpeg)

That's it! After Step 11 is re-done, proceed to Step 12, etc.

I'm almost afraid to find out what happens since I don't have control or oversight of your system – or full knowledge of what you're actually doing. Good luck and let me know what happens!

PS: If and when you get through all this, there's something to look forward to. Once you've saved the freestanding Debian software packages in Step 13, all the source code will be permanently "baked in". In my case, since I followed my own tutorial weeks ago, I'm now IMMUNE to any change in the x264 source code – or any other source code in my procedure. As long as my operating system – Raspbian Stretch – does not undergo some unusual change, my pre-built software packages should still work. Is that a guarantee? No. Is anything guaranteed on any computer? No. But once I have those pre-built packages in my possession, the range of things that could affect me are greatly limited.

crispn
Posts: 5
Joined: Tue Jan 24, 2017 1:35 pm

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Thu Jan 04, 2018 11:10 pm

Hi Rpi_Mike

Well I got there in the end. I had to do the rpi_update step as I was getting an error on step 12 related to 'bcm_host' and figured that it was to do with the videocore components (after a bit of googling). Anyhow, 'sudo rpi_update' and a rerun of step 12 has now got me to the end of the steps, including backing up the .deb files.

Once again, thank you so much for posting this - it really is appreciated that you have put together this tutorial. I certainly have learned more than I bargained for, especially regarding linux packages, tarballs, git and compiling source code, but that will be useful for me in the future, I'm sure.

I owe you a beer or two!

jerryrp
Posts: 14
Joined: Sat Dec 23, 2017 7:39 pm

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Sun Jan 07, 2018 12:38 pm

Works nice, I just wish all tutorials was like this one! Many times you stumble upon some posts claiming: "this will be totally complete manual" followed by several lines of code with no explanation. Not the case here)))

Pretty happy right now. Mpv+yt-dl is really a killer-combination for all video hosts (mainly youtube for me). I am using yt-dl on Windows PC for a long time, and have some webm videos that i coudn't play on RPi until now. Thanks again.

richardac
Posts: 1
Joined: Wed Jan 10, 2018 1:27 am

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Wed Jan 10, 2018 1:36 am

Thanks! I've been struggling with other encoders and been scared of ffmpeg. But these instructions are easy to follow, with no 'magic' and worked great for me. I built on a raspberry pi including command 'sudo rpi-update'. I then copied .deb files as instructed to another pi, but skipped the 'sudo rpi-update' on that one. Everything works fine, i'm encoding frame grabs from a webcam into a timelapse video and serving up on pi based website. (Biggest problem was forgetting to include PATH of some lib files in crontab ..)

treeHouse
Posts: 29
Joined: Sat Aug 06, 2016 2:35 am

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Fri Jan 12, 2018 4:38 am

I have been wanting to follow this tutorial for weeks, and finally chipped away at it over the last few days. This is an "above and beyond" tutorial. Seriously fine work! Thanks Rpi_mike!

Works wonderfully as stated, and keeps the pi resources free. Like having the movie window in a corner for some tutorial or whatnot! Love this.

Thanks again, and now I have a new toy to explore....

iskabin
Posts: 1
Joined: Thu Jan 18, 2018 12:30 pm

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Thu Jan 18, 2018 12:39 pm

Hello!

First, thanks for sharing all of this!

I wonder, is it possible to achieve this performance without the encoding part? And if is, what are the steps I should follow?

I ask this because I have no intention to use Pi as an encoding machine. All I need is to be able to play videos with great performance on Chromium, using it's default player, or another player that is available...

I'm already able to play 1080p videos seamlessly (both through streaming and from the MicroSD card), although with my actual configurations I'm only able to achieve this performance on some MP4 videos - and to tell the truth, I don't really know why. I must be able to play any full hd video with no framedrops or anything like this (specially .webm).

Thanks in advance.

Lucas.

RPi_Mike
Posts: 20
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Fri Jan 19, 2018 6:37 pm

iskabin wrote:
Thu Jan 18, 2018 12:39 pm
I wonder, is it possible to achieve this performance without the encoding part? And if it is, what are the steps I should follow? I ask this because I have no intention to use Pi as an encoding machine. All I need is to be able to play videos with great performance.....

Yes! If you do not want the latest and most advanced encoding capabilities, you can easily modify my tutorial and create a stripped-down "play-centric" version. Such a version would be perfectly suitable for those who are mainly interested in PLAYING video and audio (with mpv) – not encoding it (with FFmpeg).

It's worth noting that since mpv requires the FFmpeg "engine", this stripped-down version would still include the many native encoders that come with FFmpeg's "stock" source code. For example, you would still be able to encode H.264 video and AAC audio – but instead of using the award-winning x264 and Fraunhofer implementations of these encoders, FFmpeg would use its built-in generic encoders. The command lines to do the encoding would slightly change as well, since the generic and advanced versions of these encoders do not use the same syntax – but those details can easily be found on the FFmpeg website. For some compression schemes, such as the older MP3 audio standard, FFmpeg does not include a native encoder. My full tutorial, however, addresses this in Step 9 by building the highly regarded LAME encoder for MP3s. I realize you're not interested in encoding, but I wanted to include this paragraph for the benefit of other readers.

Since you specifically mention WEBM videos, keep in mind that at the hardware level, the Raspberry's GPU only supports H.264 (MP4) – not VP9 (WEBM). However, thanks to some very efficient FFmpeg and mpv code, the Raspberry's CPU is still able to crank out 1080p WEBM videos at 30 FPS with an extremely low (or zero) frame drop count. For WEBM, the exact performance will depend on 3 factors: native frame rate, interframe motion, and the computational complexity of the scenes. Nonetheless, even the most demanding 1080p WEBM videos at 30 FPS will typically achieve a frame throughput that exceeds 99.7%. My testing also shows that 720p WEBM videos at 30 FPS will always have a 100% frame throughput. Finally, thanks to direct GPU support, 1080p H.264 videos are guaranteed to have a 100% frame throughput – even at 60 FPS! See the "Testing Results" section of my tutorial for detailed benchmarks.

Now, back to your main question. Here's a quick summary of the differences between my full tutorial and a stripped-down "play-centric" version of my tutorial:


MY FULL TUTORIAL BUILDS AND INSTALLS THESE 8 ITEMS (BEGINNING WITH 5 ADVANCED ENCODERS):

  • x264 video encoder
  • AAC audio encoder (Fraunhofer)
  • VP9 video encoder
  • Opus audio encoder
  • MP3 audio encoder (LAME)
  • libass subtitle renderer
  • FFmpeg
  • mpv

A STRIPPED-DOWN "PLAY-CENTRIC" VERSION OF MY TUTORIAL WOULD ONLY BUILD AND INSTALL THESE 3 ITEMS:

  • libass subtitle renderer (required for mpv to work)
  • FFmpeg (required for mpv to work)
  • mpv


Thus, to create a stripped-down version of my tutorial without the advanced encoders, there are just 4 "concepts" you need to apply:


CONCEPT A: DO EVERY SINGLE STEP IN MY TUTORIAL – EXCEPT THESE:

Skip steps 5, 6, 7, 8, 9

In other words, you would not build and install the 5 advanced encoders.



CONCEPT B: CAREFULLY REMOVE THESE 5 ENCODER ITEMS FROM THE "./configure" LINE IN STEP 11 (FFmpeg):

--enable-libx264 --enable-libfdk-aac --enable-libvpx --enable-libopus --enable-libmp3lame



CONCEPT C: RUN THIS EXTRA COMMAND LINE RIGHT BEFORE YOU RUN "sudo checkinstall make install" IN STEP 11 (FFmpeg):

sudo mkdir -p /usr/local/share/doc



CONCEPT D: RUN "sudo rpi-update" IN STEP 2 (full system update):

To make certain my stripped-down method works, I just tested it on a brand-new installation of Raspbian Stretch. Everything works perfectly! It plays 1080p videos just as well as my full tutorial does – both MP4/H.264 and WEBM/VP9. My testing revealed, however, that "sudo rpi-update" is mandatory, not optional. Without it, mpv will simply not compile. Before you proceed, please make note of my tutorial's common-sense warning about basic "data safety", and the importance of having a backup copy of your operating system on a separate SD card.

I hope that answers your question. Let me know how everything works out for you!
Last edited by RPi_Mike on Tue Jan 23, 2018 12:48 am, edited 1 time in total.

insolito
Posts: 16
Joined: Fri Feb 14, 2014 11:44 pm

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Mon Jan 22, 2018 1:10 pm

Hello, thanks for sharing!

With this, can i run a video in a custom resolution bordeless at any point of my screen by terminal?

I mean, my resolution is 1080p and i want to run a video at 200x300 screen position at 600x400 size bordeless by terminal like a widget, can i do that?

Thanks!

jerryrp
Posts: 14
Joined: Sat Dec 23, 2017 7:39 pm

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Wed Jan 24, 2018 3:34 pm

insolito wrote:
Mon Jan 22, 2018 1:10 pm
Hello, thanks for sharing!

With this, can i run a video in a custom resolution bordeless at any point of my screen by terminal?

I mean, my resolution is 1080p and i want to run a video at 200x300 screen position at 600x400 size bordeless by terminal like a widget, can i do that?

Thanks!
Of course you can -- RPi_Mike already explained how to do it with this post.

insolito
Posts: 16
Joined: Fri Feb 14, 2014 11:44 pm

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Thu Jan 25, 2018 9:58 am

Of course you can -- RPi_Mike already explained how to do it with this post.
Got it, Thanks!

Now i am able to run videos from my GTK# mono program using it:
scr.png
scr.png (6.15 KiB) Viewed 838 times
But i cant use the interactive constrols like LEFT ARROW/RIGHT ARROW to Seek backward/forward, F KEY to Toggle fullscreen or 9/0 KEYS to Decrease/increase volume because i have no terminal to get these pressed keys

There is a way to simulate these keys to have control of the video playback? Something like a bash command (I can run it within mono) or even a way to use mpv inside a mono program as a component? (didnt find a solution for GTK# like a widget)

Thanks!

RPi_Mike
Posts: 20
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Thu Jan 25, 2018 5:03 pm

insolito wrote:
Thu Jan 25, 2018 9:58 am
Now i am able to run videos from my GTK# mono program using it....... But i cant use the interactive controls....... because i have no terminal to get these pressed keys....... Is there a way to simulate these keys to have control of the video playback? Something like a bash command (I can run it within mono) or even a way to use mpv inside a mono program as a component?

A big part of the beauty and power of mpv is that it has no GUI baggage to slow things down and clutter the screen. It's not a limitation – IT'S A FEATURE! It's a deliberate philosophy that's especially well-suited to the Raspberry – a tiny computer with limited resources. Thanks in part to that streamlined approach, my tutorial is able to squeeze out 60 frames per second at 1080p on a $35 computer!

Mpv, by design, is a terminal-based program. That's an mpv decision – not mine. It's a decision I happen to agree with completely. If you install the generic stock version of mpv from the official Raspbian repository, you will find that it behaves the exact same way – so your question has nothing specifically to do with my tutorial or the build it creates. No matter what the build or version, mpv absolutely requires a normal instance of the standard Terminal program running in the background at all times. It must also be the active window or you will lose keyboard control. [In case any novices are reading this, don't let any of this scare you. You do NOT use Terminal when playing videos. Instead, you just double-click any media file you want and mpv automatically starts playing it! Yes, the Terminal window is activated – but it runs quietly in the background. You don't see it or interact with it. It's "out of sight, out of mind."]

Yet you say you "have no terminal". That would definitely be a deal killer!

Here's the bottom line: I can tell you're at least somewhat technically advanced and are trying to build or fiddle with some kind of GUI-based application that either interacts with mpv or has mpv inside it. Unfortunately, to be completely honest, that has NOTHING to do with my tutorial or the topic of this thread. It's totally off-topic and will only confuse the vast majority of readers. The requirements section of my tutorial explicitly states that it's intended for a completely STANDARD install of Raspbian Stretch. It certainly makes no mention of GTK# wrappers, Mono, widgets, or the C# programming language.

Don't get me wrong – I'm not saying there's anything wrong with whatever it is you're trying to do. I think it's great that people love to experiment and try new things on their own. But your exotic experiments are definitely a topic for a separate thread!

Finally, if you'd like to know more about my thoughts on GUIs and mpv, here's an extensive posting I made on that topic last month:

viewtopic.php?f=38&t=199775#p1248745

insolito
Posts: 16
Joined: Fri Feb 14, 2014 11:44 pm

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Fri Jan 26, 2018 1:25 am

RPi_Mike wrote:
Thu Jan 25, 2018 5:03 pm
insolito wrote:
Thu Jan 25, 2018 9:58 am
Now i am able to run videos from my GTK# mono program using it....... But i cant use the interactive controls....... because i have no terminal to get these pressed keys....... Is there a way to simulate these keys to have control of the video playback? Something like a bash command (I can run it within mono) or even a way to use mpv inside a mono program as a component?

A big part of the beauty and power of mpv is that it has no GUI baggage to slow things down and clutter the screen. It's not a limitation – IT'S A FEATURE! It's a deliberate philosophy that's especially well-suited to the Raspberry – a tiny computer with limited resources. Thanks in part to that streamlined approach, my tutorial is able to squeeze out 60 frames per second at 1080p on a $35 computer!

Mpv, by design, is a terminal-based program. That's an mpv decision – not mine. It's a decision I happen to agree with completely. If you install the generic stock version of mpv from the official Raspbian repository, you will find that it behaves the exact same way – so your question has nothing specifically to do with my tutorial or the build it creates. No matter what the build or version, mpv absolutely requires a normal instance of the standard Terminal program running in the background at all times. It must also be the active window or you will lose keyboard control. [In case any novices are reading this, don't let any of this scare you. You do NOT use Terminal when playing videos. Instead, you just double-click any media file you want and mpv automatically starts playing it! Yes, the Terminal window is activated – but it runs quietly in the background. You don't see it or interact with it. It's "out of sight, out of mind."]

Yet you say you "have no terminal". That would definitely be a deal killer!

Here's the bottom line: I can tell you're at least somewhat technically advanced and are trying to build or fiddle with some kind of GUI-based application that either interacts with mpv or has mpv inside it. Unfortunately, to be completely honest, that has NOTHING to do with my tutorial or the topic of this thread. It's totally off-topic and will only confuse the vast majority of readers. The requirements section of my tutorial explicitly states that it's intended for a completely STANDARD install of Raspbian Stretch. It certainly makes no mention of GTK# wrappers, Mono, widgets, or the C# programming language.

Don't get me wrong – I'm not saying there's anything wrong with whatever it is you're trying to do. I think it's great that people love to experiment and try new things on their own. But your exotic experiments are definitely a topic for a separate thread!

Finally, if you'd like to know more about my thoughts on GUIs and mpv, here's an extensive posting I made on that topic last month:

viewtopic.php?f=38&t=199775#p1248745
Ok, sorry!

BTW, got a solution to my problem using JSON IPC (Sockets) :)

mikedice417
Posts: 2
Joined: Mon Nov 16, 2015 1:03 am

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Sun Jan 28, 2018 11:41 pm

Hi,
Thank you for this post! I have learned a lot by reading it and going through the steps.

I have encountered several errors at the end though.

Here they are:
During the waf build part of building mpv, I did run into the build error shown below.

I fixed this by adding this command
export C_INCLUDE_PATH=/opt/vc/include

I did this because I found the file bcm_host.h in /opt/vc/include/bcm_host.h
===== Error =====
../video/out/opengl/context_rpi.c:21:22: fatal error: bcm_host.h: No such file or directory
#include <bcm_host.h>
^
compilation terminated.

Waf: Leaving directory `/home/pi/FFmpeg_Build/mpv-0.27.0/build'
Build failed
-> task in 'objects' failed with exit status 1 (run with -v to display more information)


I was able to complete the step after making the change I mentioned above. But then I ran into a worse error and I can't figure out how to resolve it. I tried to run mpv and got this error
pi@raspberrypi:~/Videos $ mpv my-tv-show.mkv
Playing: my-tv-show.mkv
(+) Video --vid=1 (*) (h264 1276x720 23.976fps)
(+) Audio --aid=1 (*) (ac3 6ch 48000Hz)
AO: [alsa] 48000Hz stereo 2ch float
Using hardware decoding (rpi).
VO: [rpi] 1276x720 mmal
libEGL warning: DRI2: failed to authenticate
[vo/rpi] Could not create EGL surface!
[vo/rpi] EGL/GLES initialization for OSD renderer failed.
Could not initialize video chain.
Video: no video


Do you have any ideas how to resolve this? Any ideas maybe about debugging steps? I looked around on the internet but don't see any answers that seem related to mpv or that I understand :)

Thanks again for the great tutorial!

RPi_Mike
Posts: 20
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Mon Jan 29, 2018 8:41 am

mikedice417 wrote:
Sun Jan 28, 2018 11:41 pm
Thank you for this post! I have learned a lot by reading it and going through the steps.

I have encountered several errors at the end though.

Believe it or not, every single error you encountered was due to ONE simple thing: You didn't run rpi-update in Step 2!

As I explained in great detail in my tutorial, since I always use standard "data safety" practices – keeping a backup copy of both my operating system and my data – I had no reason to "fear" rpi-update and not use it. After all, it's quite fundamental in that it contains the very latest VideoCore libraries for the GPU. As a result, I never had to personally deal with the issue you described. But I have simulated it in recent testing.

Just by coincidence, I've been working on a surprise announcement over the last several days. It will be posted within the next 24 hours – so if you can, hold off until then!

mikedice417
Posts: 2
Joined: Mon Nov 16, 2015 1:03 am

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Tue Jan 30, 2018 2:11 am

RPi_Mike wrote:
Mon Jan 29, 2018 8:41 am
mikedice417 wrote:
Sun Jan 28, 2018 11:41 pm
Thank you for this post! I have learned a lot by reading it and going through the steps.

I have encountered several errors at the end though.

Believe it or not, every single error you encountered was due to ONE simple thing: You didn't run rpi-update in Step 2!

As I explained in great detail in my tutorial, since I always use standard "data safety" practices – keeping a backup copy of both my operating system and my data – I had no reason to "fear" rpi-update and not use it. After all, it's quite fundamental in that it contains the very latest VideoCore libraries for the GPU. As a result, I never had to personally deal with the issue you described. But I have simulated it in recent testing.

Just by coincidence, I've been working on a surprise announcement over the last several days. It will be posted within the next 24 hours – so if you can, hold off until then!
Thank you for your reply again! You are correct that running rpi-update resolved the issue and things are working now. I actually read your note about running rpi-update but I had read another doc that I mis-understood to mean that sudo apt-get dist-upgrade did the same thing as rpi-update. Now I know I was wrong :).

Again great tutorial and thank you.

treeHouse
Posts: 29
Joined: Sat Aug 06, 2016 2:35 am

Re: TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Wed Jan 31, 2018 5:47 am

Just by coincidence, I've been working on a surprise announcement over the last several days. It will be posted within the next 24 hours – so if you can, hold off until then!

Aww man, the suspense ... I think we are pushing more than 24 hours!

RPi_Mike
Posts: 20
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

APPENDICES: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Wed Jan 31, 2018 12:24 pm

---


MAJOR UPDATE – JANUARY 31, 2018 – ALL 8 TUTORIAL APPENDICES:

I have made numerous additions and enhancements to my FFmpeg and mpv tutorial – including the elimination of rpi-update. So much has been added, in fact, that I have now exceeded the 60,000 character limit!

As a result, I had to free up space by removing several appendices from my tutorial's main page:

TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

I am therefore including all 8 appendices in this (separate) post:



---------
APPENDIX 1: MOST ESSENTIAL MPV KEYBOARD CONTROLS AND OPTIONS:


f key: Toggle the video between full screen and actual size

space bar: Toggle the video (or audio) between pause and play

left and right arrow keys: Rewind and fast-forward by 6 seconds

up and down arrow keys: Rewind and fast-forward by 1 minute

9 and 0 keys: Lower and raise the volume

o key: Make the on-screen display briefly appear to show time remaining, etc.

[ and ] keys: Speed up or slow down the video

q key: Quit out of the video (or audio)


REMINDER: Be sure to close any open Terminal windows before you use mpv, or you will lose keyboard control.


CUSTOMIZE MPV's BEHAVIOR: If you wish to customize things further, you can always modify mpv's configuration file (mpv.conf). The mpv.conf file is a standard text file (but with a ".conf" extension) that can be quickly modified with the standard Text Editor. It's located at /home/pi/.config/mpv (you may have to temporarily click View | Show Hidden in order to see these hidden files and folders in File Manager). In my instructions, I already included 2 of the most useful customizations inside the mpv.conf file:

--fullscreen <---This forces all videos, both large and small, to automatically expand to fill your screen. To prevent any distortion, this option always maintains the native aspect ratio of the video. By design, it will never "stretch" or "squeeze" the video to fit the shape of your monitor or TV. But as long as the video's aspect ratio matches the aspect ratio of your screen, the video will completely and perfectly FILL the screen. For example, if you have a 480p, 720p or 1080p video (all of which would normally have a 16:9 aspect ratio) – and you also have a monitor or TV with a 16:9 aspect ratio – then your entire screen will be filled with active pixels.

rpi-background=yes <---Sometimes, you may watch an old video – or one that's simply not as "wide" as a 16:9 aspect ratio. For example, you might have an old video from a VHS tape with a low resolution of 320 x 240 (a 4:3 aspect ratio). Or you might have a DVD video with a resolution of 720 x 480 (a 3:2 aspect ratio). Either way, these videos are not "wide" enough to perfectly fit the shape of a modern 16:9 display without being stretched or distorted. In those cases, the "rpi-background=yes" option will automatically add black bars to the left and right sides of your screen so that there are no visual distractions in the background!

--loop <---I did NOT add this option in my instructions because many people would not want this particular behavior. But if you're using your Raspberry to power a display at a trade show or other event, for example, this is a great way to make the video automatically play over and over again.

geometry=20%+0+0 <---This mpv.conf line will force a 1080p video to play at only 4% of the total surface area of a 1080p monitor or TV – and it will place it in the upper-left corner of your screen. NOTE: In case you're wondering how 20% becomes 4%, it all comes down to understanding the difference between linear dimensions and surface dimensions. Assuming the native resolution of the video is the same as your screen's resolution, 20% smaller across the X axis AND 20% smaller across the Y axis means the video would only cover 4% of your screen's total surface area (20% x 20% = 4%).

geometry=20%+1536+0 <---And what if I want a tiny video to appear in the upper-right corner of my screen? For this mpv.conf example, simple math is in order: My 1080p monitor is 1920 pixels across. 20% of 1920 is 384. And 1920 - 384 = 1536. That means the upper-left corner of the video should start at 1536 on the X axis and 0 on the Y axis. In both of these examples, tapping the "f" key will instantly toggle the video back and forth between FULL SCREEN and TINY SCREEN. Mpv handles it beautifully in the blink of an eye.

TAKE MANUAL CONTROL OF MPV: The contents of the mpv.conf file affects mpv's "fundamental" behavior. In other words, it will always affect the way mpv behaves when it plays video and audio. But for some options, you can temporarily invoke a behavior on a one-time basis without modifying your mpv.conf file. Generally, this only works for options that begin with 2 dashes (--). For example, let's say you do NOT have the "--loop" option in your mpv.conf file, but you still want to launch a video with that behavior on a one-time basis. To do that, you can manually launch the video inside Terminal (instead of double-clicking it in File Manager as you would normally do). Here are some common syntax examples for manual launching of multimedia files:

EXAMPLE A: This is the MANUAL way to play a video with mpv. Normally, as I just mentioned, you would simply double-click the file and it would automatically start playing – but I'm including these manual examples for the benefit of interested users. In this example, we are NOT invoking any special options (other than what's already in your mpv.conf file). It also assumes that Terminal is currently open inside the same folder as your video:

mpv video.mp4


EXAMPLE B: This manually instructs the video to loop continuously (in addition to whatever else your mpv.conf file may have it do). It also assumes that Terminal is currently open inside the same folder as your video:

mpv --loop video.mp4


EXAMPLE C: This does the same thing as Example B, but it does so for a video that's in a completely different folder than the one Terminal is currently located in (which is normally your "home" folder by default – /home/pi). In other words, in this example, you're using the FULL DIRECT PATH to the video. The full path to a file can be easily obtained by right-clicking any file in File Manager and selecting "Copy Path(s)". This syntax is necessary whenever Terminal and the video are in different locations:

mpv --loop /home/pi/vacations/hawaii/video.mp4


EXAMPLE D: This also does the same thing as Example B, but it places the full path inside standard quote marks. Why is this important? You must do this any time there are SPACES in the file path. That's a Linux thing, not a mpv thing. For example:

mpv --loop "/home/pi/truly awesome vacations/hawaii/video.mp4"


MPV HAS HUNDREDS OF OTHER OPTIONS AND FEATURES: For complete details, please review mpv's extremely thorough manual at their official website:

Official Manual: mpv






---------
APPENDIX 2: DOWNLOAD AND RETAIN HIGH-QUALITY VIDEOS FROM HUNDREDS OF WEBSITES – WITH YOUTUBE-DL:

INSTALLING YOUTUBE-DL: Although youtube-dl is available in the Raspbian software repository, it’s nearly a year old. To acquire the very latest version from youtube-dl's official website, enter the following two command lines, one at a time, in the Terminal window:

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl

sudo chmod a+rx /usr/local/bin/youtube-dl



DOWNLOADING MP4 VIDEOS (H.264 / AAC): Let’s say you have your Raspberry hooked up to a high-definition 1920 x 1080 monitor or TV and you wish to download and enjoy a NASA video, at maximum resolution and quality, of two neutron stars colliding – with the screen completely filled-up by the video. Here’s how you do that with youtube-dl:

STEP 1: Identify the URL of the page that contains the video you want. In this example, it’s a YouTube video at the following URL:

https://www.youtube.com/watch?v=x_Akn8fUBeQ


STEP 2: Open the Terminal window and enter the following code (make sure you use a capital “-F”):

youtube-dl -F https://www.youtube.com/watch?v=x_Akn8fUBeQ


STEP 3: You will then see an impressive list of all the different audio and video formats that the YouTube server has available for the NASA video. If you look carefully, you will see there’s a video track with a resolution of 1920 x 1080 that uses the “avc1” codec at 30 FPS (Frames Per Second). “AVC1” is simply another name for the H.264 codec. The Raspberry’s GPU has been specifically optimized to play H.264 video with full-blown hardware acceleration. On the far left column, you will see a “format code” for that particular video format. In this case, it’s code “137”. You will also see a high-quality audio track that’s described as an “m4a” with a sampling rate of 44100Hz. That’s YouTube's terminology for an AAC audio track. It has format code “140”. It's the best choice for this example, since an AAC audio track is specifically designed to work with an H.264 video track when creating an MP4 video. To download the high-resolution video (with sound), you will therefore issue the following command (make sure you use a lower-case “-f”):

1920 x 1080 MP4 – 30 FPS:
youtube-dl -f 137+140 https://www.youtube.com/watch?v=x_Akn8fUBeQ

Once the download is complete, be sure to close the Terminal window or you will lose keyboard control of mpv. Then, simply double-click the MP4 video you just downloaded and mpv will automatically start playing it full screen! If you downloaded a resolution smaller than your screen, you can tap the "f" key to toggle back and forth between actual size and full screen mode.



DOWNLOADING WEBM VIDEOS (VP9 / Opus): If you want a much smaller file size at a surprisingly high quality – albeit with lower resolutions of 720p or 480p – the “VP9” format for video and the “Opus” format for audio are the ones you want. They are the most advanced compression technologies currently available. The two tracks will be automatically combined by youtube-dl (using the FFmpeg engine) and merged into a standard WEBM video. Be aware that the Raspberry’s GPU is only designed to provide full hardware acceleration for MP4 videos using H.264 – so a 1080p VP9-based WEBM video will push your Raspberry to the absolute limit and will likely result in at least some stutter. That's why I recommend 720p and 480p resolutions for VP9-based videos. They also, of course, should not exceed 30 FPS. Finally, if you wish to share the video with someone else who doesn’t have an advanced player like mpv, it’s best to stick with a standard H.264-based MP4 video for compatibility reasons. For the NASA video, here are the two best command lines if you want smaller file sizes (for example, if you're using a cellular connection and need to conserve your data usage). When it's competently encoded by the uploader, I've been consistently amazed by how good a humble 480p video can look when viewed full screen on my large 24 inch 1080p monitor.

1280 x 720 WEBM – 30 FPS:
youtube-dl -f 247+249 https://www.youtube.com/watch?v=x_Akn8fUBeQ

854 x 480 WEBM – 30 FPS:
youtube-dl -f 244+249 https://www.youtube.com/watch?v=x_Akn8fUBeQ



HIGH FRAME-RATE CAPABILITY: In my testing, I was surprised to discover that the Raspberry’s GPU can handle 1920 x 1080 H.264 video at DOUBLE the normal frame rate – 60 FPS without dropping even one frame! Some newer videos on YouTube are now available in 60 FPS format, and the NASA video is one of them. If you wish to download the 60 FPS version of the above 1080p video, you would simply change the video format code from 137 to 299. In other words, you would use this command line instead:

1920 x 1080 MP4 – 60 FPS:
youtube-dl -f 299+140 https://www.youtube.com/watch?v=x_Akn8fUBeQ



CAUTION: Don't assume the format codes will always be the same. YouTube is quite consistent – but even with them, the available formats can vary from one video to another. For example, I've noticed that YouTube's servers will often place different formats in a queue, prioritizing H.264 over VP9. Even for the mighty Google, encoding video is very computationally intensive and time consuming – so it makes sense for them to quickly get the H.264 version up on their server, and then process the VP9 version an hour or half hour later. Other video sites, however, use completely different format codes and are typically limited to H.264 videos – so for them, you'll want to first run youtube-dl's "-F" option (capital F), as explained above, to see exactly what formats are available. Finally, be aware that most other sites tend to integrate the video and audio tracks into a single pre-packaged MP4 video – so there won't be separate video and audio formats to choose from. YouTube does this as well, by the way. It's usually listed in the last couple lines of their available formats. In YouTube's case, you'll know if everything's already been combined if it says both "avc1" and "mp4a" in the description. In those cases, you would not use the "+" symbol. Instead, you would simply use a single format code. For more information on the many other features and capabilities of youtube-dl, visit their official website at yt-dl.org






---------
APPENDIX 3: PLAY ONLINE VIDEOS AUTOMATICALLY WITH MPV (WITHOUT ANY MANUAL DOWNLOADING):

Personally, I like to review all the available video and audio formats before I download a video. If it's a concert or music video, I may want to enjoy it multiple times. By downloading it, as described in Appendix 2, I have immediate access to it at the highest quality – even if I'm offline. Downloading is also crucial if you're using a cellular data connection and need to conserve your data. Even with an "unlimited" plan, your carrier may still throttle back your speed once you reach a monthly limit. For those instances, I've found that 480p videos that use the advanced VP9 video codec and Opus audio codec at 50 or 70 kbps are the perfect balance between file size and quality. In an HD aspect ratio, they typically have resolutions of 854 x 480. For a relatively small video, they look surprisingly good on my large 1080p monitor in full screen mode. Of course, if you want the absolute best in quality on a 1080p screen and data use is not a concern, there's nothing like a 1080p video.

In many cases, however, data use may not be a concern. You also may not have any desire to manually download (and retain) the video. And finally, you may not really care if you're viewing the most optimal format and quality – because you just want to watch a video without any thought. In those cases, I have configured my procedure to support tight integration between mpv and youtube-dl. As long as you have properly followed this tutorial and have installed a recent copy of youtube-dl (see Appendix 2), all you have to do is enter a URL after the mpv command! That will automatically invoke youtube-dl, which will start downloading the first several seconds of the video (invisibly as a background process). It does this to create a sufficient cache to help prevent buffering interruptions while playing. Once it's done that, mpv will automatically start playing the video! Generally, when operating in this mode, youtube-dl's algorithm will attempt to choose the "best quality" version of the video. It works well on leading video sites like YouTube, but there are no guarantees with less sophisticated websites. If you're unsatisfied with the results on other sites, nothing of course beats a manual review of the available formats (as described in Appendix 2).

As an example, if you want to automatically play the NASA video mentioned in Appendix 2, this simple command line is all it takes:

mpv https://www.youtube.com/watch?v=x_Akn8fUBeQ






---------
APPENDIX 4: SAMPLE FFMPEG COMMAND LINES – TO ENCODE OR PROCESS VIDEO AND AUDIO:

NOTE: In the following examples, simply right-click any folder that contains the media files you wish to encode or process and click “Open in Terminal”. Then, run the following commands (changing the file names and settings where appropriate):


EXAMPLE 1: Convert an old AVI video (with sound) – or any other input video format you choose – into a modern MP4 (with H.264 video and AAC audio):

ffmpeg -i input.AVI -vf format=yuv420p -c:v libx264 -crf 23 -c:a libfdk_aac -b:a 128k output.MP4

NOTE: This example uses the higher-quality (but slower) x264 software-based encoder. That means there is no GPU hardware acceleration – however it does use a CPU optimization known as “NEON” that helps to speed up the encoding. The “-crf 23” setting is the default video quality and generally produces excellent results. The lower the number, the higher the encoding quality (at the expense of a larger file size). A setting of 18 is said to be “visually lossless” – but the file size will be almost double that of a 23 setting. Be aware that the number scale is non-linear – but as a rough rule of thumb, a change of 5 to 6 will double (or cut in half) the file size. In many cases, when a smaller file size is important, a setting of 26 still maintains a high-quality appearance. Finally, the “-c:a libfdk_aac -b:a 128k” part indicates that the audio will be converted with the Fraunhofer AAC codec, at a bit rate of 128 kbps.



EXAMPLE 2: Resize a large “1080p” MP4 video (1920 x 1080) with sound into a smaller “480p” MP4 video (854 x 480) with sound – without (unnecessarily) re-encoding the original audio:

ffmpeg -i input.MP4 -vf "format=yuv420p, scale=854:480:flags=lanczos" -c:v libx264 -crf 23 -c:a copy output.MP4



EXAMPLE 3: Extract every frame from a 30 FPS MP4 video and output it as a padded, 7-digit numerical JPEG image sequence:

ffmpeg -i video.mp4 -vf fps=30 -q:v 2 %07d.jpg



EXAMPLE 4: Convert an alphanumeric image sequence of JPEG pictures into a 30 FPS MP4 video:

ffmpeg -framerate 30 -pattern_type glob -i "*.jpg" -vf format=yuv420p -c:v libx264 -crf 23 output.MP4



EXAMPLE 5: Add a transparent overlay – such as text or a logo – on top of a video:

ffmpeg -i input.MP4 -i overlay.png -filter_complex "[0:v][1:v] overlay=0:0" -c:v libx264 -crf 23 -c:a copy output.MP4

NOTE: The “overlay.png” file must be a transparent PNG file (with alpha channel) that includes your text or logo. This can be created with any standard image-manipulation program like GIMP or Photoshop. Also, in this particular example, the inputted MP4 video is assumed to have a proper sound track that can simply be copied over without re-encoding. If the sound does require encoding, simply change “-c:a copy” to “-c:a libfdk_aac -b:a 128k”.



EXAMPLE 6: Use the hardware-accelerated H.264 encoder to convert an AVI into an MP4:

ffmpeg -i input.AVI -c:v h264_omx -b:v 4500k -c:a copy output.MP4

NOTE: The hardware encoder, though about 3 times faster, has fewer options and generally, bit for bit, produces a decent but lower-quality result. The software-based encoder, which relies on the versatile and general-purpose CPU, provides the programmers maximum flexibility to use whatever coding techniques they like – but a hardware encoder, by its very nature, is constrained by the features the GPU supports. Like most things in life, there are pros and cons to each approach. In this example, the “-b:v 4500k” part indicates a bit rate of 4,500 kbps – which is generally good for a large 1080p video. Unlike the software-based encoder, there is no “crf” quality setting, since the hardware-based encoder uses bit rate as a proxy for quality. If your video is smaller than 1080p, you will obviously want to lower the bit rate accordingly – to 2,000, 1,500, etc. Finally, this example assumes the existing audio is already in an MP4-compatible format, such as an AAC or MP3, and can thus be copied over. If you do need to transcode the audio, simply change “-c:a copy” to “-c:a libfdk_aac -b:a 128k”.

FINAL NOTE: The 6 examples I just provided are only a small sample of the astonishing capabilities of FFmpeg. For more information, visit their official website at FFmpeg.org.






---------
APPENDIX 5: IF FOR SOME REASON YOU WISH TO COMPLETELY UNINSTALL ALL THE PROGRAMS YOU JUST INSTALLED IN THIS TUTORIAL, JUST RUN THIS COMMAND LINE IN TERMINAL:

sudo dpkg -r mpv ffmpeg libass lame opus libvpx fdk-aac x264-snapshot-20180125-2245


THEN, DELETE THE "preferences" FILE YOU USED TO "PIN" THE PROGRAMS (IF YOU HAVE MANUALLY PINNED OTHER PROGRAMS UNRELATED TO THIS TUTORIAL, YOU'LL OBVIOUSLY WANT TO EDIT THIS FILE, NOT DELETE IT):

sudo rm /etc/apt/preferences






---------
APPENDIX 6: IF FOR SOME REASON YOU NEED TO RE-INSTALL ALL THE PROGRAMS IN THIS TUTORIAL ON YOUR *EXISTING* SYSTEM, YOU CAN DO IT IN LESS THAN ONE MINUTE! BY "EXISTING" SYSTEM, I MEAN THE SAME RASPBERRY WITH THE SAME OPERATING SYSTEM THAT YOU WERE USING WHEN YOU DID MY TUTORIAL. BY "EXISTING" SYSTEM, I ALSO MEAN THAT YOUR CORE SYSTEM AND "FIRMWARE" FILES HAVE NOT BEEN ALTERED. IF YOU HAVE SINCE RE-INSTALLED THE OPERATING SYSTEM OR IT'S A NEW SYSTEM – OR IT JUST ISN'T YOUR "EXISTING" SYSTEM FOR WHATEVER REASON – YOU NEED TO USE APPENDIX 7 INSTEAD. BUT IF IT TRULY IS YOUR EXISTING SYSTEM, SIMPLY OPEN TERMINAL IN WHATEVER FOLDER YOU PLACED ALL 8 .DEB FILES (SEE STEP 13 OF MY TUTORIAL FOR MORE ON THIS TOPIC) AND RUN THIS COMMAND:

sudo dpkg -i *.deb






---------
APPENDIX 7: IF YOU WISH TO INSTALL ALL THE PROGRAMS IN THIS TUTORIAL ON ANOTHER RASPBERRY PI 3 – OR ON THE SAME RASPBERRY PI 3 AFTER A FRESH INSTALL OF THE OPERATING SYSTEM – IT ONLY TAKES A FEW MINUTES! JUST FOLLOW THESE 7 SIMPLE STEPS:

STEP 1: Make sure the other Raspberry has a completely normal, standard copy of the Raspbian Stretch operating system. Please see my tutorial to find out exactly what I mean by "normal" – both the requirements section and Step 2 have critical information on this topic. If you're certain that everything is perfectly "normal" with the other Raspberry, simply open Terminal and do a standard update to make sure everything is current:

sudo apt-get update

sudo apt-get dist-upgrade

REBOOT!!



STEP 2: Set your GPU memory allocation to 128 MB (mpv requires 128 MB to work). Proceed as follows:

Click the Raspberry Menu | Preferences | Raspberry Pi Configuration | Performance Tab

Change "GPU Memory" to 128

Click OK | Click No to reboot (You’ll be rebooting soon anyway – so rebooting now is not necessary.)



STEP 3: Install all the basic “dependencies” that FFmpeg and mpv require by running this entire stanza in Terminal:

sudo apt-get install autoconf automake checkinstall libsdl2-dev libtool libva-dev libvdpau-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev texinfo libfribidi-dev libfontconfig1-dev libjpeg-dev libgnutls28-dev libluajit-5.1-dev python-docutils libbluray-dev libtheora-dev libvorbis-dev linux-headers-rpi2 libomxil-bellagio-dev

REBOOT!!



STEP 4: Install the OpenGL ES (GLES) and EGL files from the official Raspberry GitHub site. These GPU-related files are essential for mpv to function. Since we're installing pre-compiled ".deb" files in this procedure, the compiling has already "baked in" 2 of the 4 GPU-related files – which explains why we only need to install 2 files in this step:

sudo wget -P /opt/vc/lib https://github.com/raspberrypi/firmware/raw/master/hardfp/opt/vc/lib/libEGL.so

sudo wget -P /opt/vc/lib https://github.com/raspberrypi/firmware/raw/master/hardfp/opt/vc/lib/libGLESv2.so



STEP 5: Place the 8 “.deb” installer files in an empty folder on the Raspberry Pi 3 (see Step 13 of my tutorial for more on this topic). Then, open Terminal inside that folder (right-click the folder and select "Open in Terminal"). Finally, run the following command to install all the programs:

sudo dpkg -i *.deb



STEP 6: Run this command in Terminal to make sure all the “shared libraries” are properly recognized by FFmpeg and mpv. This step is critical, so don't overlook it:

sudo ldconfig



STEP 7: Pin the advanced versions of the programs you just installed so that your system does not inappropriately "upgrade" them with older generic versions when you run "sudo apt-get upgrade" or "sudo apt-get dist-upgrade". Hat tip to "rpdom" for his pinning suggestion!

sudo nano /etc/apt/preferences

WHEN THE NANO EDITOR APPEARS INSIDE TERMINAL, COPY AND PASTE THE FOLLOWING 8 STANZAS INTO THE EMPTY DOCUMENT:

Package: mpv
Pin: version 0.27.0-1
Pin-Priority: 1001

Package: ffmpeg
Pin: version 3.4.1-1
Pin-Priority: 1001

Package: libass
Pin: version 0.13.7-1
Pin-Priority: 1001

Package: lame
Pin: version 3.100-1
Pin-Priority: 1001

Package: opus
Pin: version 1.2.1-1
Pin-Priority: 1001

Package: libvpx
Pin: version 1.6.1-1
Pin-Priority: 1001

Package: fdk-aac
Pin: version 0.1.5-1
Pin-Priority: 1001

Package: x264-snapshot-20180125-2245
Pin: version 20180125-1
Pin-Priority: 1001

TO SAVE THE FILE, PRESS "CTRL + X" TO EXIT OUT OF NANO – THEN TAP "Y" FOR YES – THEN TAP THE ENTER KEY TO ACCEPT THE CHANGE.






---------
APPENDIX 8: TROUBLESHOOTING:

If you encounter any issues in the future, a good thing to try is to simply re-install all the ".deb" packages you backed up in Step 13. The entire process takes less than one minute! See Appendix 6 for details.

If mpv generates any "port" or "MMAL" errors, make sure your GPU memory allocation is 128 MB (as indicated in my mpv instructions). And if mpv generates a "failed to add service" error, make sure you're not using the experimental desktop GL drivers known as Full KMS and Fake KMS (as indicated in my requirements section).

Finally, as mentioned previously, be sure that all Terminal windows are closed before you use mpv (in order to maintain keyboard control).






---------
THIS PAGE ONLY CONTAINS THE APPENDICES – PLEASE VISIT MY MAIN TUTORIAL PAGE:

TUTORIAL: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

.
Last edited by RPi_Mike on Wed Feb 07, 2018 3:37 pm, edited 2 times in total.

86jumpy
Posts: 13
Joined: Mon Jan 19, 2015 9:58 am

Re: MAJOR UPDATE: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Fri Feb 02, 2018 9:41 pm

Wow wonderful guide. Compliments. I have performed all the steps and at the moment everything works perfectly. I have three questions to ask:

1) Once you get the 8 * .deb files, if you want to reinstall mpv what is the exact procedure?

2) If in the future I had to run sudo apt-get dist-upgrade, could mpv no longer work as before?

3) Are there any minimum hopes that the procedure will work on Raspberry1 mod B or Raspberry 2 mod B?

Thanks in advance.

User avatar
rpdom
Posts: 12108
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: MAJOR UPDATE: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv

Fri Feb 02, 2018 9:50 pm

RPi_Mike wrote:
Wed Jan 31, 2018 12:24 pm
If you run a system update – such as "sudo apt-get upgrade" or "sudo apt-get dist-upgrade" – there's at least some chance that Raspbian's package manager may see that you've installed FFmpeg, mpv, x264 (or any of the 8 programs) and wrongly think "oh, I need to update these programs!" If it does that, it may overwrite your enhanced versions with the repository's stock versions, thus eliminating the advanced features this tutorial created.
That's where apt pinning can help. Pin to the specific versions from your .deb files and they won't get updated by the standard ones.

Return to “Graphics, sound and multimedia”

Who is online

Users browsing this forum: No registered users and 12 guests