Streaming RX portsdown
Forum rules
This forum is run by the BATC (British Amateur Television Club), it is service made freely available to all interested parties, please do not abuse this privilege.
Thank you
This forum is run by the BATC (British Amateur Television Club), it is service made freely available to all interested parties, please do not abuse this privilege.
Thank you
Streaming RX portsdown
Hi,
I programmed streaming with the following code:
ffmpeg -f v4l2 -video_size "640x480" -i /dev/video0 -f alsa -i pulse \
-acodec libmp3lame -ac 1 -ab 48k -ar 22050 \
-vcodec libx264 -preset veryfast -b:v 256k -minrate 256k -maxrate 512k -bufsize 320k -s 640x480 \
-f flv "rtmp://rtmp.batc.org.uk/live/f5zbc-xxxxxx"
Streaming is clearly visible on the internet, but no video display on the portsdown.
He stuck to: "Valid Stream Detected"
Do you have an idea for my problem?
Thank you.
Stephane
I programmed streaming with the following code:
ffmpeg -f v4l2 -video_size "640x480" -i /dev/video0 -f alsa -i pulse \
-acodec libmp3lame -ac 1 -ab 48k -ar 22050 \
-vcodec libx264 -preset veryfast -b:v 256k -minrate 256k -maxrate 512k -bufsize 320k -s 640x480 \
-f flv "rtmp://rtmp.batc.org.uk/live/f5zbc-xxxxxx"
Streaming is clearly visible on the internet, but no video display on the portsdown.
He stuck to: "Valid Stream Detected"
Do you have an idea for my problem?
Thank you.
Stephane
Re: Streaming RX portsdown
Hi Stephane
I tried looking, but your stream was not there when I got back from /P operation today. I do not know what Linux version and what hardware you are using, but try the following changes:
ffmpeg -f v4l2 -video_size "640x480" -i /dev/video0 -f alsa -i pulse \
-acodec libmp3lame -ac 1 -ab 48k -ar 22050 \
-framerate 25 -vcodec libx264 -preset veryfast -b:v 256k -minrate 256k -maxrate 512k -bufsize 320k -s 640x480 \
-g 25 -f flv "rtmp://rtmp.batc.org.uk/live/f5zbc-xxxxxx"
Portsdown streamer uses:
h264omx is hardware encoding.
Hope that helps
Dave
I tried looking, but your stream was not there when I got back from /P operation today. I do not know what Linux version and what hardware you are using, but try the following changes:
ffmpeg -f v4l2 -video_size "640x480" -i /dev/video0 -f alsa -i pulse \
-acodec libmp3lame -ac 1 -ab 48k -ar 22050 \
-framerate 25 -vcodec libx264 -preset veryfast -b:v 256k -minrate 256k -maxrate 512k -bufsize 320k -s 640x480 \
-g 25 -f flv "rtmp://rtmp.batc.org.uk/live/f5zbc-xxxxxx"
Portsdown streamer uses:
Code: Select all
$PATHRPI"/ffmpeg" -loglevel $MODE_DEBUG -thread_queue_size 2048\
-f v4l2 -video_size "$VIDEO_WIDTH"x"$VIDEO_HEIGHT" \
-i $VID_USB \
-f alsa -thread_queue_size 2048 -ac $AUDIO_CHANNELS -ar $AUDIO_SAMPLE \
-i hw:$AUDIO_CARD_NUMBER,0 \
-framerate 25 -c:v h264_omx -b:v 512k \
-ar 22050 -ac $AUDIO_CHANNELS -ab 64k \
-vf "$CAPTION""$SCALE"yadif=0:1:0 -g 25 \
-f flv $STREAM_URL/$STREAM_KEY &
Hope that helps
Dave
Re: Streaming RX portsdown
HI Dave,
Thanks for your help.
I tried the changes, but still no video on the raspberry.
I use a PC with ubuntu18.04 and an easycap for video input.
Thank you.
Stephane
Thanks for your help.
I tried the changes, but still no video on the raspberry.
I use a PC with ubuntu18.04 and an easycap for video input.
Thank you.
Stephane
Re: Streaming RX portsdown
Stephane
I think that the Portsdown player (actually omxplayer) is unhappy about your stream parameters. Here is the info on a stream that works:
and here is the info from the f5zbc stream:
I have tried to make it work in omxplayer by changing the player parameters, but have not had any success.
Please could you try:
Dave
I think that the Portsdown player (actually omxplayer) is unhappy about your stream parameters. Here is the info on a stream that works:
Code: Select all
pi@raspberrypi:~ $ omxplayer --timeout 2 -I rtmp://batc.org.uk/live/gb3zz
[flv @ 0x1dffa0] audio stream discovered after head already parsed
[flv @ 0x1dffa0] video stream discovered after head already parsed
Input #0, flv, from 'rtmp://batc.org.uk/live/gb3zz':
Metadata:
Server : NGINX RTMP (github.com/arut/nginx-rtmp-module)
displayWidth : 720
displayHeight : 576
fps : 25
profile :
level :
Duration: 00:00:00.00, start: 42147.110000, bitrate: N/A
Stream #0:0: Audio: mp3, 22050 Hz, stereo, s16p, 64 kb/s
Stream #0:1: Video: h264 (High), yuv420p(progressive), 720x576, 25 fps, 25 tbr, 1k tbn
Video codec omx-h264 width 720 height 576 profile 100 fps 25.000000
Audio codec mp3 channels 2 samplerate 22050 bitspersample 16
Subtitle count: 0, state: off, index: 1, delay: 0
V:PortSettingsChanged: 720x576@25.00 interlace:0 deinterlace:0 anaglyph:0 par:0.94 display:0 layer:0 alpha:255 aspectMode:0
have a nice day ;)
Code: Select all
pi@raspberrypi:~ $ omxplayer --timeout 2 -I rtmp://batc.org.uk/live/f5zbc
[flv @ 0x1820fa0] audio stream discovered after head already parsed
[flv @ 0x1820fa0] video stream discovered after head already parsed
Input #0, flv, from 'rtmp://batc.org.uk/live/f5zbc':
Metadata:
Server : NGINX RTMP (github.com/arut/nginx-rtmp-module)
displayWidth : 720
displayHeight : 480
fps : 29
profile :
level :
Duration: 00:00:00.00, start: 25280.503000, bitrate: N/A
Stream #0:0: Audio: mp3, 22050 Hz, mono, s16p, 48 kb/s
Stream #0:1: Video: h264 (High 4:2:2), yuv422p(progressive), 720x480, 30.30 fps, 29.97 tbr, 1k tbn, 59.94 tbc
Video codec omx-h264 width 720 height 480 profile 122 fps 29.970030
Audio codec mp3 channels 1 samplerate 22050 bitspersample 16
Subtitle count: 0, state: off, index: 1, delay: 0
have a nice day ;)
Please could you try:
- Forcing the video coding to h264 (High), yuv420p(progressive)
- Forcing 25 fps
- Forcing Display Height to 576
Dave
Re: Streaming RX portsdown
Hi Dave,
Thanks for your help.
With the modifications it works!
Thank you.
Stephane.
Thanks for your help.
With the modifications it works!
Thank you.
Stephane.
Re: Streaming RX portsdown
Stephane
Please could you post here a copy of your working ffmpeg code? So that the next person can do it easily?
Thanks
Dave, G8GKQ
Please could you post here a copy of your working ffmpeg code? So that the next person can do it easily?
Thanks
Dave, G8GKQ
Re: Streaming RX portsdown
The problem is with the "yuv422p".
I left the resolution as the original video.
This code can probably be improved.
ffmpeg -f v4l2 -video_size "720x480" -r 25 -i /dev/video0 -f alsa -i pulse \
-acodec libmp3lame -ac 1 -ab 48k -ar 22050 \
-vcodec libx264 -preset veryfast -b:v 256k -minrate 256k -maxrate 512k -bufsize 320k -s 720x480 \
-vf format=yuv420p \
-f flv "rtmp://rtmp.batc.org.uk/live/f5zbc-xxxxxx"
Thanks again Dave.
Stephane.
I left the resolution as the original video.
This code can probably be improved.
ffmpeg -f v4l2 -video_size "720x480" -r 25 -i /dev/video0 -f alsa -i pulse \
-acodec libmp3lame -ac 1 -ab 48k -ar 22050 \
-vcodec libx264 -preset veryfast -b:v 256k -minrate 256k -maxrate 512k -bufsize 320k -s 720x480 \
-vf format=yuv420p \
-f flv "rtmp://rtmp.batc.org.uk/live/f5zbc-xxxxxx"
Thanks again Dave.
Stephane.
Re: Streaming RX portsdown
Thanks Stephane - good to know. Dave