Bug#872361: mpg123 misparses IPv6 address + port in http_proxy

2017-09-03 Thread Ivan Shmakov
> Thomas Orgis  writes:

 > I prepared fixes for both bug 872362 and 872361 for an upcoming
 > mpg123 version 1.25.7.  A preliminary release tarball is available
 > via

 > https://mpg123.org/test/mpg123-1.25.7.tar.bz2

[…]

 > Ivan, can you test your two issues with the preliminary release and
 > give feedback before I make it official?

The IPv6 http_proxy= handling seems to be the other way around
now; for instance:

$ http_proxy=http://ip6-localhost:9993/ \
  LD_LIBRARY_PATH=src/libout123/.libs ./src/mpg123 \
  -- http://stream.chipbit.net:8000/autodj.m3u 
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.25.7; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
HTTP request failed: 404 Not Found
main: [src/mpg123.c:686] error: Access to http resource 
http://stream.chipbit.net:8000/autodj.m3u failed.
$ http_proxy=http://\[::1\]:9993/ \
  LD_LIBRARY_PATH=src/libout123/.libs ./src/mpg123 \
  -- http://stream.chipbit.net:8000/autodj.m3u 
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.25.7; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes

Directory: http://stream.chipbit.net:8000/

Terminal control enabled, press 'h' for listing of keys and functions.

Playing MPEG stream 1 of 1: autodj.m3u ...
ICY-NAME: ChipBit
ICY-URL: http://chipbit.net

MPEG 1.0 L III cbr128 44100 j-s

ICY-META: StreamTitle='General Offensive, Mrsonic699 - Insert Cartridge 
[Prelude]';
...

(Note that there's also an HTTP server on TCP port 80, which is
not configured as a proxy.)

-- 
FSF associate member #7257  58F8 0F47 53F5 2EB2 F6A5  8916 3013 B6A0 230E 334A

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#872362: mpg123 disables cursor unconditionally on ttys

2017-08-16 Thread Ivan Shmakov
Package:  mpg123
Version:  1.23.8-1+b1
Severity: wishlist

After upgrading to the version in Stretch, mpg123(1) appears to
make the terminal cursor invisible by issuing a ‘civis’ (as in:
$ tput civis) control sequence to a tty, which goes against my
preferences.

Moreover, mpg123(1) does not seem to consult Terminfo for the
terminal-specific sequence, probably using a hardcoded one
instead – which prevents an obvious workaround from working:

$ TERM=dumb mpg123 -- audio.mp3 
(Cursor becomes invisible even though Terminfo lists no civis
sequence for TERM=dumb, per $ infocmp -- dumb.)

The --no-control option has no effect on this behavior, either.

A workaround that does work is to pipe mpg123(1) standard output
and error devices via cat(1), like:

$ mpg123 -- audio.mp3 2>&1 | cat 

-- 
FSF associate member #7257  58F8 0F47 53F5 2EB2 F6A5  8916 3013 B6A0 230E 334A

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#872361: mpg123 misparses IPv6 address + port in http_proxy

2017-08-16 Thread Ivan Shmakov
Package:  mpg123
Version:  1.23.8-1+b1

It appears that mpg123(1) fails to notice the :PORT suffix when
parsing an http_proxy value that contains an IPv6 address.

Consider, e. g.:

$ http_proxy=http://\[::1\]:8080/ \
  strace -o "$(mktemp -- /tmp/strace.)" -- \
  mpg123 --test -- http://stream.chipbit.net:8000/autodj.m3u 
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.23.8; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
HTTP request failed: 404 Not Found
main: [src/mpg123.c:709] error: Access to http resource 
http://stream.chipbit.net:8000/autodj.m3u failed.
$ 

The strace(1) output reveals that mpg123(1) tries to connect to
the default HTTP port (80), not the one specified (8080):

connect(3, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, "::1", 
_addr), sin6_flowinfo=htonl(0), sin6_scope_id=0}, 28) = 0

Also to note is that using an (IPv6-only) name (as shown below)
in place of the IPv6 address does not cause the issue.

$ http_proxy=http://ip6-localhost:8080/ \
  mpg123 --test -- http://stream.chipbit.net:8000/autodj.m3u 

