Discussion:
[FFmpeg-user] How can I expose an rtsp stream using ffmpeg
Agniva De Sarker
2018-12-05 09:38:45 UTC
Permalink
I have a stream of images coming from an another application which I am
streaming to ffmpeg from a pipe. Now I want to expose this stream as an
rtsp stream encoded with .h264.

I can do the stream using something like this -
https://video.stackexchange.com/questions/12961/ffmpeg-input-from-images-stream-out-video

I see that using ffserver, I can create the rtsp stream. (
https://stackoverflow.com/questions/26999595/what-steps-are-needed-to-stream-rtsp-from-ffmpeg).
But ffserver seems to be discontinued. So what is the best option in this
scenario ?

In short, I have a stream of images, which I want to compress using h.264
and send off as an rtsp stream. Is it possible natively using ffmpeg ?

Thanks.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-re
Carl Eugen Hoyos
2018-12-05 12:14:04 UTC
Permalink
Post by Agniva De Sarker
I have a stream of images coming from an another application which I am
streaming to ffmpeg from a pipe. Now I want to expose this stream as an
rtsp stream encoded with .h264.
I can do the stream using something like this -
https://video.stackexchange.com/questions/12961/ffmpeg-input-from-images-stream-out-video
I see that using ffserver, I can create the rtsp stream. (
https://stackoverflow.com/questions/26999595/what-steps-are-needed-to-stream-rtsp-from-ffmpeg).
But ffserver seems to be discontinued. So what is the best option in this
scenario ?
In short, I have a stream of images, which I want to compress using h.264
and send off as an rtsp stream. Is it possible natively using ffmpeg ?
What did you try?

$ ffmpeg -i - -vcodec h264 rtsp://127.0.0.1

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ
Agniva De Sarker
2018-12-05 14:54:55 UTC
Permalink
I tried with a simple mp4 file.

ffmpeg -i timescape.mp4 -vcodec h264 rtsp://127.0.0.1
ffmpeg version git-2017-09-02-69e6877 Copyright (c) 2000-2017 the FFmpeg
developers
built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
configuration:
libavutil 55. 74.100 / 55. 74.100
libavcodec 57.104.101 / 57.104.101
libavformat 57. 81.100 / 57. 81.100
libavdevice 57. 8.100 / 57. 8.100
libavfilter 6.101.100 / 6.101.100
libswscale 4. 7.103 / 4. 7.103
libswresample 2. 8.100 / 2. 8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'timescape.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2011-12-04T22:18:54.000000Z
Duration: 00:02:18.55, start: 0.000000, bitrate: 2674 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 2515 kb/s, 23.98 fps, 23.98 tbr, 24k tbn,
47.95 tbc (default)
Metadata:
creation_time : 2011-12-04T22:18:54.000000Z
handler_name : GPAC ISO Video Handler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 157 kb/s (default)
Metadata:
creation_time : 2011-12-04T22:18:54.000000Z
handler_name : GPAC ISO Audio Handler
[NULL @ 0x3bf1880] Unable to find a suitable output format for 'rtsp://
127.0.0.1'
rtsp://127.0.0.1: Invalid argument
Post by Agniva De Sarker
Post by Agniva De Sarker
I have a stream of images coming from an another application which I am
streaming to ffmpeg from a pipe. Now I want to expose this stream as an
rtsp stream encoded with .h264.
I can do the stream using something like this -
https://video.stackexchange.com/questions/12961/ffmpeg-input-from-images-stream-out-video
Post by Agniva De Sarker
I see that using ffserver, I can create the rtsp stream. (
https://stackoverflow.com/questions/26999595/what-steps-are-needed-to-stream-rtsp-from-ffmpeg
).
Post by Agniva De Sarker
But ffserver seems to be discontinued. So what is the best option in this
scenario ?
In short, I have a stream of images, which I want to compress using h.264
and send off as an rtsp stream. Is it possible natively using ffmpeg ?
What did you try?
$ ffmpeg -i - -vcodec h264 rtsp://127.0.0.1
Carl Eugen
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject "unsubscr
Agniva De Sarker
2018-12-10 14:38:26 UTC
Permalink
Thanks. But I was wondering what is the idiomatic way to expose an rtsp
stream using ffmpeg. Does that mean we cannot do rtsp streaming using pure
ffmpeg at all ?

-Agniva
Hi Agniva,
To use rtsp stream inside ffmpeg you need to run ffserver which is removed
in latest version, but here I have created separate repo which can be used
as rtsp stream,
https://github.com/harshil1991/ffserver
and just you need to pass your AVpacket in place of av read frame function.
Thanks
Harshil
Sent from my iPhone
On 10-Dec-2018, at 2:41 PM, Agniva De Sarker <
Wanted to follow up on this again. Any help will be appreciated. Thanks.
On Wed, Dec 5, 2018 at 8:24 PM Agniva De Sarker <
Post by Agniva De Sarker
I tried with a simple mp4 file.
ffmpeg -i timescape.mp4 -vcodec h264 rtsp://127.0.0.1
ffmpeg version git-2017-09-02-69e6877 Copyright (c) 2000-2017 the FFmpeg
developers
built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
libavutil 55. 74.100 / 55. 74.100
libavcodec 57.104.101 / 57.104.101
libavformat 57. 81.100 / 57. 81.100
libavdevice 57. 8.100 / 57. 8.100
libavfilter 6.101.100 / 6.101.100
libswscale 4. 7.103 / 4. 7.103
libswresample 2. 8.100 / 2. 8.100
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2011-12-04T22:18:54.000000Z
Duration: 00:02:18.55, start: 0.000000, bitrate: 2674 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 2515 kb/s, 23.98 fps, 23.98 tbr, 24k tbn,
47.95 tbc (default)
creation_time : 2011-12-04T22:18:54.000000Z
handler_name : GPAC ISO Video Handler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 157 kb/s (default)
creation_time : 2011-12-04T22:18:54.000000Z
handler_name : GPAC ISO Audio Handler
127.0.0.1'
rtsp://127.0.0.1: Invalid argument
2018-12-05 10:38 GMT+01:00, Agniva De Sarker <
Post by Agniva De Sarker
I have a stream of images coming from an another application which I
am
Post by Agniva De Sarker
Post by Agniva De Sarker
streaming to ffmpeg from a pipe. Now I want to expose this stream as
an
Post by Agniva De Sarker
Post by Agniva De Sarker
rtsp stream encoded with .h264.
I can do the stream using something like this -
https://video.stackexchange.com/questions/12961/ffmpeg-input-from-images-stream-out-video
Post by Agniva De Sarker
Post by Agniva De Sarker
I see that using ffserver, I can create the rtsp stream. (
https://stackoverflow.com/questions/26999595/what-steps-are-needed-to-stream-rtsp-from-ffmpeg
Post by Agniva De Sarker
).
Post by Agniva De Sarker
But ffserver seems to be discontinued. So what is the best option in
this
Post by Agniva De Sarker
scenario ?
In short, I have a stream of images, which I want to compress using
h.264
Post by Agniva De Sarker
and send off as an rtsp stream. Is it possible natively using ffmpeg ?
What did you try?
$ ffmpeg -i - -vcodec h264 rtsp://127.0.0.1
Carl Eugen
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpe
Harshil Makwana
2018-12-10 14:51:31 UTC
Permalink
Yes, we can not do rtsp stream using pure ffmpeg., we need server to stream
rtsp packet.

On Mon, Dec 10, 2018 at 8:08 PM Agniva De Sarker <
Post by Agniva De Sarker
Thanks. But I was wondering what is the idiomatic way to expose an rtsp
stream using ffmpeg. Does that mean we cannot do rtsp streaming using pure
ffmpeg at all ?
-Agniva
On Mon, 10 Dec 2018 at 17:55 Harshil Makwana <
Hi Agniva,
To use rtsp stream inside ffmpeg you need to run ffserver which is
removed
in latest version, but here I have created separate repo which can be
used
as rtsp stream,
https://github.com/harshil1991/ffserver
and just you need to pass your AVpacket in place of av read frame
function.
Thanks
Harshil
Sent from my iPhone
On 10-Dec-2018, at 2:41 PM, Agniva De Sarker <
Wanted to follow up on this again. Any help will be appreciated.
Thanks.
On Wed, Dec 5, 2018 at 8:24 PM Agniva De Sarker <
Post by Agniva De Sarker
I tried with a simple mp4 file.
ffmpeg -i timescape.mp4 -vcodec h264 rtsp://127.0.0.1
ffmpeg version git-2017-09-02-69e6877 Copyright (c) 2000-2017 the
FFmpeg
Post by Agniva De Sarker
developers
built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
libavutil 55. 74.100 / 55. 74.100
libavcodec 57.104.101 / 57.104.101
libavformat 57. 81.100 / 57. 81.100
libavdevice 57. 8.100 / 57. 8.100
libavfilter 6.101.100 / 6.101.100
libswscale 4. 7.103 / 4. 7.103
libswresample 2. 8.100 / 2. 8.100
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2011-12-04T22:18:54.000000Z
Duration: 00:02:18.55, start: 0.000000, bitrate: 2674 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 2515 kb/s, 23.98 fps, 23.98 tbr, 24k tbn,
47.95 tbc (default)
creation_time : 2011-12-04T22:18:54.000000Z
handler_name : GPAC ISO Video Handler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 157 kb/s (default)
creation_time : 2011-12-04T22:18:54.000000Z
handler_name : GPAC ISO Audio Handler
'rtsp://
Post by Agniva De Sarker
127.0.0.1'
rtsp://127.0.0.1: Invalid argument
2018-12-05 10:38 GMT+01:00, Agniva De Sarker <
Post by Agniva De Sarker
I have a stream of images coming from an another application which I
am
Post by Agniva De Sarker
Post by Agniva De Sarker
streaming to ffmpeg from a pipe. Now I want to expose this stream as
an
Post by Agniva De Sarker
Post by Agniva De Sarker
rtsp stream encoded with .h264.
I can do the stream using something like this -
https://video.stackexchange.com/questions/12961/ffmpeg-input-from-images-stream-out-video
Post by Agniva De Sarker
Post by Agniva De Sarker
I see that using ffserver, I can create the rtsp stream. (
https://stackoverflow.com/questions/26999595/what-steps-are-needed-to-stream-rtsp-from-ffmpeg
Post by Agniva De Sarker
).
Post by Agniva De Sarker
But ffserver seems to be discontinued. So what is the best option in
this
Post by Agniva De Sarker
scenario ?
In short, I have a stream of images, which I want to compress using
h.264
Post by Agniva De Sarker
and send off as an rtsp stream. Is it possible natively using
ffmpeg ?
Post by Agniva De Sarker
What did you try?
$ ffmpeg -i - -vcodec h264 rtsp://127.0.0.1
Carl Eugen
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
f

Loading...