Author Topic: ffmpeg + ffplay  (Read 4152 times)

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
ffmpeg + ffplay
« on: August 27, 2018, 05:13:41 pm »
Hi all,

after working out how SDL sound works with sailfish, I added the fixes to my ffmpeg compilation. It hasn't changed the ffmpeg utility (convert from one video format to another amongst other things), but it now means that ffplay is fully functional. This is a very simple video player which uses ffmpeg to decode the streams and plays using SDL. It supports a lot more formats than the gstreamer based video players. There is no onscreen gui for control, however everything is keyboard based which is perfect for the gemini.

If people are interested, I could try to package it up, or just tgz it (there are 2 executables - ffmpeg and ffplay). Works brilliantly as command line viewer.

On another note, if anyone is interested in compiling/porting SDL apps to sailfish, I can give a quick howto to get things working, and steps to porting. There are lots of SDL apps around, and sailfish needs native apps  The qml front end is simple to create and using a native ide (tIDE), you can program, compile, test and package right on the gemini.
« Last Edit: August 27, 2018, 05:17:56 pm by vader »

FrankS

  • Newbie
  • *
  • Posts: 27
    • View Profile
ffmpeg + ffplay
« Reply #1 on: October 03, 2018, 11:03:12 am »
Quote from: vader
Hi all,

after working out how SDL sound works with sailfish, I added the fixes to my ffmpeg compilation. It hasn't changed the ffmpeg utility (convert from one video format to another amongst other things), but it now means that ffplay is fully functional. This is a very simple video player which uses ffmpeg to decode the streams and plays using SDL. It supports a lot more formats than the gstreamer based video players. There is no onscreen gui for control, however everything is keyboard based which is perfect for the gemini.

If people are interested, I could try to package it up, or just tgz it (there are 2 executables - ffmpeg and ffplay). Works brilliantly as command line viewer.

On another note, if anyone is interested in compiling/porting SDL apps to sailfish, I can give a quick howto to get things working, and steps to porting. There are lots of SDL apps around, and sailfish needs native apps  The qml front end is simple to create and using a native ide (tIDE), you can program, compile, test and package right on the gemini.

Where can I find the ffmpeg and ffplay?

Porting SDL apps reminds me to scummvm. That would be nice to have.

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
ffmpeg + ffplay
« Reply #2 on: October 03, 2018, 06:50:33 pm »
Quote from: FrankS
Where can I find the ffmpeg and ffplay?

Porting SDL apps reminds me to scummvm. That would be nice to have.

I have attached a tgz of ffmpeg and ffplay. You can't attach tgz files, so rename ffmpeg.txt to ffmpeg.tgz once downloaded. They are command line utils, so I haven't bothered to create any qml or rpms. Copy them (as root with devel-su) to /usr/local/bin/ and make sure you have all the libraries by using ldd. I think you only need audioresource for ffplay. I didn't bother rotating ffplay, as you can do this on the command line. I added an alias to my .bash_profile as follows:

alias ffp="ffplay -vf transpose=cclock -x 1080 -y 2160"

You can then use ffplay by using ffp, so to watch movie.mpg, from the terminal run:

ffp movie.mpg

To check to see if all the libraries are on your system, from the terminal run:

ldd /usr/local/bin/ffplay

it will show which libraries are linked, which versions are linked, and if the library is missing. Install any missing libraries with pkcon.

As far as scummvm, I just play the original DOS game under dosbox. I am currently up to act 2 of discworld, and it runs fine. I started porting scummvm, and stopped as dosbox does the job.

EDIT: when you run ffplay, there is no gui. To go forward/backwards use the right and left arrows. Up and Down jump a minute or so. You can pause with space, and go to single frame mode with 's'. That will pause, and each 's' will advance a frame. You can always run ffplay -h to get help

It is a simple video player, but plays most formats, including rtp and http(s) streams. I use it to watch content on my panasonic pvr over UPnP. I patched/recompiled djmount to work with panasonic uPnP V2.
« Last Edit: October 03, 2018, 06:58:17 pm by vader »

FrankS

  • Newbie
  • *
  • Posts: 27
    • View Profile
ffmpeg + ffplay
« Reply #3 on: October 04, 2018, 11:08:39 am »
Very nice, thank you. With ffplay I am able to look TV on geminiPDA over a triax sat>ip box this way. That is something the 'LLs vPlayer' cannot handle.


for example RTL Television on Astra 19.2°E):
Code: [Select]
ffplay -vf transpose=cclock -x 1080 -y 2160 -i "http://satip/?src=1&freq=12188&pol=h&ro=0.35&msys=dvbs&mtype=qpsk&plts=off&sr=27500&fec=34&pids=0,17,18,163,104,44,105"
It always tells me 'library "libwlparser.so" not found' but is playing the video and audio.

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
ffmpeg + ffplay
« Reply #4 on: October 04, 2018, 06:34:49 pm »
Quote from: FrankS
Very nice, thank you. With ffplay I am able to look TV on geminiPDA over a triax sat>ip box this way. That is something the 'LLs vPlayer' cannot handle.


for example RTL Television on Astra 19.2°E):
Code: [Select]
ffplay -vf transpose=cclock -x 1080 -y 2160 -i "http://satip/?src=1&freq=12188&pol=h&ro=0.35&msys=dvbs&mtype=qpsk&plts=off&sr=27500&fec=34&pids=0,17,18,163,104,44,105"
It always tells me 'library "libwlparser.so" not found' but is playing the video and audio.

I'm glad someone else finds it useful. The libwlparser.so error seems to be across the board. I get it in everything from the browser to a simple qml page rendered with qmlscene. All I could find out about it was it is probably a wolfram language parser. Obviously not needed, as it doesn't seem to stop anything running.

FrankS

  • Newbie
  • *
  • Posts: 27
    • View Profile
ffmpeg + ffplay
« Reply #5 on: October 08, 2018, 08:01:01 am »
Quote from: vader
I'm glad someone else finds it useful. The libwlparser.so error seems to be across the board. I get it in everything from the browser to a simple qml page rendered with qmlscene. All I could find out about it was it is probably a wolfram language parser. Obviously not needed, as it doesn't seem to stop anything running.
Ok, many other apps are missing libwlparser.so too, but are working. Started some from command line. It is not essential.

rasva

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • http://
ffmpeg + ffplay
« Reply #6 on: October 25, 2018, 02:07:49 pm »
Thanks, playback using ffplay seems to be smooth compared to some other players I tried to install from Jolla store and Openrepos. No GUI is a plus for me, I am got used for console mplayer
I am also getting message about missing "libwlparser.so", but it works.
« Last Edit: October 25, 2018, 02:10:57 pm by rasva »
Cosmo
Gemini 4G/SailfishX

In past: Zaurus SL-C3200, Jornada 728, 690, Mobilepro 900C, Sharp PC3100, HP 200LX....

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
ffmpeg + ffplay
« Reply #7 on: October 30, 2018, 08:16:21 pm »
Sorry I didn't respond earlier - was at the OSS conference. I'm glad it works for you - I prefer a command line player as well. I am happy with the playback performance, but the major reason I did it was the codec support. It supports more codecs than gstreamer, and if there is one it doesn't support, I can add it

There are a lot of apps that complain about libwlparser - the best I could find out is it is something to do with wolfram language parser - maybe a libhybris thing.