Kaltura CE 12.4.0 | Bug Report

Hello,

The exec_pull and exec_push directives belong to the RTMP Nginx module:


The Nginx shipped with the kaltura-nginx package includes this module since the 12.4.0 release, which had Nginx version of 1.10.2-1.

If you are using an older version of the package then you will not have this module. What version do you have and what is the error you are getting?

As for your question:

Who would know if not me? I am the one doing it, after all:)

The full specs for all Kaltura CE are publicly available so you can see them here:
RPM spec file:


And specifically, this is the configure command:

deb rules:

@jess

I have updated to the lastest version of Kaltura and I have customized the configuration file to include links to stream a single live stream from the RTSP source as described. I must assume the syntax is fine as I get no errors when I start NGINX. The VODs play fine via Kaltura but I am not able to get playback of the configured Live Stream. Even after customizing the port so their is no conflict.

My searches on the web show that a few people have claim to have gotten NGINX to ingest the RTSP live feed but not really clear on how but the issue that most of them report is the same. Basically, the process dies when you configure multiple streams. Either processing memory issue. I am not sure as the notes were very vage.

Unless you know the proper Syntax to use to have the NIGNX ingest the individual live stream them be allowed to play the stream back via the Kaltura Player as shown in my sample then currently this version does not allow use of live streams in RTSP format.

@hiphopservers,

Our default configuration does not support ingesting RTSP streams nor did our documentation ever stated that we do, so I don’t see how your report can be considered a bug.
We DO support ingestion of live RTMP streams using the Nginx RTMP module and playback using HLS and DASH.
For that, there is some basic documentation here:

and a post I recently wrote here:


detailing the solution and configuration.

That said, I am willing to look into your configuration and try to help you with it, for that, the first step would be to include the full configuration blocks you’ve added and the steps you took when testing.

@jess

Shall I email these blocks to you or post them here without the IP, domain or other secure information? I will be providing a copy of my configuration file and full user stories so you can replicate my results. However, if you want to use my streams you will need to get sudo information and complete testing from my own host or provide IPs to your test host so I can authorize that IP to access the live streams from the source. The live streams are behind a secure firewall appliance. I will await your response.

Hi @hiphopservers,

Paste them here while masking sensitive info.
It should be enough for me to test on my own ENV.

I have previously posted the information related to my custom configuration. The caption configuration is the version that did not generate an error when restarting NGINX.

