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 26 Oct 2014, 01:36
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
2> redirect won`t work in file or in rxvt run in file.
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Wed 15 Dec 2010, 03:38    Post_subject:  2> redirect won`t work in file or in rxvt run in file.  

I get no output from either line, but line #1 works in a live rxvt on the desktop.
Code:
#!/bin/sh
######### Get ffmpeg installed codecs.
ffmpeg 2> /tmp/ffmpeg.tmp1
rxvt -e ffmpeg 2> /tmp/ffmpeg.tmp2

The rxvt line flashes rxvt, but I see no code executed and no output.

I`ve needed this for improving Puppy`s ripper app. also... ( Zigbert`s )
Plus for many CLI apps. it could give an accurate "percent done" output for a progress bar.

Edited_time_total
Back to top
View user's profile Send_private_message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Wed 15 Dec 2010, 04:30    Post_subject:  

I've had instances where '&>' worked where '2>' didn't.
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Wed 15 Dec 2010, 11:56    Post_subject:  

Thanks jpeps but no go... Confused
I`ve run up against this little hassle a few times now with no solution.
Back to top
View user's profile Send_private_message 
amigo

Joined: 02 Apr 2007
Posts: 2261

PostPosted: Wed 15 Dec 2010, 12:07    Post_subject:  

I think this will do what you want:
rxvt -e "ffmpeg 2> /tmp/ffmpeg.tmp2"
Your original would be re-directing the stderr of *rxvt* to the file, not that of ffmpeg.
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Wed 15 Dec 2010, 12:24    Post_subject:  

Sorry amigo, I thought you had it, and I know you`re right about the redirect.
But no go also... It doesn`t even work in a live rxvt running on the desktop.
This is the only thing so far that works running in a live rxvt:
Code:
ffmpeg 2> /tmp/ffmpeg.tmp1

I need to generate the file in code of course.

I guess I may have to make a dialog to enter ffmpeg`s codecs manually... Mad
Back to top
View user's profile Send_private_message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Wed 15 Dec 2010, 15:43    Post_subject:  

On my non-Puppy system, I can catch the output via script without issues, so Puppy's ffmpeg must work differently than mine.

Anyway, I'm guessing that your ffmpeg is detecting that it isn't being run interactively, and therefor it changes its output behavior. I'm pretty sure you can trick a program into thinking it is being used interactively, but I don't remember how.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send_private_message Visit_website 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Wed 15 Dec 2010, 20:12    Post_subject:  

pizzasgood; I thought about this ffmpeg not being compiled properly.
It`s a upgrade .pet for dpup, works well except for this little hiccup.
Come to think of it... It didn`t want to do Xvid 2-pass, but x264 2-pass works.

Puppy`s ffmpeg doesn`t have the newer codecs I think.
I seem to remember it didn`t work properly somehow, and so dpup`s upgrade...

### Is it possible to get a working compiled ffmpeg to try?
Back to top
View user's profile Send_private_message 
zigbert


Joined: 29 Mar 2006
Posts: 5754
Location: Valåmoen, Norway

PostPosted: Thu 16 Dec 2010, 11:16    Post_subject:  

I do this in Pmusic. - Had the same problem and solved it by

Code:
echo 'exec ffmpeg 2> /tmp/ffmpeg.tmp1' > /file
chmod 722 /file
/file

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Thu 16 Dec 2010, 19:31    Post_subject:  

ffmpeg is painful to work with using stdin/stderr: things that you think should go to stderr go to stdout and vice versa.

you tell ffmpeg to do something, it does it ... but tells you about it in stderr? how does that make any sense

I think I ended up dumping them together using:
ffmpeg ...parameters... 2>&1 >file

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Fri 17 Dec 2010, 23:42    Post_subject:  

Thanks for all the help guys...
None of the code worked, I think it must be the ffmpeg I have.

Puppy`s ffmpeg doesn`t work right for some reason.
The dpup .pet package works ok for x264, but it has this odd behavior.

Is there another compile of ffmpeg that I could try?
I hate to download Ubuntu just to get ffmpeg out of it.
Or maybe one from the Debian repository will work properly.
Back to top
View user's profile Send_private_message 
trapster


Joined: 28 Nov 2005
Posts: 2009
Location: Maine, USA

PostPosted: Sat 18 Dec 2010, 07:54    Post_subject:  

I've been using this one for my cli video converting.

Code:
# ffmpeg   
FFmpeg version 0.6, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jul 15 2010 17:29:31 with gcc 4.2.2
  configuration: --prefix=/usr --cpu=i686 --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libfaad --enable-pthreads --enable-small --enable-postproc --enable-libvorbis --enable-gpl --enable-shared --enable-nonfree --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-debug --enable-bzlib --enable-zlib --enable-libspeex --enable-version3 --enable-runtime-cpudetect --enable-x11grab --enable-libtheora --enable-libxvid --enable-swscale --enable-mmx --enable-libvpx
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.73. 2 / 52.73. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder


I'd have to dig to figure out where I got it from.

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Puppeee4.31 + 1.0, Puppy4.10 + Lupu52
Currently using Slacko AND lupu52 w/ fluxbox
Back to top
View user's profile Send_private_message Visit_website 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Sat 18 Dec 2010, 12:36    Post_subject:  

trapster; I`d appreciate it if you could gzip your ffmpeg and post it here for me?
Your`s is almost a year newer compile, and hopefully it was done properly.

I`m hoping that it`s ffmpeg that`s my problem and not something else.
Mine just won`t pipe it`s output to a file from a script, and won`t do Xvid 2 pass.
Back to top
View user's profile Send_private_message 
trapster


Joined: 28 Nov 2005
Posts: 2009
Location: Maine, USA

PostPosted: Sat 18 Dec 2010, 17:55    Post_subject:  

Here is the ffmpeg.tar.gz

I believe it was from THIS pet
ffmpeg.tar.gz
Description  ffmpeg version 0.6
Built on July 15, 2010 with gcc 4.2.2
gz

 Download 
Filename  ffmpeg.tar.gz 
Filesize  36.49 KB 
Downloaded  234 Time(s) 

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Puppeee4.31 + 1.0, Puppy4.10 + Lupu52
Currently using Slacko AND lupu52 w/ fluxbox
Back to top
View user's profile Send_private_message Visit_website 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Sat 18 Dec 2010, 18:52    Post_subject:  

Thanks loads trapster, I`ll let you know how my luck does with it...
Cool
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Sat 18 Dec 2010, 19:17    Post_subject:  

Wow !!! One thing I noticed right away is your`s is only 75k in size!
The one I have made for dpup is almost 2m in size!
I`m guessing I can`t just use ffmpeg exec., I will have to install the whole .pet.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0741s ][ Queries: 12 (0.0051s) ][ GZIP on ]