Author Topic: Video Encoding  (Read 8798 times)

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Video Encoding
« on: November 08, 2020, 03:12:39 pm »
Hi everyone, for some time I have been testing high definition video on my Power system and I realized that I cannot go beyond the 1440P. From what I know, unfortunately on Power the video decoding is not optimized to the best and consequently, the performance is not what you can get on an X86 or ARM system. Whatever application you use or whatever browser you use, in the end you can't get regular and fluid 4K content unfortunately but only in 2K. My question at this point arises spontaneously, will we ever manage to have one day, the optimization we need to finally have a video decoding worthy of the name? It is not known ...

pocock

  • Sr. Member
  • ****
  • Posts: 291
  • Karma: +32/-0
    • View Profile
Re: Video Encoding
« Reply #1 on: November 08, 2020, 03:50:08 pm »

Have you tried the ffmpeg patches?

The work is being sponsored through BountySource but I'm not sure if it is merged into ffmpeg, you can search the ffmpeg trac or try to apply the patches manually.

The new Radeon cards have AV1 on the card and many existing Radeon cards can do some existing codecs too.  Have you tried using any software that uses the GPU-based decoders?  I think gstreamer has some plugin support for various cards.
Debian Developer
https://danielpocock.com

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Re: Video Encoding
« Reply #2 on: November 09, 2020, 01:05:25 am »
Hi, no I haven't tried these solutions.  So is gstreamer an application to install or something else?  Let me understand better ... thanks

pocock

  • Sr. Member
  • ****
  • Posts: 291
  • Karma: +32/-0
    • View Profile
Re: Video Encoding
« Reply #3 on: November 09, 2020, 03:54:40 am »

gstreamer is a framework that can be used to create multimedia applications

It can also be used from scripts to do various things involving real-time streams or modification of media files

For example, you can use one plugin to read an MP4 file and another plugin to display it in a window.

I think that Radeon should work with VA-API
https://gstreamer.freedesktop.org/documentation/vaapi/vaapidecodebin.html

and this is for NVIDIA
https://gstreamer.freedesktop.org/documentation/nvcodec/index.html

The Arch Linux wiki has some comments on the way to access hardware encoding/decoding for different GPUs:
https://wiki.archlinux.org/index.php/Hardware_video_acceleration

Debian Developer
https://danielpocock.com

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Re: Video Encoding
« Reply #4 on: November 09, 2020, 07:26:58 am »
Ok, but let me understand more specifically, I have to run that command described in the site, the first, the one where it says "example of launch line" and then what should I do?

pocock

  • Sr. Member
  • ****
  • Posts: 291
  • Karma: +32/-0
    • View Profile
Re: Video Encoding
« Reply #5 on: November 09, 2020, 01:45:26 pm »

You need to adapt the example command to make it do what you want to do.

It might be helpful to ask people in the mailing list or IRC channel for gstreamer, they can help you construct a gstreamer command to do just about anything and they may be interested in how you are using it on a new platform
Debian Developer
https://danielpocock.com

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Re: Video Encoding
« Reply #6 on: November 09, 2020, 03:10:43 pm »
Ok thanks, I'll try to find that channel, which server must you connect to to reach this channel via irc, what about?

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Re: Video Encoding
« Reply #7 on: November 13, 2020, 04:58:39 pm »
Hi Pocock, I tried to use that command you posted to me but I get the syntax wrong, so I didn't quite understand how to use it. Can you write the exact syntax that I need to report on the terminal to make me better understand how to use it? Thank you very much

pocock

  • Sr. Member
  • ****
  • Posts: 291
  • Karma: +32/-0
    • View Profile
Re: Video Encoding
« Reply #8 on: November 14, 2020, 11:09:52 am »

This is the example command in the page:

Code: [Select]
gst-launch-1.0 filesrc location=~/big_buck_bunny.mov ! qtdemux ! h264parse ! vaapidecodebin ! vaapisink

Notice that the qtdemux is only for a Quicktime file (*.mov).  If your input file has another format, such as MP4 or WebM, then you need to replace the qtdemux with another element.

I recommend asking on the mailing list for gstreamer, this is also a good way to raise awareness about what people are trying to do with OpenPOWER.


Please post the full command line you are trying to use and the full error.
Debian Developer
https://danielpocock.com

MPC7500

  • Hero Member
  • *****
  • Posts: 587
  • Karma: +41/-1
    • View Profile
    • Twitter
Re: Video Encoding
« Reply #9 on: November 14, 2020, 11:22:32 am »
Or just use Google search -> enable vaapi fedora and you will get a result like this.

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Re: Video Encoding
« Reply #10 on: November 15, 2020, 06:59:18 am »
well guys thanks, i will try to see both ways and i will let you know if i get the desired result ... thanks a lot

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Re: Video Encoding
« Reply #11 on: November 15, 2020, 09:35:26 am »
Guys I'm reading now what the good MPC7500 recommended to me and I found what he says. In practice, it should be enough for me to run the command "sudo dnf install chromium-libs-media-freeworld" to enable the video acceleration patch on the GPU on Chromium and thus relieve the CPU of this task since the software for Power is not optimized unfortunately for us . I have the RPM Fusion for some time now as they are used to use other programs such as VLC for example that requires them before installing it and since then I have already installed them. I try to do this simple step and see what I get, it seems simpler and more immediate than the other. Thanks always very much to MPC for his excellent reports!

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Re: Video Encoding
« Reply #12 on: November 16, 2020, 01:40:53 pm »
Hello all friends of Power, I tried a few operations but unfortunately I did not get the desired results. In the meantime I tried to run that command according to a guide I read on Google, but apparently it does not exist for Power as it tells me no match. So I followed another guide where it told me to install some file of which 2 I already had and 1 I didn't, and then to enable this time on Firefox, some options to activate this GPU acceleration but in the end it didn't work anyway. The only doubt I have is that he asks me Wayland as a graphic designer while I have always had and used Xorg. I wonder if that's my problem or there's something else... Do you have any advice about it?
I also tried to do it through VLC but the problem is always the same, it reads in 2K but in 4K it fails, I think because even then it uses the CPU and not the GPU...


pocock

  • Sr. Member
  • ****
  • Posts: 291
  • Karma: +32/-0
    • View Profile
Re: Video Encoding
« Reply #13 on: November 16, 2020, 01:47:29 pm »

Where are you based?  Are you close enough to any other developers who may be able to work through this with you?

Are you able to interact with any of the gstreamer developers on IRC?
Debian Developer
https://danielpocock.com

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Re: Video Encoding
« Reply #14 on: November 16, 2020, 03:10:23 pm »
hi pocock, I'm in Italy, I don't know if I can interact with that channel that I think is American ... I think I can try in any case but I have to understand how to connect via Irc, I haven't used it for many years so I don't know if I can now use it and then find the right server to connect to ...