# RTMP configuration
rtmp {
    server {
        listen 1945; # Listen on standard RTMP port
	 listen 5554;
	 notify_method get;
	 record off;
        chunk_size 4000;

        # This application is to accept incoming stream
        application kLive {
                live on; # Allows live input from above
		 exec_options on;

            # Static pull is started at nginx start
            exec_pull ffmpeg -rtsp_transport tcp —i rtsp://usr_name:pswd@LIVE_CAMIP:IP_CAM_PORT/axis-media/media.amp?camera=1 -vcodec libx264 -vprofile baseline -g 10 -acodec libfaac -ar 44100 -ac 1 -f flv rtmp://NGiNX_HOST:PORT/$name name=camone;

            exec_push ffmpeg -rtsp_transport tcp —i rtsp://usr_name:pswd@LIVE_CAMIP:IP_CAM_PORT/axis-media/media.amp?camera=2 -vcodec libx264 -vprofile baseline -g 10 -acodec libfaac -ar 44100 -ac 1 -f flv rtmp://NGiNX_HOST:PORT/$name name=camtwo;

                dash on;
                dash_path /var/tmp/dashme;

                hls on; # Enable HTTP Live Streaming
                hls_cleanup on;
                hls_sync 100ms;
                hls_fragment 2s;

                hls_path /var/tmp/hlsme/;


        }
    }

After getting NGINX stated I use the URL format descibed in the documentation to attempt to stream the live stream. I did not see any errors nor am I clear where to look for such errors. These live feeds are only availabe in RTPS format. I am not able to convert them to RTMP without Wowza at this time.

The success path is to 1st be able to configure multiple source URLs from a fix source which allow ingestion of RTPS streams. Currently, Kaltura CE does not have the ablity to configure multiple LIVE stream direct source via NGINX and notes I have read on the topic suggest NGINX has issues processing multiple LIVE sources configured in this manner. I would assume that is a resource intensive method. NGINX would have to encode each live stream before passing it to the playback application.

Your ENV would need to be able to provide multiple direct sources such as IP cameras in RTPS format, then allow you to feed that source for ingestion and encoding by NGINX for playback through Kaltura CE. Taking note these sources are password protected and configured behind a firewall appliance to limit connectivity to the streams to specific machine IPs.

@jess

I am still trying to configure NGINX to ingest LIVE RTSP streams and convert them to RTMP to pass them to Kaltura CE for playback by the end users. As shown in my previous NGINX configuration sample I am still have not been able to get the streams to playback. I am sure the installation is working properly because I have tested LIVE streaming over RTMP from my desktop and a mobile device and have been able to view the stream.

However, I am not able to include any combination of the following commands to generate a live RTMP stream from my RTSP source device using NGINX to playback using Kaltura CE.

`           exec_pull ffmpeg -rtsp_transport tcp —i rtsp://usr_name:pswd@LIVE_CAMIP:IP_CAM_PORT/axis-media/media.amp?camera=2 -vcodec libx264 -vprofile baseline -g 10 -acodec libfaac -ar 44100 -ac 1 -f flv rtmp://NGiNX_HOST:PORT/$name name=camtwo;`
            exec_push ffmpeg -rtsp_transport tcp —i rtsp://usr_name:pswd@LIVE_CAMIP:IP_CAM_PORT/axis-media/media.amp?camera=2 -vcodec libx264 -vprofile baseline -g 10 -acodec libfaac -ar 44100 -ac 1 -f flv rtmp://NGiNX_HOST:PORT/$name name=camtwo;

Most online documentation suggests using the pull method rather than push but I think this is specifically related to the encoding commands needed to get the desired results. I also tried this command set but it was not successful either.

            exec_pull ffmpeg -i rtsp://user_name:pswd@LIVE_CAM_HOST:PORT/axis-media/media.amp?videocodec=h264&streamprofile=balanced&camera=1 -threads 2 -f flv -r 25 -s 1280x720 -an rtmp://NGiNX_HOST:PORT/APP_NAME/CAM_NAME;

If you are able to find a success path to configure static sources into NGINX to allow playback using Kaltura CE this would make Kaltura CE a true All In One solution. As of now to get this to work I have to feed the live stream into Wowza to encode before serving the stream from Wowza into Kaltura.

@jess

From what I can tell after reviewing support group threads and other sites like Stackflow this issue could be specific to the ffmpeg configuration. Now, what I am not sure about it what configuration settings if any are missing to allow transcoding of the rtsp stream. The caption site shows examples I tried to use on command line with mpeg and I did not get the same results.

https://groups.google.com/forum/#!searchin/nginx-rtmp/rtsp$20nginx$20rtmp|sort:relevance/nginx-rtmp/iuKgNa3I2hs/VEPPaL6BAAAJ

I ran a command simalar to the one caption from command line:

ffmpeg -rtsp_transport tcp —i rtsp://usr_name:usr_pswd@HOST-IP:PORT/axis-media/media.amp?videocodec=h264&streamprofile=balanced&camera=1 -vcodec libx264 -vprofile baseline -g 10 -acodec libfaac -ar 44100 -ac 1 -c copy -f flv rtmp://NGINX_HOST:NGINX_PORT/kLive/stream_name;

the results I got are as follows:

# ffmpeg -rtsp_transport tcp —i rtsp://usr_name:usr_pswd@HOST-IP:PORT/axis-media/media.amp?videocodec=h264&streamprofile=balanced&camera=1 -vcodec libx264 -vprofile baseline -g 10 -acodec libfaac -ar 44100 -ac 1 -c copy -f flv rtmp://NGINX_HOST:NGINX_PORT/kLive/stream_name;
[7] 18308
[8] 18309
-bash: -c: command not found
[8]   Done                    streamprofile=balanced
[root@tig03 ~]# ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
  configuration: --prefix=/opt/kaltura/ffmpeg-3.2 --libdir=/opt/kaltura/ffmpeg-3.2/lib --shlibdir=/opt/kaltura/ffmpeg-3.2/lib --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -I/opt/kaltura/include' --extra-ldflags=-L/opt/kaltura/lib --disable-devices --enable-bzlib --enable-libgsm --enable-libmp3lame --enable-libschroedinger --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-avisynth --enable-libxvid --enable-filter=movie --enable-avfilter --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libvpx --enable-libspeex --enable-libass --enable-postproc --enable-pthreads --enable-static --enable-shared --enable-gpl --disable-debug --disable-optimizations --enable-gpl --enable-pthreads --enable-swscale --enable-vdpau --enable-bzlib --disable-devices --enable-filter=movie --enable-version3 --enable-indev=lavfi --enable-x11grab
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.100 / 57. 64.100
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100

This is all the output I got from the command. I am still trying other combinations as I am pretty sure if I can get ffmpeg to successfully return output simular to the example provided. It will ingest the live feed and become available for playback.

@jess

So I noticed

this is a trulicated portion of the URL provided and I also notice in the example the ‘&’ options are not passed. So I amended the url to basic information.

ffmpeg -rtsp_transport tcp —i rtsp://usr_name:usr_pswd@HOST-IP:PORT/axis-media/media.amp?camera=1 -vcodec libx264 -vprofile baseline -g 10 -acodec libfaac -ar 44100 -ac 1 -c copy -f flv rtmp://NGINX_HOST:NGINX_PORT/kLive/stream_name;

This command now returns the following error.

ffmpeg -i rtsp://usr_name:usr_pswd@HOST-IP:PORT/axis-media/media.amp?camera=1 -vcodec libx264 -vprofile baseline -g 10 -acodec libfaac -ar 44100 -ac 1 -c copy -f flv rtmp://NGINX_HOST:NGINX_PORT/kLive/stream_name;

ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
  configuration: --prefix=/opt/kaltura/ffmpeg-3.2 --libdir=/opt/kaltura/ffmpeg-3.2/lib --shlibdir=/opt/kaltura/ffmpeg-3.2/lib --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -I/opt/kaltura/include' --extra-ldflags=-L/opt/kaltura/lib --disable-devices --enable-bzlib --enable-libgsm --enable-libmp3lame --enable-libschroedinger --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-avisynth --enable-libxvid --enable-filter=movie --enable-avfilter --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libvpx --enable-libspeex --enable-libass --enable-postproc --enable-pthreads --enable-static --enable-shared --enable-gpl --disable-debug --disable-optimizations --enable-gpl --enable-pthreads --enable-swscale --enable-vdpau --enable-bzlib --disable-devices --enable-filter=movie --enable-version3 --enable-indev=lavfi --enable-x11grab
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.100 / 57. 64.100
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
[NULL @ 0xf5cfa0] Unable to find a suitable output format for '—i'
—i: Invalid argument

Clearly, I am on the right track with figuring out why the stream is not being displayed properly. I am pretty sure it is because ffmpeg is not process the stream and passing it to NGINX to stream.

I have figured out why I got the invalid error. Since I copy and pasted the command from a site it had a hyphen rather than an English dash. After changing the command to this I got a new error message.

#ffmpeg -rtsp_transport tcp -i rtsp://usr_name:usr_pswd@HOST-IP:PORT/axis-media/media.amp?camera=1 -vcodec libx264 -vprofile baseline -g 10 -acodec libfaac -ar 44100 -ac 1 -c copy -f flv rtmp://NGINX_HOST:NGINX_PORT/kLive/stream_name;

ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
  configuration: --prefix=/opt/kaltura/ffmpeg-3.2 --libdir=/opt/kaltura/ffmpeg-3.2/lib --shlibdir=/opt/kaltura/ffmpeg-3.2/lib --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -I/opt/kaltura/include' --extra-ldflags=-L/opt/kaltura/lib --disable-devices --enable-bzlib --enable-libgsm --enable-libmp3lame --enable-libschroedinger --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-avisynth --enable-libxvid --enable-filter=movie --enable-avfilter --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libvpx --enable-libspeex --enable-libass --enable-postproc --enable-pthreads --enable-static --enable-shared --enable-gpl --disable-debug --disable-optimizations --enable-gpl --enable-pthreads --enable-swscale --enable-vdpau --enable-bzlib --disable-devices --enable-filter=movie --enable-version3 --enable-indev=lavfi --enable-x11grab
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.100 / 57. 64.100
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, rtsp, from 'rtsp://usr_name:usr_pswd@HOST-IP:PORT/axis-media/media.amp?camera=1':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.033367, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuvj420p(pc, smpte170m/smpte170m/bt709, progressive), 704x480 [SAR 10:11 DAR 4:3], 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc
Output #0, flv, to 'rtmp://NGINX_HOST:NGINX_PORT/kLive/stream_name':
  Metadata:
    title           : Media Presentation
    encoder         : Lavf57.56.100
    Stream #0:0: Video: h264 (Main) ([7][0][0][0] / 0x0007), yuvj420p(pc, smpte170m/smpte170m/bt709, progressive), 704x480 [SAR 10:11 DAR 4:3], q=2-31, 29.97 fps, 29.97 tbr, 1k tbn, 90k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[flv @ 0x2209a00] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
av_interleaved_write_frame(): Broken pipe
Error writing trailer of rtmp://NGINX_HOST:NGINX_PORT/kLive/stream_name: Broken pipeframe=    1 fps=0.0 q=-1.0 Lsize=      10kB time=00:00:00.00 bitrate=79280.0kbits/s speed=4.27x
video:9kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.068123%
Conversion failed!

I also re-ran the command with a the ‘-v debug’ option and got this:

#ffmpeg -v debug -rtsp_transport tcp -i rtsp://usr_name:usr_pswd@HOST-IP:PORT/axis-media/media.amp?camera=1 -vcodec libx264 -vprofile baseline -g 10 -acodec libfaac -ar 44100 -ac 1 -c copy -f flv rtmp://NGINX_HOST:NGINX_PORT/kLive/stream_name;

ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
  configuration: --prefix=/opt/kaltura/ffmpeg-3.2 --libdir=/opt/kaltura/ffmpeg-3.2/lib --shlibdir=/opt/kaltura/ffmpeg-3.2/lib --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPICall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -I/opt/kaltura/include' --extra-ldflags=-L/opt/kaltura/lib --disable-devices --enable-bzlib --enable-libgsm --enable-libmp3lame --enable-libschroedinger --es --enable-libx264 --enable-libx265 --enable-avisynth --enable-libxvid --enable-filter=movie --enable-avfilter --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libvpx --enable-libspeex --enable-libass --enable-postproc --enable-pthrred --enable-gpl --disable-debug --disable-optimizations --enable-gpl --enable-pthreads --enable-swscale --enable-vdpau --enable-bzlib --disable-devices --enable-filter=movie --enable-version3 --enable-indev=lavfi --enable-x11grab
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.100 / 57. 64.100
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-rtsp_transport' ... matched as AVOption 'rtsp_transport' with argument 'tcp'.
Reading option '-i' ... matched as input file with argument 'rtsp://usr_name:usr_pswd@HOST-IP:PORT/axis-media/media.amp?camera=1'.
Reading option '-threads' ... matched as AVOption 'threads' with argument '2'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '25'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument '1280x720'.
Reading option '-an' ... matched as option 'an' (disable audio) with argument '1'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'libx264'.
Reading option '-vprofile' ... matched as AVOption 'vprofile' with argument 'baseline'.
Reading option '-g' ... matched as AVOption 'g' with argument '10'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'libfaac'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '44100'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '1'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'flv'.
Reading option 'rtmp://NGINX_HOST:NGINX_PORT/kLive/stream_name' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file rtsp://usr_name:usr_pswd@HOST-IP:PORT/axis-media/media.amp?camera=1.
Successfully parsed a group of options.
Opening an input file: rtsp://usr_name:usr_pswd@HOST-IP:PORT/axis-media/media.amp?camera=1.
[tcp @ 0x23effc0] No default whitelist set
[rtsp @ 0x23edf60] SDP:
v=0
o=- 1147797149021282 1147797149021282 IN IP4 50.242.199.138
s=Media Presentation
e=NONE
b=AS:50000
t=0 0
a=control:rtsp://HOST-IP:PORT/axis-media/media.amp?camera=1    a=range:npt=0.000000-
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:50000
a=framerate:30.0
a=transform:1.000000,0.000000,0.000000;0.000000,0.909091,0.000000;0.000000,0.000000,1.000000
a=control:rtsp://HOST-IP:PORT/axis-media/media.amp/trackID=1?camera=1
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; profile-level-id=4D0029; sprop-parameter-sets=Z00AKeKQFge2BqwYBBuHiRFQ,aO48gA==
Failed to parse interval end specification ''
[rtsp @ 0x23edf60] video codec set to: h264
[rtsp @ 0x23edf60] RTP Packetization Mode: 1
[rtsp @ 0x23edf60] RTP Profile IDC: 4d Profile IOP: 0 Level: 29
[rtsp @ 0x23edf60] Extradata set to 0x23f03d0 (size: 30)
[rtsp @ 0x23edf60] setting jitter buffer size to 0
[rtsp @ 0x23edf60] hello state=0
Failed to parse interval end specification ''
[h264 @ 0x23f1760] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0x23f1760] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0x23f1760] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0x23f1760] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0x23f1760] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 0x23f1760] Reinit context to 704x480, pix_fmt: yuvj420p
[h264 @ 0x23f1760] nal_unit_type: 1, nal_ref_idc: 2
    Last message repeated 5 times
