Linux.com

Author Message
Joined: Dec 20, 2008
Posts: 34
Other Topics
Posted Jan 19, 2009 at 5:22:59 PM
Subject: problem in redirection
When I read the content of the temporary file which is generated be the 'mktemp' command, it has all the values which are requires but whenever I read the file StreaIDName.sdp, it is always blank, I dont know what is the problem. Can you please look and see where is the problem? [code=xml] TempSDP=`mktemp -t $StreamIDName.XXXXXX` ffmpeg -re -i $StreamID -vcodec mpeg4 -an -f rtp "rtp://$ServerIP:$RTP_Video" -vn -acodec mp2 -f rtp "rtp://$ServerIP:$RTP_Audio" -newaudio 2>/dev/null 1>$TempSDP & sed '1d' $TempSDP > $RTSP/$StreamIDName.sdp echo "File " cat $RTSP/$StreamIDName.sdp[/code] Thanks in Advanced
Back to top Profile Email Website
blinky
Joined Jan 08, 2009
Posts: 51

Other Topics
Posted: Jan 19, 2009 6:21:10 PM
Subject: problem in redirection
The problem is sed '1d' $TempSDP > $RTSP/$StreamIDName.sdp sed is a stream editor, "id" removes the first line. iF there is only one (1) line in ' $TempSDP then you get nothing out if $TempSDP contains Line 1 Line 2 Line 3 Line 4 Line 5 then sed '1d' $TempSDP outputs Line 2 Line 3 Line 4 Line 5

In a world without walls and fences, who needs Windows and Gates

Back to top Profile Email Website
waqasdaar
Joined Dec 20, 2008
Posts: 34

Other Topics
Posted: Jan 19, 2009 6:27:46 PM
Subject: problem in redirection
Yes I know that, $TempSDP contains v=0 o=- 0 0 IN IP4 127.0.0.1 t=0 0 s=No Name a=tool:libavformat 52.23.1 m=video 10000 RTP/AVP 96 c=IN IP4 x.x.x.x b=AS:200 a=rtpmap:96 MP4V-ES/90000 a=fmtp:96 profile-level-id=1 m=audio 20000 RTP/AVP 14 c=IN IP4 x.x.x.x b=AS:64 But it shows nothing when I cat. I dont know what is the problem.
Back to top Profile Email Website
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya