Comments (6)
Ran individual steps per documentation. Seems to be a bit more of a problem...
pi@raspberrypi:~/RaspyStream-main $ ./RaspyStreamMusic.sh
ffmpeg version 4.3.6-0+deb11u1+rpt5 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
configuration: --prefix=/usr --extra-version=0+deb11u1+rpt5 --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-mmal --enable-neon --enable-v4l2-request --enable-libudev --enable-epoxy --enable-sand --libdir=/usr/lib/aarch64-linux-gnu --arch=arm64 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
[0:19:02.410353185] [4763] INFO Camera camera_manager.cpp:297 libcamera v0.0.5+83-bde9b04f
[0:19:02.447133798] [4765] INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@1/imx708@1a to Unicam device /dev/media1 and ISP device /dev/media2
[0:19:02.447213820] [4765] INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
Mode selection:
SRGGB10_CSI2P 2304x1296 - Score: 3150
[0:19:02.450500307] [4763] INFO Camera camera.cpp:1033 configuring streams: (0) 1920x1080-YUV420 (1) 2304x1296-SBGGR10_CSI2P
[0:19:02.450998479] [4765] INFO RPI vc4.cpp:565 Sensor: /base/soc/i2c0mux/i2c@1/imx708@1a - Selected sensor format: 2304x1296-SBGGR10_1X10 - Selected unicam format: 2304x1296-pBAA
Input #0, h264, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc
[concat @ 0x55921394d0] Impossible to open 'Music/song1.wav'
Music/PlayList.txt: Invalid data found when processing input
pi@raspberrypi:~/RaspyStream-main $ ./RaspyStreamMic.sh
ffmpeg version 4.3.6-0+deb11u1+rpt5 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
configuration: --prefix=/usr --extra-version=0+deb11u1+rpt5 --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-mmal --enable-neon --enable-v4l2-request --enable-libudev --enable-epoxy --enable-sand --libdir=/usr/lib/aarch64-linux-gnu --arch=arm64 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
[0:19:19.549520624] [4776] INFO Camera camera_manager.cpp:297 libcamera v0.0.5+83-bde9b04f
[0:19:19.585904111] [4778] INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@1/imx708@1a to Unicam device /dev/media1 and ISP device /dev/media2
[0:19:19.585981578] [4778] INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
Mode selection:
SRGGB10_CSI2P 2304x1296 - Score: 3150
[0:19:19.588853307] [4776] INFO Camera camera.cpp:1033 configuring streams: (0) 1920x1080-YUV420 (1) 2304x1296-SBGGR10_CSI2P
[0:19:19.589337145] [4778] INFO RPI vc4.cpp:565 Sensor: /base/soc/i2c0mux/i2c@1/imx708@1a - Selected sensor format: 2304x1296-SBGGR10_1X10 - Selected unicam format: 2304x1296-pBAA
Input #0, h264, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc
[alsa @ 0x559cac2720] cannot open audio device hw:2,0 (No such file or directory)
hw:2,0: Input/output error
pi@raspberrypi:~/RaspyStream-main $ ./RaspyStreamMuted.sh
ffmpeg version 4.3.6-0+deb11u1+rpt5 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
configuration: --prefix=/usr --extra-version=0+deb11u1+rpt5 --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-mmal --enable-neon --enable-v4l2-request --enable-libudev --enable-epoxy --enable-sand --libdir=/usr/lib/aarch64-linux-gnu --arch=arm64 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, lavfi, from 'anullsrc':
Duration: N/A, start: 0.000000, bitrate: 705 kb/s
Stream #0:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
[0:19:33.838885288] [4789] INFO Camera camera_manager.cpp:297 libcamera v0.0.5+83-bde9b04f
[0:19:33.875090432] [4795] INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@1/imx708@1a to Unicam device /dev/media1 and ISP device /dev/media2
[0:19:33.875212808] [4795] INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
[0:19:33.876102017] [4789] INFO Camera camera.cpp:1033 configuring streams: (0) 1920x1080-YUV420
[0:19:33.876597559] [4795] INFO RPI vc4.cpp:565 Sensor: /base/soc/i2c0mux/i2c@1/imx708@1a - Selected sensor format: 2304x1296-SBGGR10_1X10 - Selected unicam format: 2304x1296-pBAA
Input #1, h264, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #1:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 30 fps, 30 tbr, 1200k tbn, 60 tbc
<Your URL>/<Your stream key>: No such file or directory
I've added my RTMP stream URL into the keys.sh file:
rtmp://172.22.20.81/**<stream key>**.stream
RTMP server is being hosted on something called Restreamer which is generating the RTMP URL. Restreamer will be used to pump the feed to youtube easier.
RaspyStreamLocal.sh output
GNU nano 5.4 RaspyStreamLocal.sh #!/bin/bash
# ==============================================================================
# Easy way to stream to twitch or other platforms
#
# @author Diego gonzalez ([email protected]) abyteofthat.com
# @version 23/01/2023
#
#
# This is an updated tool to stream with the new Libcamera-vid to a RTPM server
# like twitch or YouTube from your Raspberry, I use te camera module v3 that
# has many features like autofocus or like HDR, plus the great cuality sensor.
#
# With this set up you are able to stream in high cuality (1080p 30fps) from a
# device that can fit in your hand for less than 80$
#
#
#
# The setup i use is this:
# Hardware: Raspberry pi 4B, Camera Module 3.
# Software: Raspberry Pi OS Lite(64-bit), Kernel: 5.15, Debian: 11 (bullseye)
#
# Before this can work you need to install ffmpeg, tested on v4.3.5
#
# ==============================================================================
# Set width and height of output video
Width=1920
Height=1080
# Set bitrate (Twitch recommends 3500000)
Bitrate=3500000
#The ip addres of your MonaServer
ip=rtmp://172.22.20.81/**<streamkey>**.stream
# The preset for FFmpeg options fast, veryfast, ultrafast
Preset=veryfast
# HDR makes the brighthnes better ONLY FOR v3
HDR=1 # Active HDR
# HDR=0 # No HDR
libcamera-vid -n -t 0 --width $Width --height $Height --hdr $HDR --inline -b $Bitrate -o - | \
ffmpeg -re -f lavfi -i anullsrc -c:a aac -r 30 \
-i - -g 60 \
-strict experimental -vcodec copy -map 0:a -map 1:v -b:v $Bitrate -preset veryfast -f \
flv "${ip}/live"
# The code follows this steps:
# - Capture video from camera
# - Add audio
# - Add Video
# - Mix all and transcoded
# - Send to RTPM Server
# For this code i got a huge help from:
# otdated code but usefull https://gist.github.com/russfeld/0878b1f8eaf7409136b9125ce5e1458f
# the oficial raspberry code for livcamera https://www.raspberrypi.com/documentation/computers/camera_soft>
# Licence GNU General Public License v3.0, can be found at :
# https://github.com/diegozalez/RaspyStream/blob/8fde5dfd90aeabcab71c1258e13f7d69ebffc1f1/LICENSE
from raspystream.
I think the script can't find the file with the keys for troubleshooting you can just add the URL of your rtmp server here: flv "${ip}/live" where you can just place the IP address.
I think you might have another problem, the Raspberry sends the traffic to an rtmp server as you can see here in the instructurables the server must be listening before the raspberry can send traffic
you need to follow these steps https://datarhei.github.io/restreamer/docs/guides-ingest-rtmp.html as the server has to ingest the rtmp
from raspystream.
i have change a bit the code so it looks more simple changing /live to the variable inset of the command bellow
from raspystream.
Don't think I'm doing something right then. Deleted main.zip, and redownloaded everything from scratch. tried to run stream.sh and no joy. Ran the debug commands i.e. RaspyS...mic, music, and muted; still same issues highlighted above.
I think my issue is two fold... something to do with missing files as highlighted originally. Once getting that sorted, then I can try and focus on the Restreamer portion however, on that note, given how the script exits and says 'Screen is terminating', I think RaspyStream is failing before the Restreamer app can pickup the RTMP stream being sent.
Docs on Restreamer for RTMP - what you sent was the v1 of the program :P
from raspystream.
I've abandoned using Restreamer for the minute and still getting this issue with regards to the audio.
Followed the documentation to the letter. The only thing I haven't done is install winSCP but thats primarily because I just want to stream to twich directly... not to my PC using VLC.
from raspystream.
from raspystream.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raspystream.