Re: up to 8



Jan Panteltje wrote:
On a sunny day (Tue, 10 Feb 2009 23:52:47 +0000) it happened Dirk Bruere at
NeoPax <dirk.bruere@xxxxxxxxx> wrote in <6veiafFjmr7vU1@xxxxxxxxxxxxxxxxxx>:

Jan Panteltje wrote:
On a sunny day (Tue, 10 Feb 2009 23:03:32 +0000) it happened Dirk Bruere at
NeoPax <dirk.bruere@xxxxxxxxx> wrote in <6vefdjFjobh2U5@xxxxxxxxxxxxxxxxxx>:

And realtime multistream video compression for streaming over the Net (something I'm working on now).
What bitrate, H264? What size format, how many fps? How many channels?
H264
It's all dictated by domestic upload limits ie 400kb/s

You may perhaps be interested, if you use Linux, in what I do here:

This script should be started first on the receiving side, it listens on port 1234:

# listen-ts-c
while [ 1 ]
do
echo "Hold ctrl C down to abort." netcat -l -p 1234 | mplayer -fs -vop pp=0x20000 -monitoraspect 1440:900 -cache 1000 -
done
exit 1


This will take an AVI movie, and send it in H264 format at about 340 kbps to IP_ADDRESS on port 1234:

You can make ffmpeg read from file too, almost any format:

#send H264 to an IP address port 1234
ffmpeg -f avi -i Buenos-Aires1-2001.avi \
-f avi \
-vcodec h264 -r 2 -b 220 -g 300 -bf 2 \
-acodec mp2 -ab 64 -s 352x288 \
-y /dev/stdout | \
netcat IP_ADDRESS 1234


Wow, I just tried this, and it works!


You can use UDP protocol by simply adding the '-u' command line option to netcat on both sides.

The format is transport stream, .ts

Now you can send multiple programs to multiple ports, for example the second program to port 1235.

I dunno how to exactly put more then one program in the transport stream, but that should be possible.
Maybe videolan-client has the routines for that.


If your source is not an .AVI, but in some other format, then change the option in ffmpeg that says:
ffmpeg -f avi -i Buenos-Aires1-2001.avi to for example for mpeg2: ffmpeg -f mpegvideo -i some_movie.mpg

Typing:
ffmpeg -formats
shows the zillions of options.

As they say sometimes:
'I hope this helps'

And, you can have ffmpeg read from stdin too, I use that to pipe yuv format from for example a webcam,
or basically from any mjpeg tools compatible utility.
ffmpeg -f yuv4mpegpipe -i - \

Thanks! I've been looking at ffmpeg as the obvious (free) choice for transcoding.

--
Dirk

http://www.transcendence.me.uk/ - Transcendence UK
http://www.theconsensus.org/ - A UK political party
http://www.onetribe.me.uk/wordpress/?cat=5 - Our podcasts on weird stuff
.



Relevant Pages

  • Re: Convert .OGG to .MPEG or .SWF
    ... Avi is a *container*, so you can put into it many different media ... but not necessarily all (in this rgards the Ogg file format ... (have a look at ffmpeg -formats). ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: ffmpegx What am I doing wrongly?
    ... In the EyeTV Archive the file format is .eyetv. ... to be converting to 'dvd ffmpeg', which I hope is the right format. ...
    (uk.comp.sys.mac)
  • Re: ffmpegx What am I doing wrongly?
    ... In the EyeTV Archive the file format is .eyetv. ... to be converting to 'dvd ffmpeg', which I hope is the right format. ...
    (uk.comp.sys.mac)
  • Re: up to 8
    ... This will take an AVI movie, and send it in H264 format at about 340 kbps to IP_ADDRESS on port 1234: ... If your source is not an .AVI, but in some other format, then change the option in ffmpeg that says: ...
    (sci.electronics.design)
  • Re: Video conversion
    ... bunch of Betamax tapes. ... files that can be used on a computer and to DVD format. ... Ffmpeg is an excellent tool and I use it myself. ... FFmpeg has been part of the MPlayer project ...
    (alt.os.linux)