[rtsp @ 0x23edf60] All info found
[rtsp @ 0x23edf60] rfps: 29.250000 0.019163
[rtsp @ 0x23edf60] rfps: 29.333333 0.014981
[rtsp @ 0x23edf60] rfps: 29.416667 0.011313
    Last message repeated 1 times
[rtsp @ 0x23edf60] rfps: 29.500000 0.008159
    Last message repeated 1 times
[rtsp @ 0x23edf60] rfps: 29.583333 0.005520
    Last message repeated 1 times
[rtsp @ 0x23edf60] rfps: 29.666667 0.003394
    Last message repeated 1 times
[rtsp @ 0x23edf60] rfps: 29.750000 0.001783
    Last message repeated 1 times
[rtsp @ 0x23edf60] rfps: 29.833333 0.000686
    Last message repeated 1 times
[rtsp @ 0x23edf60] rfps: 29.916667 0.000103
    Last message repeated 1 times
[rtsp @ 0x23edf60] rfps: 30.000000 0.000035
    Last message repeated 1 times
[rtsp @ 0x23edf60] rfps: 60.000000 0.000138
    Last message repeated 1 times
[rtsp @ 0x23edf60] rfps: 120.000000 0.000553
    Last message repeated 1 times
[rtsp @ 0x23edf60] rfps: 240.000000 0.002210
    Last message repeated 1 times
