Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #68510
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <jabba.laci@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.011 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'example:': 0.03; 'output': 0.05; 'string.': 0.05; 'socket': 0.07; 'command-line': 0.16; 'fetch': 0.16; 'timeout': 0.16; 'url:8000': 0.16; 'thanks,': 0.17; 'starts': 0.20; 'form:': 0.24; 'instance,': 0.24; 'player': 0.26; 'idea': 0.28; '(c)': 0.29; 'thus': 0.29; 'message- id:@mail.gmail.com': 0.30; 'extract': 0.31; 'produces': 0.31; 'file': 0.32; 'url:non-standard http port': 0.33; 'subject:the': 0.34; 'subject:from': 0.34; 'could': 0.34; 'problem': 0.35; "can't": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'shows': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'seconds': 0.37; 'to:addr :python-list': 0.38; 'launch': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'radio': 0.60; 'simple': 0.61; 'such': 0.63; 'song': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=q3ZoZlpEJItKfeG6Ph3ert5tdYP7OhG61y/jFDMzFpU=; b=wAmZhcZsN1Qp9nCYXfH50uc27Gl1O3Or+7/p/u7cHVPPKC3a3V23MQQtFFtOTYCNSB 7fhBpbouLvfhsD0y5lqTiCAPhCMsJ5E1yFwMaKpkx+J15m5PkYS/gR4+DR2XY9ruDw+J 2BsKMxh5I15KwSC1b/IZQwlMEvWY7RmKTs6t7wAI8XkUJSjL6NmzQ6lFICXeAoVNtUk3 778kkUQSi1s/uj/quig2qhVbFwW6emSF38XmhVd+GMU9LGYS3IRzJu5k/0biTSUVRv/D 9iyd/PK/1CQcbArGEApPpDQrxfQKlKdo61vgk65chefZWeJzAEZ46aQ5pon7d/7l0jO9 rsGg== |
| X-Received | by 10.182.29.98 with SMTP id j2mr1088506obh.30.1395162226968; Tue, 18 Mar 2014 10:03:46 -0700 (PDT) |
| MIME-Version | 1.0 |
| From | Jabba Laci <jabba.laci@gmail.com> |
| Date | Tue, 18 Mar 2014 18:03:26 +0100 |
| Subject | extract stream title from the output of mplayer |
| To | Python mailing list <python-list@python.org> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| 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.8254.1395162230.18130.python-list@python.org> (permalink) |
| Lines | 29 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1395162231 news.xs4all.nl 2919 [2001:888:2000:d::a6]:42483 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:68510 |
Show key headers only | View raw
Hi, I have a simple command-line radio player and I want to extract song titles from the output of mplayer. Example: $ mplayer http://relay2.slayradio.org:8000/ It produces a streamed output of this form: MPlayer2 UNKNOWN (C) 2000-2012 MPlayer Team mplayer: could not connect to socket mplayer: No such file or directory ... 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. Thanks, Laszlo
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
extract stream title from the output of mplayer Jabba Laci <jabba.laci@gmail.com> - 2014-03-18 18:03 +0100
csiph-web