Hi,
I have succeeded in streaming TV over rtmpd. My TV card has a v4l2 driver. The commandline I am using is as follows:
ffmpeg -f oss -i /dev/dsp1 -r 25 -f video4linux2 -i /dev/video0 -r 25 -vcodec libx264 -vpre default -vpre baseline -b 500000 -s 320x240 -strict experimental -g 25 -me_method zero -acodec aac -ab 96000 -ar 48000 -ac 2 -f mpegts udp://127.0.0.1:10000?pkt_size=1316
This works, but it seems that 320x240 is the maximum size my server can handle. If I use a bigger size, the whole thing becomes choppy. Does someone know some smarter parameters to speed things a bit up? It does not have to have maximum quality all the time.
I have tried h263 and mp3, but both did not work.
Has somebody any idea? (Except of getting a faster machine..)
Thanks&Regards,
Thorsten
Video may become choppy because of lost dts in MPEG-TS
I am not sure what you meant with "rtmp publish", but I am assuming
something like this:
ffmpeg -f oss -i /dev/dsp1 -r 25 -f video4linux2 -i /dev/video0 -b 2000000
-s 720x540 -f flv rtmp://127.0.0.1/flvplayback/tvstream
Indeed, this worked quite well. With basically full-size (720x540), my
system needed only about 50% CPU and the quality is ok.
The thing is that first rtmpd needs to be started and then the above
command.
I did not know about that possibility, but it's really not bad. Maybe only a
bit noisy, but this I might be able to reduce as well.
The stream can be played using "rtmp://<server-name>/flvplayback/tvstream".
It seems that the problem was the h264 codec. When I add
-vcodec libx264 -vpre default -vpre baseline
To the above, my CPU power is hardly enough to encode a 320x240 size.
Regards,
Thorsten
use rtmp publish.
You received this message because you are subscribed to "C++ RTMP Server"
mailing list.
To post to this group, send email to c-rtmp...@googlegroups.com
To unsubscribe from this group, send email to
c-rtmp-serve...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/c-rtmp-server?hl=en
I have checked this CABAC vs. CAVLC, but haven't found anything like that. I
wasn't aware that I am using a deblocking filter. I thought deblocking
filters were only for decoding...
How can I change it?
Regards,
Thorsten
-----Original Message-----
From: c-rtmp...@googlegroups.com [mailto:c-rtmp...@googlegroups.com]
On Behalf Of Simonr
Sent: Mittwoch, 1. Dezember 2010 11:48
To: C++ RTMP Server
Subject: [rtmpd:2176] Re: ffmpeg commandline to stream from V4L2 input to
rtmpd
Thorsten,
Regards,
Simon
You received this message because you are subscribed to "C++ RTMP Server"
FYI, I don’t stream directly from v4l2 to ffmpeg;
I use an intermediate 'pipe buffer' command named 'bfr'
http://www.glines.org/software/bfr.html
Using 'bfr' allows me to create a small video buffer that I can feed into
ffmpeg, and thus helps avoid issues
With mpeg packets from the tuner card being dropped by ffmpeg due to any
processing latency.
Here's what my ffmpeg command looks like:
bfr -b 15m /dev/video0 \
| ffmpeg -re -i - -threads 0 \
-deinterlace -r 30 -acodec libfaac -ar 44100 -ab 96k -vcodec libx264 \
-vpre faster -crf 29 -bufsize 1500k -maxrate 800k \
-f flv -metadata streamName='mp4:tvs' tcp://localhost:6666
This seems to work great for my application, and it keeps the stream at a
reasonable bitrate & quality.
The other advantage of this method is that it correctly sets up the
'streamName' variable so that I can name my streams and easily access a
given stream from my flash player frontend.
In this example, my stream url would be 'rtmp://<myserver>/live/mp4:tvs'
NOTE: I needed to hack the ffmpeg source code & rebuild it in order to get
the metadata option to work for custom metadata values. This can be somewhat
complicated, but it was worth the effort in my case.
BTW, Im also using this same 'flv wrapper' method to broadcast fm radio in
mp3 format.
Anyway, hope this helps...
cs
As far as I remember, that should be all it needs.
If it doesn’t work, let me know & I'll take another look at the source.
Cheers,
cs
-----Original Message-----
From: c-rtmp...@googlegroups.com [mailto:c-rtmp...@googlegroups.com]
On Behalf Of Mischa Spiegelmock
Sent: Sunday, December 05, 2010 10:24 PM
To: c-rtmp...@googlegroups.com
So, just disregard my 'patch' comment...
Have you already tried setting arbitrary metadata tags? It *should* already
work 'out of the box'....
(if for some reason it still isn’t working, then let me know and I can take
another look at the source).