[rtsp @ 0x23edf60] rfps: 29.970030 0.000000
[rtsp @ 0x23edf60] rfps: 59.940060 0.000000
[rtsp @ 0x23edf60] Setting avg frame rate based on r frame rate
Input #0, rtsp, from 'rtsp://usr_name:usr_pswd@HOST-IP:PORT/axis-media/media.amp?camera=1':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.033378, bitrate: N/A
    Stream #0:0, 28, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, smpte170m/smpte170m/bt709, progressive, left), 704x480 [SAR 10:11 DAR 4:3], 0/1, 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc
Successfully opened the file.
Parsing a group of options: output file rtmp://NGINX_HOST:NGINX_PORT/kLive/stream_name.
Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 25.
Applying option s (set frame size (WxH or abbreviation)) with argument 1280x720.
Applying option an (disable audio) with argument 1.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument libx264.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument libfaac.
Applying option ar (set audio sampling rate (in Hz)) with argument 44100.
Applying option ac (set number of audio channels) with argument 1.
Applying option c (codec name) with argument copy.
Applying option f (force format) with argument flv.
Successfully parsed a group of options.
Opening an output file: rtmp://NGINX_HOST:NGINX_PORT/kLive/stream_name.
[rtmp @ 0x2516f00] No default whitelist set
[tcp @ 0x23f0740] No default whitelist set
[rtmp @ 0x2516f00] Handshaking...
[rtmp @ 0x2516f00] Type answer 3
[rtmp @ 0x2516f00] Server version 13.14.10.13
[rtmp @ 0x2516f00] Proto = rtmp, path = /kLive/stream_name, app = kLive, fname = stream_name
[rtmp @ 0x2516f00] Server bandwidth = 5000000
[rtmp @ 0x2516f00] Client bandwidth = 5000000
[rtmp @ 0x2516f00] New incoming chunk size = 4096
[rtmp @ 0x2516f00] Releasing stream...
[rtmp @ 0x2516f00] FCPublish stream...
[rtmp @ 0x2516f00] Creating stream...
[rtmp @ 0x2516f00] Sending publish command for 'stream_name'
Successfully opened the file.
Output #0, flv, to 'rtmp://NGINX_HOST:NGINX_PORT/kLive/stream_name':
  Metadata:
    title           : Media Presentation
    encoder         : Lavf57.56.100
    Stream #0:0, 0, 1/1000: Video: h264 (Main), 1 reference frame ([7][0][0][0] / 0x0007), yuvj420p(pc, smpte170m/smpte170m/bt709, progressive, left), 704x480 (0x0) [SAR 10:11 DAR 4:3], 0/1, q=2-31, 29.97 fps, 29.97 tbr, 1k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[flv @ 0x251a4e0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