-- 
FSF associate member #7257  58F8 0F47 53F5 2EB2 F6A5  8916 3013 B6A0 230E 334A

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#699831: vlc(1) produces --help with ECMA-48 (ANSI) escapes, even if TERM=dumb

2013-07-07 Thread Ivan Shmakov
 Rémi Denis-Courmont r...@remlab.net writes:

[…]

  VLC checks whether the standard output is a terminal.  I find it
  pretty damn idiotic for emacs to emulate a terminal but, not quite.

… Could you please then point me to, say, a Braille terminal
with support for colors?

  It might as well use a pipe or a local socket pair then.

Terminals have to do more with job control and basic (kernel’s)
line editing functions, rather than ECMA-48 (AKA “ANSI”)
processing or, say, pseudographics support.  (Be sure to check
the POSIX definition of the terminal device interface [1].)

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap11.html

  Unless someone can point to a simple function in libc to check
  whether ANSI color or ANSI control codes are supported, I am not
  going to fix this upstream.  I cannot find any standard and simple
  way to hit termcap or terminfo for that purpose.

Frankly, I don’t want to insist on this bug being fixed.

However, I believe it should be left open (even if wontfix), at
least so that the workaround below remains visible to the users.

  Note that you can turn off colors with:

  # vlc -H --nocolor or # vlc -H| cat

TIA.

-- 
FSF associate member #7257

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#699832: vlc-nox: document VLC_PLUGIN_PATH environment variable

2013-02-10 Thread Ivan Shmakov
 Rémi Denis-Courmont r...@remlab.net writes:

[…]

  retitle 699832 vlc-nox: document VLC_PLUGIN_PATH environment variable
  severity 699832 minor
  tags 699832 = upstream
  thanks

JFTR: while the presence of a simple workaround indeed warrants
lowering the severity of this issue, I believe that the problem
being described shouldn't arise at all.

Hence, either the Debian Live scripts should somehow set this
variable by default, or the “relocation” logic is indeed patched
out of the Debian vlc-nox package, for the sake of better Aufs
(and thus Debian Live) compatibility.

(To note is that vlc-nox upgrades from within the Debian Live
environment seem much more likely than attempts to run the
binaries provided by this Debian package off their usual
filesystem location.)

-- 
FSF associate member #7257

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#699832: vlc lib directory is inferred from /proc/*/maps, with no (documented?) way to override

2013-02-07 Thread Ivan Shmakov
 Rémi Denis-Courmont r...@remlab.net writes:
 Le mardi 5 février 2013 19:44:17, Ivan Shmakov a écrit :

[…]

  Obviously, there should be a way for the user to override the ‘lib’
  directory location inferred from the ‘maps’ file contents.
  (Ideally, such a feature is to be activated automagically when VLC
  is used on a Debian Live system.)

  You can override/extend the paths that VLC searches for plugins using
  the VLC_PLUGIN_PATH environment variable.

ACK, thanks!  I've just checked it, and the issue goes away with
an explicit VLC_PLUGIN_PATH=/usr/lib/vlc/plugins.

Shouldn't such variables be prominently documented in either the
vlc(1) (cvlc(1)) manual page, or in the --help text?

  Note that adding plugins while running is not supported (they will be
  ignored).

  If that's not enough, I don't really see any alternative to patching
  VLC in Debian.

It's my understanding that using /usr/lib/vlc/plugins as the
default plugins location is a sensible behavior for the Debian
package.  (I don't know if it makes sense to allow for such an
“autodetection” to be activated explicitly by the user.)

  Union FS is a hack

… Even if initially derived from Union FS, Aufs is a separate
project for quite some years now.

