[FFmpeg-user] Raspivid with ffmpeg on both sources (youtube & rtsp)
Nicolas Winandy
nix042eb at hotmail.com
Tue Jun 20 10:19:07 EEST 2017
Good morning all,
Sorry,
I forgot to introduce myself yesterday evening.
I am Nicolas and I am from Belgium. I am a technician in electronics and I have been working for 8 years in R&D.
I have been interested in many different fields in electronics and programming and, for three years, in the nano-computer world. I made a few little project for myself (little nas, mobile speaker,...) on Raspberry Pi and Arduinos.
Now, I am trying to dig into a video encoder through a CSI camera connected on a raspberry pi.
Thanks in advance if you can guide me a little on the issue underneath.
Have a nice day !
________________________________
De : ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> de la part de Nicolas Winandy <nix042eb at hotmail.com>
Envoyé : lundi 19 juin 2017 22:17
À : ffmpeg-user at ffmpeg.org
Objet : [FFmpeg-user] Raspivid with ffmpeg on both sources (youtube & rtsp)
Good evening all,
I am now playing with raspivid on Raspbian and a raspberry pi equipped with a PinoIR camera module.
I am almost done with the setup and have found a pre-compiled version of FFmpeg 3.1.1 to experiment a streaming to a youtube live stream by means of the command:
raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<SESSION>
Is there any parameter I can use to also stream to a local machine (e.g. through a VLC client reading the stream) ?
I have achieved to do it in another bash with cvlc:
[code]cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}':demux=h264[/code]
but executing both bashes at the same time is not possible as the input camera is locked by the system.
So, I looked in the ffmpeg documentation and found an interesting thread on multiple outputs : https://trac.ffmpeg.org/wiki/Creating%20multiple%20outputs.
Creating multiple outputs – FFmpeg<https://trac.ffmpeg.org/wiki/Creating%20multiple%20outputs>
trac.ffmpeg.org
The following example command lines, that are usually written in one line, have been split into multiple lines, using the new-line delimiter character \ for more ...
Then, I have tried the piped processes and another ffmpeg call to the inital command:
raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<SESSION> | ffmpeg -f h264 -i - -vcodec copy -f rtsp -rtsp_transport tcp rtsp://localhost:8888/live.sdp
It appears to have a syntax error, and maybe it is not the best way of achieving this. Could you please put me on the right track ?
Thanks and have a nice night !
Nicolas
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
ffmpeg-user Info Page<http://ffmpeg.org/mailman/listinfo/ffmpeg-user>
ffmpeg.org
This list is for regular user questions like compilation troubles, command-line issues and similar. Please provide your ffmpeg command(s) and complete, uncut ...
To unsubscribe, visit link above, or email
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list