av_interleaved_write_frame(): Broken pipe
No more output streams to write to, finishing.
Error writing trailer of rtmp://NGINX_HOST:NGINX_PORT/kLive/stream_name: Broken pipeframe=    1 fps=0.0 q=-1.0 Lsize=       9kB time=00:00:00.00 bitrate=75080.0kbits/s speed=3.68x
video:9kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.245325%
Input file #0 (rtsp://usr_name:usr_pswd@HOST-IP:PORT/axis-media/media.amp?camera=1):
  Input stream #0:0 (video): 1 packets read (9090 bytes);
  Total: 1 packets (9090 bytes) demuxed
Output file #0 (rtmp://NGINX_HOST:NGINX_PORT/kLive/stream_name):
  Output stream #0:0 (video): 1 packets muxed (9090 bytes);
  Total: 1 packets (9090 bytes) muxed
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x24a0b20] Statistics: 0 seeks, 2 writeouts
[rtmp @ 0x2516f00] UnPublishing stream...
[rtmp @ 0x2516f00] Deleting stream...
Conversion failed!

My specific errors would need to be fixed by updating the configuration at time of compiling of ffmpeg to resolve both issues. Specifically, the timestamp issue and issue with the error writing trailer. If these issues are resolved then I add all my IP camera RSTP streams to the NGINX configuration file and pull them into NGINX to hand off to Kaltura CE for streaming without using Wowza.