(And it's an exceptionally usefull hack, BTW.)

  and TBH, I have no plan to support this in upstream VLC especially
  not unless it gets accepted in the upstream Linux kernel.

-- 
FSF associate member #7257

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#699831: vlc(1) produces --help with ANSI escapes, even if TERM=dumb

2013-02-05 Thread Ivan Shmakov
Package: vlc-nox
Version: 2.0.3-4

Even with TERM set to ‘dumb’, vlc(1) and cvlc(1) still try to
produce a colorful --help output (presumably using some
hardwired escape sequences) on a TTY.

This is particularly annoying when running from an
“application-embedded” Shell (such as Emacs' M-x shell, or
M-! ⟨command⟩ ), which typically employ a pseudo terminal.

Consider, e. g. (with ESC's replaced with ^['s):

$ echo $TERM 
dumb
$ infocmp 
#   Reconstructed via infocmp from file: /lib/terminfo/d/dumb
dumb|80-column dumb tty,
am,
cols#80,
bel=^G, cr=^M, cud1=^J, ind=^J,
$ cvlc --help 
VLC media player 2.0.3 Twoflower (revision 2.0.2-93-g77aa89e)
Usage: vlc [options] [stream] ...
…
^[[0;1mNo matching module found. Use --list or --list-verbose to list available 
modules.^[[0m
^[[32;1m
 Audio
^[[0m^[[0;1m  --audio, --no-audio^[[0m^[[34;1mEnable audio (default 
enabled)
$ 

Naturally, such output should always respect terminfo(5) (or
termcap(5)) settings, and no attempt should be made to output
any “fancy” escape sequences that aren't mentioned there.

-- 
FSF associate member #7257

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#699832: vlc lib directory is inferred from /proc/*/maps, with no (documented?) way to override

2013-02-05 Thread Ivan Shmakov
Package: vlc-nox
Version: 2.0.3-4

In order to allow for “relocation”, vlc(1) (cvlc(1)) reads the
/proc/${PID}/maps file to infer the ‘lib’ directory location.

This fails, however, for Debian Live systems, as there ‘maps’
will point to somewhere on the bottom layer of the Aufs stack
(as used for the root FS), typically mounted to
/lib/live/mount/medium, and not to /usr/lib/vlc.

Therefore, should any additional VLC plugins be installed during
such a system's uptime, they won't be available to VLC.  Worse
still, an attempt to perform an upgrade of the VLC packages may
leave VLC in an inconsistent state, with an upgraded binary
trying to access the plugins belonging to the version the Debian
Live image in question was initially made.  (My guess is that
the use of the “persistence” Debian Live feature may complicate
the things even further.)

Obviously, there should be a way for the user to override the
‘lib’ directory location inferred from the ‘maps’ file contents.
(Ideally, such a feature is to be activated automagically when
VLC is used on a Debian Live system.)

-- 
FSF associate member #7257

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#687227: crtmpserver fails to relay a live stream

2012-09-10 Thread Ivan Shmakov
Package: crtmpserver
Version: 1.0~dfsg-3

I'm loosely following an example in [1], trying to set up
crtmpserver to relay a live stream.

The stream is fed via avconv(1), like:

$ avconv \
  -f x11grab -s cif -r 5 -i :0 \
  -f flv -metadata streamName=livestream tcp://127.0.0.1:/ 

Which is apparently accepted by crtmpserver.

However, when I try to use VLC to retrieve this stream, the
latter fails:

$ cvlc rtmp://127.0.0.1/live/livestream 
VLC media player 2.0.3 Twoflower (revision 2.0.2-93-g77aa89e)
[0x1e201f8] dummy interface: using the dummy interface module...
Using network protocols without global network initialization. Please use 
avformat_network_init(), this will become mandatory later.
HandShake: client signature does not match!
rtmp server sent error
RTMP_ReadPacket, failed to read RTMP packet header
[0x1e3ba38] access_avio access error: Failed to open 
rtmp://127.0.0.1/live/livestream: Operation not permitted
[0x202c5d8] main input error: open of `rtmp://127.0.0.1/live/livestream' failed
[0x202c5d8] main input error: Your input can't be opened
[0x202c5d8] main input error: VLC is unable to open the MRL 
'rtmp://127.0.0.1/live/livestream'. Check the log for details.

The relevant crtmpserver log fragments are MIME'd.  (Somehow,
I'd expect that TryLinkToLiveStream to be mentioned there just
as well, but only TryLinkToFileStream actually shows up.)

Any suggestions?

TIA.

[1] 
http://howtoforge.com/streaming-your-desktop-with-audio-and-webcam-overlay-in-a-browser-using-ffmpeg-crtmpserver-and-flowplayer

-- 
FSF associate member #7257  http://sfd.am-1.org/
1347330779:3:/build/crtmpserver-cg4puE/crtmpserver-1.0~dfsg/thelib/src/netio/epoll/tcpacceptor.cpp:154:Accept:Client
 connected: 127.0.0.1:50850 - 0.0.0.0:
1347330779:6:/build/crtmpserver-cg4puE/crtmpserver-1.0~dfsg/thelib/src/protocols/liveflv/inboundliveflvprotocol.cpp:46:Initialize:parameters:
MAP name= isArray=false
STR name=ip0.0.0.0/STR
UINT16 name=port/UINT16
STR name=protocolinboundLiveFlv/STR
STR name=sslCert/STR
STR name=sslKey/STR
BOOL name=waitForMetadatatrue/BOOL
/MAP
1347330779:6:/build/crtmpserver-cg4puE/crtmpserver-1.0~dfsg/thelib/src/protocols/liveflv/inboundliveflvprotocol.cpp:51:Initialize:_waitForMetadata:
 1
1347330779:4:/build/crtmpserver-cg4puE/crtmpserver-1.0~dfsg/thelib/src/netio/epoll/iohandlermanager.cpp:100:RegisterIOHandler:Handlers
 count changed: 6-7 IOHT_TCP_CARRIER
1347330779:6:/build/crtmpserver-cg4puE/crtmpserver-1.0~dfsg/thelib/src/protocols/liveflv/baseliveflvappprotocolhandler.cpp:45:RegisterProtocol:protocol
 CTCP(10) - TCP(30) - [ILFL(31)] registered to app flvplayback
1347330780:3:/build/crtmpserver-cg4puE/crtmpserver-1.0~dfsg/thelib/src/application/baseclientapplication.cpp:227:SignalStreamRegistered:Stream
 INLFLV(10) with name `livestream` registered to application `flvplayback` from 
protocol ILFL(31)
1347330780:3:/build/crtmpserver-cg4puE/crtmpserver-1.0~dfsg/thelib/src/protocols/liveflv/inboundliveflvprotocol.cpp:184:SignalInputData:Stream
 metadata:
MAP name= isArray=true
MAP name=__index__value__0 isArray=true
DOUBLE name=duration0.000/DOUBLE
STR name=encoderLavf53.21.0/STR
DOUBLE name=filesize0.000/DOUBLE
DOUBLE name=framerate5.000/DOUBLE
DOUBLE name=height288.000/DOUBLE
STR name=streamNamelivestream/STR
DOUBLE name=videocodecid2.000/DOUBLE
DOUBLE name=videodatarate195.312/DOUBLE
DOUBLE name=width352.000/DOUBLE
/MAP
/MAP
1347330894:3:/build/crtmpserver-cg4puE/crtmpserver-1.0~dfsg/thelib/src/netio/epoll/tcpacceptor.cpp:154:Accept:Client
 connected: 127.0.0.1:39834 - 0.0.0.0:1935
1347330894:4:/build/crtmpserver-cg4puE/crtmpserver-1.0~dfsg/thelib/src/netio/epoll/iohandlermanager.cpp:100:RegisterIOHandler:Handlers
 count changed: 7-8 IOHT_TCP_CARRIER
1347330894:2:/build/crtmpserver-cg4puE/crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/inboundrtmpprotocol.cpp:123:ValidateClient:This
 version of player doesn't support validation
1347330894:6:/build/crtmpserver-cg4puE/crtmpserver-1.0~dfsg/applications/appselector/src/rtmpappprotocolhandler.cpp:83:ProcessInvokeConnect:Selected
 application: flvplayback (live)
1347330894:6:/build/crtmpserver-cg4puE/crtmpserver-1.0~dfsg/thelib/src/application/baseclientapplication.cpp:216:UnRegisterProtocol:Protocol
 CTCP(11) - TCP(34) - [IR(35)] unregistered from application: appselector
1347330894:2:/build/crtmpserver-cg4puE/crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp:507:ProcessUsrCtrl:User
 control message type: RM_USRCTRL_TYPE_STREAM_SET_BUFFER_LENGTH
1347330894:3:/build/crtmpserver-cg4puE/crtmpserver-1.0~dfsg/thelib/src/application/baseclientapplication.cpp:227:SignalStreamRegistered:Stream
 NR(13) with name `` registered to application `flvplayback` from protocol 
IR(35)