ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Денис Черносов" <denis0.ru@gmail.com>
To: "ALT Linux Community general discussions" <community@lists.altlinux.org>
Subject: Re: [Comm] Трансляция видео по сети. Как лучше?
Date: Thu, 4 Dec 2008 17:07:52 +0400
Message-ID: <d77783290812040507m2061cd9amfdd65b41cb58c0e3@mail.gmail.com> (raw)
In-Reply-To: <20081204121927.GE26999@snowwhite.immo>

Настроил я запуск без создания pid-файла. Вот файл:

# cat /etc/init.d/vlcd
#!/bin/sh
# Init file for Video Lan Client (vlc) as server daemon
#
# chkconfig: 2345 56 24
# description: Video Lan Client (vlc) as server daemon
#
# processname: vlc
# pidfile: /var/run/vlcd/vlcd.pid

# source function library

. /etc/rc.d/init.d/functions

SourceIfNotEmpty /etc/sysconfig/svnserve

PIDFILE=/var/run/vlcd/vlcd.pid
LOCKFILE=/var/lock/subsys/vlcd
CHECKTIME=60

#хорошо бы вынести куда-нибудь в /etc/vlcd.conf
#-----------------------
PARAMS_IN="v4l:/dev/video:channel=1:size=720x576:adev=/dev/audio:audio=0"
PARAMS_OUT="--sout
\'#transcode{vcodec=mp4v,acodec=mpga,vb=1024,ab=192,samplerate=32000,venc=ffmpeg{keyint=80,hurry-up,vt=800000},deinterlace}:std{access=http,mux=ts,dst=:8800}\'"
PARAMS_OTHER="--ttl 12"
#-----------------------

PARAMS_DAEMON="-I dummy -d"
PARAMS=" $PARAMS_IN $PARAMS_OUT $PARAMS_OTHER $PARAMS_DAEMON"

# See how we were called.
case "$1" in
  start)
        # Start daemon.
        start_daemon --lockfile "$LOCKFILE" --user vlcd --expect-user
vlcd -- /usr/bin/vlc "$PARAMS" || failure
        ;;
  stop)
        # Stop daemon.
        echo -n "Shutting down vlcd: "
        rm -f $LOCKFILE
        stop_daemon --lockfile "$LOCKFILE" --expect-user vlcd  --
/usr/bin/vlc || failure
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  condrestart)
        if [ -e "$LOCKFILE" ]; then
        $0 restart
        fi
        ;;
  status)
        status --lockfile "$LOCKFILE" --expect-user vlcd  -- /usr/bin/vlc
        ;;
  *)
        echo "Usage: vlcd {start|stop|restart|condrestart|status}"
        exit 1
esac

exit 0



Пояснения:

PARAMS_IN="v4l:/dev/video:channel=1:size=720x576:adev=/dev/audio:audio=0"
для настройки входного потока.

PARAMS_OUT="--sout
\'#transcode{vcodec=mp4v,acodec=mpga,vb=1024,ab=192,samplerate=32000,venc=ffmpeg{keyint=80,hurry-up,vt=800000},deinterlace}:std{access=http,mux=ts,dst=:8800}\'"
настройка вещания. Хорошо бы положить несколько шаблонов на разные случаи жизни

PARAMS_OTHER="--ttl 12"
всякое разное

кроме этого добавлял юзера vlcd
(vlcd:x:115:422::/var/spool/vlcd:/dev/null) Почему-то обязательно
нужна домашняя папка(!).

Видео в сеть уходит и на локальной машинке смотрится.



Застопорился на получении звука с тюнера. У меня PCI gotview (чип
saa7134). Звук заводится в тюнер, а потом через проводок на Line-In
звуковой карты. В наушниках всё время слышно, а в плейер не приходит.
И соотв. не транслируется. Есть гуру в студии?

  reply	other threads:[~2008-12-04 13:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-04  7:07 Денис Черносов
2008-12-04  7:19   ` Денис Черносов
2008-12-04  7:53       ` Денис Черносов
2008-12-04  8:05         ` Motsyo Gennadi aka Drool
2008-12-04  8:35           ` Денис Черносов
2008-12-04 10:13 ` Pavlov Konstantin
2008-12-04 12:05   ` Денис Черносов
2008-12-04 12:19     ` Pavlov Konstantin
2008-12-04 13:07       ` Денис Черносов [this message]
2008-12-04 13:27         ` Pavlov Konstantin
2008-12-04 13:42           ` Денис Черносов
2008-12-04 13:46             ` Pavlov Konstantin
2008-12-05  6:09               ` Денис Черносов
2008-12-05 11:14                 ` Андрей Черепанов
2008-12-05 11:46                   ` Алексей Шенцев
2008-12-05 14:02                     ` Андрей Черепанов
2008-12-10  6:12                       ` Денис Черносов
2008-12-10  7:51                         ` Yury Aliaev
2008-12-05 11:55                 ` Pavlov Konstantin
2008-12-05  9:35             ` Yury Aliaev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d77783290812040507m2061cd9amfdd65b41cb58c0e3@mail.gmail.com \
    --to=denis0.ru@gmail.com \
    --cc=community@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git