@jess

Is it possible this ffmpeg configuration issue with missing or reconfiguration of the settings causing the caption errors can be fixed in the next release?

Hi @hiphopservers,

I’ll try to allocate some time to erect a similar ENV so I can debug it.

Until then, you are more than welcome to experiment with the ffmpeg build and produce your own kaltura-ffmepg package for testing.
The full spec used for building the kaltura-ffmpeg RPM is here:


and building it requires the following devel packages:
kaltura-a52dec-dev
kaltura-lame-dev
kaltura-libopencore-amr-dev
kaltura-librtmp-dev
kaltura-x264-dev

Specs for these are also available under https://github.com/kaltura/platform-install-packages/blob/Lynx-12.17.0/RPM/SPECS

A basic howto for building the RPMs can be found here:

If you arrive at a working configuration, feel free to let me know so I can examine it and if it works and causes no regressions, I’ll be happy to merge it and release a new official package.

Alternatively, if you want to speed things up, you can create a Docker container with the same packages and configuration as you use on your Prod. ENV and send me a private message with how to obtain it. This will save some time and will make debugging easier.

@jess

It took me some time to read up on Docker and how to use it properly. Per your request I have made a Docker container of my current Prod. ENV and provided you a link in your private inbox as requested. I will review the ffmpeg configuration information on my other system with ffmpeg install, which I will note returned a different error then the Kaltura CE version of the ffmpeg installation. My guess is if I find the differences in the the configurations settings and add the missing configurations to each system the encoding command will work without the errors.

Specifically, the Timestamps error does not show on my non-Kaltura system but the error related to opening the stream on that system does not appear on the Kaltura CE system. I will work on this from my end and update you with my progress as you attempt recreate the issues on your end to find a solution.

Hi @hiphopservers,

Got your private message, thanks.
I’ll try to get to it later today but either way, I promise to look into it this week.
Will let you know.

@jess

Have you had any progress?

Hi @hiphopservers,

I sent you a private message but I guess you didn’t get it.
I downloaded the Docker image from the link you supplied but it’s just a vanilla CentOS 6.9 image as far as I can tell…
I don’t see that any of the Kaltura packages are installed, certainly not kaltura-nginx and no Nginx configuration either.
Please repackage and make sure after running:

# docker load < hiphopsv_tig03_centos69.tar
docker run  -i -t $IMAGE_ID  /bin/sh

The container actually has your ENV in it.

@jess

Did you get my direct message regarding creating a new docker tar you request? I have not seen any DMs from you in response to the message. Previously, you mention your sent messages and I have not gotten them, just check if this is the case again.

Regards

Hi @hiphopservers,

Got it and just replied.

@jess

I have also respond to your message with an update on this issue.

I have move this discussion to a new thread.