Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 13 Oct 2019, 19:10
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Problems using ffmpeg (Solved)
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 4 [48 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Wed 13 Jul 2016, 16:22    Post subject:  

smokey01 wrote:
step wrote:
smokey01 wrote:
I just built the latest version, 3.1.1, for fatdog64-710 and made a sfs.
http://smokey01.com/fd710/sfs/
FD-710 alpha comes with a screen cap script that does audio and video. I think you can find it in the multimedia menu. An improved GUI as well a couple of bug fixes are coming in the FD-710 beta, but the current script core should be enough to show how jamesbond glued a/v streams together.

Step, if you mean Screencast.sh then it doesn't work here. It never worked properly in any of the 700 series for me. AVI does work but very poor quality even checked as high quality. Have you tried all the variations? Does it work for you?


Code:
   # 5. build the commandline to be passed
   FFMPEG_ARGS="-y -f x11grab -s $SOURCE_RES -r $FRAME_RATE -i ${XDISPLAY_NUMBER}+${SOURCE_ORG}"
   if [ $RECORD_AUDIO = "true" ]; then
      FFMPEG_ARGS="${FFMPEG_ARGS} -f alsa -ac $AUDIO_CHANNEL -ar $AUDIO_SAMPLERATE -i $AUDIO_DEVICE -isync -acodec $AUDIO_CODEC -ab $AUDIO_BITRATE"
   fi
   FFMPEG_ARGS="${FFMPEG_ARGS} -r $FRAME_RATE -vcodec $VIDEO_CODEC -s $TARGET_RES -b:v $VIDEO_BITRATE -bt $VIDEO_BIT_TOLERANCE $VIDEO_OPTION -f $FORMAT "
   
   #echo "$FFMPEG_ARGS"


I had a quick glance at that screencast.sh you uploaded smokey01. I'm sure you will know that all that needs fixed from the above, for newer ffmpegs, is to add these few extra switches given on the commandline I supplied, including -thread_queue_size and asyncts, and also to perhaps modify the preset values gives from

Code:
-preset slow


to veryfast, or in some cases superfast or ultrafast. Of course, this all depends on machine specs and having modern ffmpeg available.

Main thing here was just to give a commandline that works on modern ffmpeg (can remove options that aren't recognised for older ffmpegs, but results will vary). Fact is ffmpeg is a moving target due to development as eventually machine specs. My laptop core2 duo is more than 8 years old, and works fine with newer ffmpeg, so it seems appropriate to me to write new app based on that (and modify older apps).

William

_________________
github mcewanw
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Wed 13 Jul 2016, 16:56    Post subject:  

My own app includes an output of the exact ffmpeg command used, particularly so other developers can use the core command options in modifying or updating their own works. Otherwise we are writing apps that simply become obsolete after a year or two. My first version will simply include codecs that work for me on my system (which as I say isn't a particularly modern or fast machine anyway, but faster than some I've recently retired...). I have however left provision in both the code and my gui for adding some other codecs depending on my needs and possible requests. However, I'm keen to see as many such apps as possible, since variety is a good thing especially since everyone has their own 'tricks' we can learn from. That's the only reason I'll be publishing any apps nowadays since I only write them for my family needs, and I find I can't be bothered coding much nowadays (this last was a big effort for me - had the idea two years ago but slow... to start coding it... too lazy now and too much effort) and plenty better apps than any of mine out there nowadays anyway (not surprisingly!). Anyway, back to my less-than-wonderful app or I'll never finish it - everything working but a few little bits I'm playing around with in terms of functionality and I'm chopping and changing how the gui looks for my tastes. Not particularly worth waiting on though (just use a good commandline...), so hope someone writes something better.

William

EDIT: Actually, I prefer commandlines, which ironically means that the only gtkdialog app I've written that I particularly like is DoMyFile (along with Premote, and DoMyCommand, which are just variations of the same). I expect hardly anyone else uses that much if at all though, so was probably not worth my publishing it really (aside from sharing ideas)! Well, I do use Precord since it makes it quick and easy to open up mixer and check capture settings and allow quick opening of the record target directory, otherwise I'd probably just use a commandline for audio recording too... (or DoMyFile for the quick convenience). Actually, I might produce/extend at least one more app for my own satisfaction since I'd like to stick start/stop/pause buttons on DoMyFile since that's a convenience I like - then I can play around with commandlines to my hearts content thereafter (Pelo hates that approach of course since he seems to think 'passengers' as he refers to himself have no use for commands, which is just the simplest form of coding really)!

The worst and totally unhelpful thing, in my opinion is when someone talks as if knowledgeable but doesn't give a complete and tested command (talking generally, by the way, not about this thread or anyone in particular - I would say, however, that it is usually easy to pull-apart others code, and worth making suggestions, but all code takes a lot of work and most authors had reasons for their decisions - often better to write your own code if you can, if not happy with something, and making constructive suggestions based on that). We can all read, but only testing sorts through the junk, so it is not IMO helpful to simply suggest command options which may only have been read about by someone who has never tested the option in practice themselves. A tested command, on the other hand, saves a huge amount of re-reading and actual in-practice testing. If you haven't tested the option or command yourself, don't bother talking about it - at the most just provide a link to the page you read, in case it proves useful or relevant. The reason I say this is because of the amount of time I've wasted trying to find up-to-date actual working code for various needs when browsing the internet (or this forum) - there is so much out-dated info or rubbish re-gurgitated out there, it just makes the whole process of finding actual 'working' answers all the more difficult. At least Pelo doesn't pretend to code or use commandlines, so I thank him for not providing false leads...

_________________
github mcewanw
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Wed 13 Jul 2016, 19:15    Post subject:  

Pete wrote:

I'm not sure how close to completion your program is, but think about possibly giving the user some feedback from ffmpeg.


That was already in the program, Pete, there is a checkbox to create or not create ffmpeg log (uses FFREPORT for those who want to do similar).

As in, example:

Code:
FFREPORT=file=/tmp/myprogram.log:level=32 ffmpeg
followed by rest of ffmpeg commandline options per already posted


Pete wrote:

You may also want to give an option for selecting with or without audio.


Again, as in my now aging pavrecord (which itself is needing brought up-to-date with ffmpeg changes), I have allowed for creation of separate audio or video tracks already. Though, unlike in pavrecord, I join the separate audio and video commands into one to the commandline form I already posted above. In pavrecord, which was really designed for capturing webcam and not much for screencast work, the av tracks are later combined using ffmpeg, whereas in my new app, as I said, it ends up being a one-liner, which is easier to control (though more difficult to manually adjust sync, which I haven't found the need to do for my laptop anyway).

Anyway, I'd better get back to work polishing the gui up a bit or it will be another two years before I post it. Alas, when I'm coding, I get bored and seek distractions, and I turn to forum thread posting, which at other times I try to minimise to direct help requests or DebianDog testing/helping developments. Just happened to see smokey01s request for ffmpeg commandline solution and coincidentally had that at my fingertips.

William

_________________
github mcewanw
Back to top
View user's profile Send private message Visit poster's website 
smokey01


Joined: 30 Dec 2006
Posts: 2811
Location: South Australia :-(

PostPosted: Wed 13 Jul 2016, 23:32    Post subject:  

Sorry, I couldn't help myself. I just had to make a simple GUI. For the moment I've called it VSSR (Very Simple Screen Recorder).
It's huge, make sure you have lots of disk space Laughing
vssr.gz
Description  Fake .gz just rename it to vssr.
gz

 Download 
Filename  vssr.gz 
Filesize  1.6 KB 
Downloaded  117 Time(s) 
vssr.png
 Description   Simple but not so elegant.
 Filesize   12.18 KB
 Viewed   372 Time(s)

vssr.png


_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Thu 14 Jul 2016, 00:53    Post subject:  

smokey01 wrote:
Sorry, I couldn't help myself. I just had to make a simple GUI. For the moment I've called it VSSR (Very Simple Screen Recorder).
It's huge, make sure you have lots of disk space :lol:


That's fine smokey01. Just what I expected from someone once I posted that commandline - like I basically said, the more the merry and with most open-source licenses can freely publish code extracts with nothing more than acknowledgements if appropriate - not expected for just the underlying commandline! :-) Your app might be just what people want. My more complicated (yet hopefully also very simple to use) gui will be a few days yet probably.

William

_________________
github mcewanw
Back to top
View user's profile Send private message Visit poster's website 
Pete


Joined: 02 Mar 2014
Posts: 675

PostPosted: Thu 14 Jul 2016, 05:34    Post subject:  

@smokey01

Nice little program, thanks for sharing.
I never bothered with yad, but now looking at your script, I really like it and for quick little progs, it's much easier than gtkdialog.
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 1206

PostPosted: Thu 14 Jul 2016, 18:12    Post subject:  

smokey01 wrote:

Step, if you mean Screencast.sh then it doesn't work here. It never worked properly in any of the 700 series for me. AVI does work but very poor quality even checked as high quality. Have you tried all the variations? Does it work for you?
Yes, I meant screencast.sh. It works for me, audio and video, avi and mp4 with FD-710a2. I tested the version that will be included in the 710 beta cycle. Attached. Feedback is welcome - perhaps this script can be further improved before beta starts. Note that I tested small size capture windows only at default quality. I'm quite far from understanding all ffmpeg and multimedia quality nuances.
fatdog64-710b1-screencast.tar.gz
Description  for fatdog64 710 beta, currently unreleased, might still change, I don't know
gz

 Download 
Filename  fatdog64-710b1-screencast.tar.gz 
Filesize  6.16 KB 
Downloaded  90 Time(s) 

_________________
Fatdog64-802|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 2811
Location: South Australia :-(

PostPosted: Thu 14 Jul 2016, 20:05    Post subject:  

Thanks step this one works very nicely.
_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Sun 17 Jul 2016, 05:23    Post subject:  

step wrote:
Yes, I meant screencast.sh. It works for me, audio and video, avi and mp4 with FD-710a2. I tested the version that will be included in the 710 beta cycle. Attached. Feedback is welcome - perhaps this script can be further improved before beta starts. Note that I tested small size capture windows only at default quality. I'm quite far from understanding all ffmpeg and multimedia quality nuances.


Hi step and SSR,

Nice program with lots of potential. Just tried it - wish I had known about it a week ago and I might not have bothered pursuing my own one (and still might not once your one is final - I'm feeling lazy and fed up programming... but I may complete my own alternative anyway if only to inspire you to further develop your one).

Your program did record, but there seems to be a current problem of it leaving ffmpeg processes lying around after completion requiring me to manually killall ffpeg before running again.

As for more on ffmpeg -x11cap options, coincidentally I just came across a nice webpage that has tons of good info you might find useful in your developments. I hadn't seen it before (but again wish I had!):

https://ubuntuforums.org/archive/index.php/t-1392026.html

It also gives link to FFcast (which I've tried in the past):

https://github.com/lolilolicon/FFcast

and well as that author's xrectsel, which I see you are using as underlying screen area coord find in your app:

https://github.com/lolilolicon/xrectsel

Though I knew about xrectsel, I'm not myself using it in my app since I wanted to avoid having to also use xwininfo so did a bit of my own coding in C, which I probably will publish later, though probably changing its output format first (actually that's the main thing I was coding - my screencast GUI was originally just supposed to be very simple just for testing my C utility.

Anyway, looking forward to seeing your finished product - i note you are not currently implementing pause functionality, which would be a nice addition (though tricky to implement for video with ffmpeg - I believe SIGSTOP, SIGCONT don't really work properly (with av streams being recorded in a one-liner at least) - they mess up timestamps and leave gaps usually.

William

NOTE: that there is a probably reliable method of implementing pause functionality given in the above HOWTO link - using mkvmerge utility (package name mkvtoolnix - only for mkv of course).

_________________
github mcewanw
Back to top
View user's profile Send private message Visit poster's website 
step

Joined: 04 May 2012
Posts: 1206

PostPosted: Mon 18 Jul 2016, 05:30    Post subject:  

Hi mcewanw, thanks for your feedback and ideas. On fatdog64 710, which is the intended platform for this script, I don't see ffmpeg processes hanging. Maybe it's specific to your pet?
_________________
Fatdog64-802|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
gcmartin

Joined: 14 Oct 2005
Posts: 6730
Location: Earth

PostPosted: Mon 18 Jul 2016, 20:13    Post subject: Keeping up to date on this utility service  

@Step & @Smokey01: ... It appears, from my 10000 foot view that the 2 of you are collaborating on this effort. Will this utility land on @Smokey01's site, or in the PPM for @666Philb, @01Micko, and others to add to WOOFCE for PUP builds?

Could the progresses land in this thread's opening post?

Curious

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engines or use DogPile
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Mon 18 Jul 2016, 22:55    Post subject:  

step wrote:
Hi mcewanw, thanks for your feedback and ideas. On fatdog64 710, which is the intended platform for this script, I don't see ffmpeg processes hanging. Maybe it's specific to your pet?
I

Yes, could be the platform - I just gave it a quick spin on XenialDog, which is what I am currently mainly using. Even then, it will be a very minor problem, which I'll try and check sometime once your finished effort is published - I can always download fatdog64 at that stage if you don't publish as a more universal pet.

My own utility will probably be published in both deb and pet format, but I'll have to compile part of it for 64bit systems too, which I haven't done yet.

Never having myself used woof-ce, and too busy to be likely to, I have no idea how to add any of my own work to that or any of it's (?) repositories. Even Precord isn't in there as far as I know, despite it often being in earlier puppy releases. I suspect I am supposed to make submissions to woof-ce git if I want them considered, but that's not my thing really and, come to think of it, I've never been considered a 'developer' in any of the puppy-related developer lists anyway! (as far as I know) which is fair enough - I'm retiring soonish anyway :-)

http://puppylinux.org/wikka/PuppyOrganization
http://puppylinux.org/wikka/Puppy53Developers
(but, truth is, I think only BK and Pemasu were using any of my programs in their distributions - precord mainly and pavrecord a little, some had premote - none of these in Slacko as far as I know - I accept - they were pretty much junk, and so is this last one of mine since based on that old rubbish).

In last few years I mainly concentrated on DebianDog and haven't produced much in the way of apps of late - but I've pushed myself to complete this one maybe as a last. Lazy me.

Whatever I publish, will at least be on a thread in the forum here for use or not use.

William

_________________
github mcewanw
Back to top
View user's profile Send private message Visit poster's website 
step

Joined: 04 May 2012
Posts: 1206

PostPosted: Tue 19 Jul 2016, 09:46    Post subject:  

@gcmartin updates, if any, will be on published in the Fatdog64-710 beta ISO.

@mcewanw I haven't contributed anything to woof-ce either. I use Fatdog64 almost exclusively, which isn't built with woof-ce. I publish my things on GitHub and link them to forum threads as I see fit. I can manage my time better that way.

_________________
Fatdog64-802|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5623
Location: Republic of Novo Zelande

PostPosted: Tue 19 Jul 2016, 16:25    Post subject:  

mcewanw wrote:
I think only BK and Pemasu were using any of my programs in their distributions - precord mainly and pavrecord a little, some had premote - none of these in Slacko as far as I know -
Pavrecord is standard in Slacko 5.6
Havent done much with pups newer than that - i stick with what works for my hardware and Slacko 5.6 is my sweet spot so far.
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Fri 22 Jul 2016, 00:01    Post subject: Out of the boiler room into the sun  

greengeek wrote:
Pavrecord is standard in Slacko 5.6


Oh, that's news to me! I've never really been in the main Puppy group since had some disputes with some of its core in the distant past - these days are gone though. More recently, being mainly using DebianDog probably left me considered non-Puppy in terms of my efforts, but that's not true. I also have a recent Puppy on my system because I try to make anything I do compatible.

Anyway, pAVrecord, probably about to be rendered relatively obsolete for making screencasts (especially since it needs so ffmpeg/avlib alterations to produce best new results) - I've almost completed my new screencast app (and others doing similar), which should give much better results. (simple ability to do screencasts with pAVrecord was just a little extra anyway - never its focus)

The only caveat is that I made a design decision to only support reasonably recent ffmpet/avconv (since moving target options) and also I've limited the video encoder to what works very well on my Intel Core II duo, 2 GB RAM, nine year old machine. Older machines, may need slower encoder and a compilation of newer ffmpeg/avconv.

Still got to compile underlying utility for 64bit use too, and double/triple check as much of the code as possible before uploading somewhere next week all going well - assuming, that is, that I decide that it is really worth me publishing it for other than my family's use (they are my main testers, and provide the kind of useful constructive feedback I prefer - they are the only 'passengers' I need). I'm otherwise long looking forward to leaving the team working away in the dark undersea boiler rooms so that I can lie on the Puppy-like sundeck of this vessel along with the apparently elite personages who live up there (paraphrasing Pelo's recently removed signature). Makes me think of HG Wells "Time Machine". But Pelo has done me a favour - he has pretty much convinced me to put my feet up and enjoy family life more.

William

_________________
github mcewanw
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 3 of 4 [48 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0809s ][ Queries: 13 (0.0173s) ][ GZIP on ]