![]() |
[SOLVED] ffplay (ffmpeg) no audio
Hi,
I'll openly admit that I haven't a clue what I'm doing, but as I've been having a few problems gstreamer, I thought I'd try some other options... I've built ffmpeg (including ffplay), and when I try and play a video with ffplay, the video itself is fine (after rotating and resizing), but I'm getting no audio. I've seen various terms flying around, like alsa, oss, libaudioresource, pulseaudio etc., but I'm not really sure what I'm trying to achieve, let alone how to do it. Just wondered if anyone could give me any clues on what I should try, e.g. parameters to ffplay or building ffmpeg again with certain things enabled? Thanks |
Re: ffplay (ffmpeg) no audio
Like yourself, I find myself wanting to play with things I know little about. In my mind, this is one of the best ways to learn; by fiddling and of course, also accepting you may cause problems with your beloved device.
I ended up using FFMPEG by bloodyfoxy on Openrepos; https://openrepos.net/content/bloodyfoxy/ffmpeg. Then, with a few videos shot using my Jolla1, I had a go at different conversions, some worked, some didn't. Okay, as FFMPEG is not specific to Sailfish, you can find plenty of help/walk-throughs/videos littering the net. Here's what I just tried on my device and it worked, albeit very basic, but it allows one to get the gist of what's going on....bit by bit :) OKay, shoot a short video, say 30 seconds worth with some audio; chatting, music, whatever, but do make some noise as the following steps will strip the soundtrack from an MP4 video leaving it as an MP3 audio track. Then in terminal, try this; ffmpeg -i 20170509_105924.mp4 -vn -ar 44100 -ac 2 -ab 320 -f mp3 audio.mp3 (replace '20170509_105924.mp4' with your own) Once done, open Mediaplayer, find your track and play it. Hope this helps, a little...... Regards, |
Re: ffplay (ffmpeg) no audio
Quote:
|
Re: ffplay (ffmpeg) no audio
Quote:
|
Re: ffplay (ffmpeg) no audio
Quote:
I will have a look next couple of days. |
Re: ffplay (ffmpeg) no audio
I've compiled ffplay now and there are no sounds, I don't know why. :confused:
Some months ago I've compiled mpv and it doesn't work on sailfish os. :( |
Re: ffplay (ffmpeg) no audio
Quote:
# ffmpeg -i file.mp4 -f wav - | paplay this plays sound, but I can't find a way to make ffplay play sound, and I can't get aplay (alsa) to work either # ffmpeg -i file.mp4 -f avi - | tee >(ffplay -) >(ffmpeg -i - -f wav - | paplay) > /dev/null this gives me sound and video, but it goes a bit mad when you pause and unpause |
Re: ffplay (ffmpeg) no audio
Thanks, your command line works, but on my jolla1 some videos pause and play too often... so i made a simple script file:
Code:
#!/bin/bash this is a temporary solution: i hope ffplay will be fixed soon |
Re: ffplay (ffmpeg) no audio
1 Attachment(s)
After reading https://stackoverflow.com/questions/...o-output-sound it definitely sounded like the problem was that ffplay needed to be patched for Sailfish to use libaudioresource, so I decided to give it a go, and depsite not having a clue what I was doing, it seems to work!
Attached is ffplay.c and ffbuild/config.mak. There may be some devel files that need to be pkcon install'ed, but I can't remember for sure, but it should be obvious from any compilation errors if there are. The screen does go to sleep during playback, but https://openrepos.net/content/xmlich02/stay-awake can be used to work around this. EDIT: In case anyone wants to try this, these are the devel files that I currently have installed, though I don't think all of them are required: Installed SDL2-devel-2.0.3-1.4.1.armv7hl Installed SDL2_sound-devel-1.0.1-1.2.3.armv7hl Installed glib2-devel-2.48.0+git3-1.11.2.armv7hl Installed glibc-devel-2.19+6.9-1.8.1.armv7hl Installed jolla-developer-mode-0.3.26-10.27.4.jolla.armv7hl Installed jolla-developer-mode-profile-0.3.26-10.27.4.jolla.armv7hl Installed libaudioresource-devel-1.0.5-1.4.3.armv7hl Installed libxml2-devel-2.9.1-1.3.5.armv7hl Installed pcre-devel-8.31-1.3.1.armv7hl Installed perl-devel-2:5.16.1-1.1.29.armv7hl Installed pulseaudio-devel-8.0+git5-1.21.2.armv7hl Installed smpeg-devel-2.0.0-1.1.6.armv7hl Installed zlib-devel-1.2.8+git2-1.3.21.armv7hl And to resize and rotate (for my device) I use: ffplay -i <filename> -vf "transpose=1" -x 540 -y 960 |
All times are GMT. The time now is 21:43. |
vBulletin® Version 3.8.8