Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #68511
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'output': 0.05; 'string.': 0.05; 'worked,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'posted': 0.15; 'command-line': 0.16; 'fetch': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'guessing': 0.16; 'partly': 0.16; 'somewhere.': 0.16; 'timeout': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'module': 0.19; 'starts': 0.20; 'code,': 0.22; 'otherwise,': 0.22; 'cc:addr:python.org': 0.22; 'this?': 0.23; 'instance,': 0.24; "haven't": 0.24; '(or': 0.24; 'cc:2**0': 0.24; 'player': 0.26; 'shown': 0.26; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'am,': 0.29; 'thus': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'directly,': 0.31; 'extract': 0.31; 'probably': 0.32; 'subject:the': 0.34; 'subject:from': 0.34; 'could': 0.34; 'problem': 0.35; "can't": 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'shows': 0.36; 'url:org': 0.36; 'seconds': 0.37; 'rather': 0.38; 'launch': 0.39; 'how': 0.40; 'radio': 0.60; 'simple': 0.61; 'first': 0.61; 'talking': 0.65; 'mar': 0.68; 'done;': 0.84; 'song': 0.84; 'to:none': 0.92 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=igbBcb38iwoUZpPpr7j7S7yX1eHqJEEBRR68CjFyrxE=; b=TwUfpb7wkdfNqkvCDmfb+ork2LasGK05Zxij5OFU2TwZ0HB4rV5Obd0NXasQkRbtD+ iV6YXP3w5pQA6EvD0nMiA4NEIKqhOyEYnMHkinzqynBgoJ873picD+ykEepA3Jch0+dg wV8e7WVd1JtLWVVa4bcAksYtDcYDtEGNl2aem1JjDH+T183ZjR3+IFtrW2S7XFljVHMq GbnxB90w1HG7vKCb+2M8Axswd8HmEhfGQbWEU6uup1T6Cf6VsrRmt94pAc+p5Hr5w9on bHiTifIP2gDK5+ndbQ7mhKIG9FRmSh5pQcb647iHJ0cFafZPvRCwAB6ZmJJF4BMZ5wnk mCAg== |
| MIME-Version | 1.0 |
| X-Received | by 10.66.118.71 with SMTP id kk7mr33873590pab.14.1395162763651; Tue, 18 Mar 2014 10:12:43 -0700 (PDT) |
| In-Reply-To | <CAOuJsM=ehKxRDmJ=2HXUCi6OZ8g0OBjQG87RQ+NWuCeBFKKedw@mail.gmail.com> |
| References | <CAOuJsM=ehKxRDmJ=2HXUCi6OZ8g0OBjQG87RQ+NWuCeBFKKedw@mail.gmail.com> |
| Date | Wed, 19 Mar 2014 04:12:43 +1100 |
| Subject | Re: extract stream title from the output of mplayer |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | Python mailing list <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.8255.1395162773.18130.python-list@python.org> (permalink) |
| Lines | 24 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1395162773 news.xs4all.nl 2851 [2001:888:2000:d::a6]:47974 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:68511 |
Show key headers only | View raw
On Wed, Mar 19, 2014 at 4:03 AM, Jabba Laci <jabba.laci@gmail.com> wrote: > I have a simple command-line radio player and I want to extract song > titles from the output of mplayer. > > ICY Info: StreamTitle='Alexander 'Taxim' Nev - Unsound minds feat. > SAM';StreamUrl='http://www.SLAYRadio.org/'; > > At the end it shows a progress indicator, thus the output is streamed. > The problem is I can't get this output in a string. My idea is to > launch mplayer with a timeout of 2 seconds for instance, get the > produced output and find the line that starts with "ICY Info". But > when I kill the process after the timeout, I don't know how to fetch > the output produced so far. My first recommendation would be to see what you can get directly, rather than calling on mplayer. But otherwise, what you want to do is redirect the output somewhere. Are you using the Python subprocess module to do this? You haven't shown any code, but since you posted this to python-list I'm guessing that you probably are talking about Python. (Or s/guess/hop/ if you prefer!) There are many ways this could be done; what have you tried, what partly worked, what did something unexpected? ChrisA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: extract stream title from the output of mplayer Chris Angelico <rosuav@gmail.com> - 2014-03-19 04:12 +1100
csiph-web