News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Pages (2): « First < Previous 1 [2] Last »
FLTK and ffmpeg
Author Message
dvw86
Junior Member
**


Posts: 39
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 0
Post: #11
RE: FLTK and ffmpeg

Juergen Wrote:
Normally I don't use Xine, but mplayer, which should be able to do that whithout calling ffmpeg.
But to start with your example, you should try the following first:

Code:
ffmpeg -vd /dev/video -f video4linux -r 25 -s 352x288 -sameq -f mpeg - | xine -G 352x288 -B --no-splash stdin:/

It should work better, but I haven't tested it, since I don't have xine available at the moment.

Juergen


Well I tried that about ten or twenty times and it worked once. All the other times the camera would come on and ffmpeg would start encoding. The xine window would open and display a scrambled window. As soon as I stopped ffmpeg, the xine window would display it's normal splash screen. It makes me wonder if it is a xine or a ffmpeg issue. If mplayer is more repeatable, I guess that I will have to install it. That would be a bit of a bummer since xine works so well for me otherwise.

04-08-2008 09:30 AM
Find all posts by this user Quote this message in a reply
Juergen
Member
***


Posts: 81
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #12
RE: FLTK and ffmpeg

mikshaw Wrote:

Quote:
>/dev/null & echo $!"

Looks like this is where I was going wrong.
I'd tried "urxvt & && echo $!" and "urxvt &; echo $!", which choked, and "(urxvt &) && echo $!", which echoed nothing.
I didn't know using a single "&" would separate the commands, but that makes sense to me now.


All control operators terminate a command. Control operators are "|" "&" "||" "&&" ";" ";;" "(" ")" and a new line.

You can also write someting like os.execute("cmd1 \n cmd2 \n cmd3") or use the ";" operator to separate two commands, but you can't use two control operators together (except for newline or the subshell operators). The || and && operators also require two expressions (expression1 || expression2) which cmd& can't be because it is executed in the background and can't give anything back.

Actually the bash manpage isn't that bad. If you open it and go down a few paragraphs to the "DEFINITIONS" section you'll see it is pretty easy. Although you should be aware that bash is only a bourne compatible shell and is a mix of Korn shell, Bourne shell and POSIX shell (which is also a mix). So not everything in that manual applies to other shells.

Juergen

04-08-2008 11:01 PM
Find all posts by this user Quote this message in a reply
Juergen
Member
***


Posts: 81
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #13
RE: FLTK and ffmpeg

dvw86 Wrote:
Well I tried that about ten or twenty times and it worked once. All the other times the camera would come on and ffmpeg would start encoding. The xine window would open and display a scrambled window. As soon as I stopped ffmpeg, the xine window would display it's normal splash screen. It makes me wonder if it is a xine or a ffmpeg issue. If mplayer is more repeatable, I guess that I will have to install it. That would be a bit of a bummer since xine works so well for me otherwise.


Actually the problem might be on the Xine side of the pipeline but on the ffmpeg side. You should test it with files first. It would be a good to try something like that (bash syntax):

Code:
mkdir vout
for ((i=1;i<=20;i++))
  do
     ffmpeg -vd /dev/video -f video4linux -r 25 -s 352x288 -sameq -f mpeg -t 30 vout/clip`printf "%.2i" $i`.mpg
  done

echo vout/* | xargs xine

If that works well, then there might be a problem with the pipes, but the chance is higher that there is a problem with the video input.

Juergen

04-08-2008 11:18 PM
Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #14
RE: FLTK and ffmpeg

Hi,

Because of this thread I have pondering on incorporating sys_proc, sys_file, sys_comm and maybe sys_env into 0.6.8.

The code is complete and I am trying to get time to do all the tests and cross builds, but I feel that sys_file in particular would help people here ... Juergen, your thoughts ?

Cheers
JohnM

04-09-2008 07:25 AM
Visit this user's website Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #15
RE: FLTK and ffmpeg

JohnMurga Wrote:
Hi,

Because of this thread I have pondering on incorporating sys_proc, sys_file, sys_comm and maybe sys_env into 0.6.8.

The code is complete and I am trying to get time to do all the tests and cross builds, but I feel that sys_file in particular would help people here ... Juergen, your thoughts ?

Cheers
JohnM


And what about luaEx (http://lua-ex.luaforge.net/) ?

LuaSys is proving to be a pain in the arse :-)

Cheers
JohnM

04-10-2008 06:53 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Juergen
Member
***


Posts: 81
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #16
RE: FLTK and ffmpeg

JohnMurga Wrote:

JohnMurga Wrote:
Hi,

Because of this thread I have pondering on incorporating sys_proc, sys_file, sys_comm and maybe sys_env into 0.6.8.

The code is complete and I am trying to get time to do all the tests and cross builds, but I feel that sys_file in particular would help people here ... Juergen, your thoughts ?

Cheers
JohnM


And what about luaEx (http://lua-ex.luaforge.net/) ?

LuaSys is proving to be a pain in the arse :-)

Cheers
JohnM

Actually I have proposed luaEx a few days ago ;-)

Nevertheless it would be good to have an IO implementation that can use buffers, work with file descriptors, can manipulate them and provides a select/poll/epoll/... type call. Also pipes and something like spawn implementation in luaex would be a really good thing.
While I have no problem with luasys, it looks very raw and is completely undocumented.

Unfortunately on Linux I have the problem that I can't use most of the external modules, because I get a segmentation fault with murgaLua.
It would also be a good idea to export the symbols from libLua, which should remove the necessity to recompile libraries for murgaLua to explicitly link against liblua. (I tested it with the original lua interpreter and it works also with UPX). Unfortunately it doesn't work this way on Windows. So for Windows it will be necessary to either distribute a liblua or compile the external modules specifically for murgaLua.

Juergen

04-10-2008 07:39 AM
Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #17
RE: FLTK and ffmpeg

luaEx doesn't have the IO stuff that I think you'd need ...

I have done a lot of work tidying up LuaSys and got it all working nicely on Windows last night ... If it works OK on Mac/Linux then we'll be looking good.

Primarily what you'll be getting is the IO stuff, memory buffers, serial port support, environment and and spawn implementations from LuaSys.

Fingers crossed for this evening (!)

If it all works then you are right ...
I have to document things, as LuaSys is completely undocumented :-)

Cheers
JohnM

04-10-2008 10:48 PM
Visit this user's website Find all posts by this user Quote this message in a reply
dvw86
Junior Member
**


Posts: 39
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 0
Post: #18
RE: FLTK and ffmpeg

JohnMurga Wrote:
Primarily what you'll be getting is the IO stuff, memory buffers, serial port support, environment and and spawn implementations from LuaSys.


WooHoo! Thanks! With serial port support I could use murgaLua to talk with PLC's.
PLC Info

04-11-2008 04:32 AM
Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #19
RE: FLTK and ffmpeg

Juergen Wrote:
Unfortunately on Linux I have the problem that I can't use most of the external modules, because I get a segmentation fault with murgaLua.
It would also be a good idea to export the symbols from libLua, which should remove the necessity to recompile libraries for murgaLua to explicitly link against liblua. (I tested it with the original lua interpreter and it works also with UPX). Unfortunately it doesn't work this way on Windows. So for Windows it will be necessary to either distribute a liblua or compile the external modules specifically for murgaLua.


I think that is due to my link options under Linux, it'll most likely work on 0.6.8 ... Either for Windows I have also put an example in place.

Either way you'll get to try it out this weekend as I'll definitely do the release in the next couple of days ...

Cheers
JohnM

04-12-2008 05:01 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Pages (2): « First < Previous 1 [2] Last »
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: