
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (95)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (9218)
-
WebVTT Discussions at FOMS
1er janvier 2014, par silviaAt the recent FOMS (Foundations of Open Media Software and Standards) Developer Workshop, we had a massive focus on WebVTT and the state of its feature set. You will find links to summaries of the individual discussions in the FOMS Schedule page. Here are some of the key results I went away with.
1. WebVTT Regions
The key driving force for improvements to WebVTT continues to be the accurate representation of CEA608/708 captioning. As part of that drive, we’ve introduced regions (the CEA708 “window” concept) to WebVTT. WebVTT regions satisfy multiple requirements of CEA608/708 captions :
- support for rollup captions
- support for background color and border color on a group of cues independent of the background color of the individual cue
- possibility to move a group of cues from one location on screen to a different
- support to specify an anchor point and a growth direction for cues when their text size changes
- support for specifying a fixed number of lines to be rendered
- possibility to specify which region is rendered in front of which other one when regions overlap
While WebVTT regions enable us to satisfy all of the above points, the specification isn’t actually complete yet and some of the above needs aren’t satisfied yet.
We have an open bug to move a region elsewhere. A first discussion at FOMS seemed to to indicate that we’ll have to add syntax for updating a region at a particular time and thus give region definitions a way to be valid only for a certain time frame. I can imagine that the region definitions that we have in the header of the WebVTT file now would have an implicitly defined time frame from the start to the end of the file, but can be overruled by a re-definition anywhere within the WebVTT file. That redefinition needs to provide a start and end time.
We registered a bug to add specifying the width and height of regions (and possibly of cues) by em (i.e. by multiples of the largest character in a font). This should allow us to have the region grow/shrink around the region anchor point with a change of font size by script or a user. em specifications should also be applied to cues – that matches the column count of CEA708/608 better.
When regions overlap, the original region extension spec already suggested a “layer” cue setting. It will be easy to add it.
Another change that we will ultimately need is the “scroll” setting : we will need to introduce support for scrolling text down or from left-to-right or right-to-left, e.g. vertical scrolling text seems to be used in some Chinese caption use cases.
2. Unify Rendering Approach
The introduction of regions created a second code path in the rendering spec with some duplication. At FOMS we discussed if it was possible to unify that. The suggestion is to render all cues into a region. Those that are not part of a region would be rendered into an anonymous region that covers the complete viewport. There may be some consequences to this, e.g. cue settings should be usable across all cues, no matter whether or not part of a region, and avoiding cue overlap may need to be done within regions.
Here’s a rough outline of the path of the new rendering algorithm :
(1) Render the regions :
Specified Region Anonymous Region Render values as given : Render following values : - width
- lines
- regionanchor
- viewportanchor
- scroll
- 100%
- videoheight/lineheight
- 0,0
- 0,0
- none
(2) Render the cues :
- Create a cue box and put it in its region (anonymous if none given).
- Calculate position & size of cue box from cue settings (position, line, size).
- Calculate position of cue text inside cue box from remaining cue settings (vertical, align).
3. Vertical Features
WebVTT includes vertical rendering, both right-to-left and left-to-right. However, regions are not defined for vertical. Eventually, we’re going to have to look at the vertical features of WebVTT with more details and figure out whether the spec is working for them and what real-world requirements we have missed. We hope we can get some help from users in countries where vertically rendered captions/subtitles are the norm.
4. Best Practices
Some of he WebVTT users at FOMS suggested it would be advantageous to start a list of “best practices” for how to author captions with WebVTT. Example recommendations are :
- Use line numbers only to position cues from top or bottom of viewport. Don’t use otherwise.
- Note that when the user increases the fontsize in rollup captions and thus introduces new line breaks, your cues will roll by faster because the number of lines of a rollup is fixed.
- Make sure to use &lrm ; and &rlm ; UTF-8 markers to control the directionality of your text.
It would be nice if somebody started such a document.
5. Non-caption use cases
Instead of continuing to look back and improve our support of captions/subtitles in WebVTT, one session at FOMS also went ahead and looked forward to other use cases. The following requirements came out of this :
5.1 Preview Thumbnails
A common use case for timed data is the use of preview thumbnails on the navigation bar of videos. A native implementation of preview thumbnails would allow crawlers and search engines to have a standardised way of extracting timed images for media files, so introduction of a new @kind value “thumbnails” was suggested.
The content of a “thumbnails” cue could be any of :
- an image URL
- a sprite URL to a single image
- a spatial & temporal media fragment URL to a media resource
- base64 encoded image (data URI)
- an iframe offset to the media resource
The suggestion is to allow anything that would work in a img @src attribute as value in a cue of @kind=”thumbnails”. Responsive images might also be useful for a track of @kind=”thumbnails”. It may even be possible to define an inband thumbnail track based on the track of @kind=”thumbnails”. Such cues should also work in the JavaScript track API.
5.2 Chapter markers
There is interest to put richer content than just a chapter title into chapter cues. Often, chapters consist of a title, text and and image. The text is not so important, but the image is used almost everywhere that chapters are used. There may be a need to extend chapter cue content with images, similar to what a @kind=”thumbnails” track offers.
The conclusion that we arrived at was that we need to make @kind=”thumbnails” work first and then look at using the learnings from that to extend @kind=”chapters”.
5.3 Inband tracks for live video
A difficult topic was opened with the question of how to transport text tracks in live video. In live captioning, end times are never created for cues, but are implied by the start time of the next cue. This is a use case that hasn’t been addressed in HTML5/WebVTT yet. An old proposal to allow a special end time value of “NEXT” was discussed and recommended for adoption. Also, there was support for the spec change that stops blocking loading VTT until all cues have been loaded.
5.4 Cross-domain VTT loading
A brief discussion centered around the fact that the spec disallows cross-domain loading of WebVTT files, but that no browser implements this. This needs to be discussion at the HTML WG level.
6. Regions in live captioning
The final topic that we discussed was how we could provide support for regions in live captioning.
- The currently active region definitions will need to be come part of every header of every VTT file segment that HLS uses, so it’s available in case the cues in the segment file reference it.
- “NEXT” in end time markers would make authoring of live captioned VTT files easier.
- If the application wants to use 1 word at a time and doesn’t want to delay sending the word until the full cue is authored (e.g. in a Hangout type environment), we will need to introduce the concept of “cue continuation markers”, so we know that a cue could be extended with the next VTT file fragment.
This is an extensive and impressive amount of discussion around WebVTT and a lot of new work to be performed in the future. I’m very grateful for all the people who have contributed to these discussions at FOMS and will hopefully continue to help get the specifications right.
-
Issue trying to stream RTSP to RTMP (live) through NGINX
30 juin 2016, par taansariI want live RTMP streaming through nginx. I setup this server on a public ip (linux - CentOS), using this tutorial : https://notehub.org/rcfdu.
My target is : RTSP source -> transcode to RTMP -> recieve on nginx (live ip),
Then, I want to receive this stream through server ; something like :
nginx -> ffplay.
On transmission side, I have ffmpeg application, and on receiver side, I have ffplay application.
I have setup everything I could think of, and I can see it is properly setup (apparently). But, when I try to stream using similar command :
ffmpeg -i rtsp://aaa.bb.ccc.ddd/vod/mp4:filename.mov -f mpegts rtmp://<live ip="ip" address="address">:1935/live/
</live>I get lots of messages (where everything looks alright) :
ffmpeg -i rtsp://aaa.bb.ccc.ddd/vod/mp4:filename.mov -f mpegts rtmp://<live ip="ip" address="address">:1935/live/
ffmpeg version N-80386-g5f5a97d Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-nv
enc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enabl
e-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --en
able-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libil
bc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-
amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-li
bspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo
-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libweb
p --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-l
ibzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 24.100 / 55. 24.100
libavcodec 57. 46.100 / 57. 46.100
libavformat 57. 38.100 / 57. 38.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 46.101 / 6. 46.101
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
[rtsp @ 03087ca0] UDP timeout, retrying with TCP
Input #0, rtsp, from 'rtsp://aaa.bb.ccc.ddd/vod/mp4:filename.mov':
Metadata:
title : filename.mov
Duration: 00:09:56.46, start: 0.000000, bitrate: N/A
Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp
Stream #0:1: Video: h264 (Constrained Baseline), yuv420p, 240x160, 24 fps, 4
8 tbr, 90k tbn, 48 tbc
[mpegts @ 04d033a0] Using AVStream.codec to pass codec parameters to muxers is d
eprecated, use AVStream.codecpar instead.
Last message repeated 1 times
Output #0, mpegts, to 'rtmp://<live ip="ip" address="address">:1935/live/':
Metadata:
title : filename.mov
encoder : Lavf57.38.100
Stream #0:0: Video: mpeg2video (Main), yuv420p, 240x160, q=2-31, 200 kb/s, 2
4 fps, 90k tbn, 24 tbc
Metadata:
encoder : Lavc57.46.100 mpeg2video
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
Metadata:
encoder : Lavc57.46.100 mp2
Stream mapping:
Stream #0:1 -> #0:0 (h264 (native) -> mpeg2video (native))
Stream #0:0 -> #0:1 (aac (native) -> mp2 (native))
Press [q] to stop, [?] for help
Past duration 0.999992 too large
Last message repeated 4 times
frame= 85 fps=0.0 q=2.9 size= 322kB time=00:00:03.85 bitrate= 684.4kbits/s
frame= 95 fps= 94 q=3.5 size= 366kB time=00:00:04.28 bitrate= 698.9kbits/s
frame= 108 fps= 71 q=3.7 size= 421kB time=00:00:04.79 bitrate= 719.9kbits/s
frame= 122 fps= 61 q=4.1 size= 478kB time=00:00:05.34 bitrate= 733.1kbits/s
frame= 134 fps= 53 q=4.5 size= 527kB time=00:00:05.87 bitrate= 735.8kbits/s
frame= 146 fps= 48 q=5.2 size= 579kB time=00:00:06.35 bitrate= 747.2kbits/s
frame= 159 fps= 45 q=5.5 size= 632kB time=00:00:06.88 bitrate= 751.9kbits/s
frame= 171 fps= 42 q=5.3 size= 677kB time=00:00:07.38 bitrate= 751.5kbits/s
frame= 183 fps= 40 q=5.6 size= 725kB time=00:00:07.91 bitrate= 750.8kbits/s
frame= 193 fps= 38 q=6.3 size= 765kB time=00:00:08.34 bitrate= 750.7kbits/s
frame= 207 fps= 37 q=6.6 size= 820kB time=00:00:08.89 bitrate= 755.2kbits/s
frame= 219 fps= 36 q=6.6 size= 865kB time=00:00:09.40 bitrate= 754.2kbits/s
frame= 231 fps= 35 q=7.2 size= 911kB time=00:00:09.90 bitrate= 753.6kbits/s
frame= 243 fps= 34 q=7.4 size= 959kB time=00:00:10.40 bitrate= 754.6kbits/s
frame= 255 fps= 34 q=6.7 size= 1002kB time=00:00:10.91 bitrate= 752.1kbits/s
frame= 267 fps= 33 q=5.5 size= 1047kB time=00:00:11.41 bitrate= 751.4kbits/s
frame= 279 fps= 33 q=4.6 size= 1088kB time=00:00:11.89 bitrate= 749.1kbits/s
frame= 291 fps= 32 q=6.1 size= 1140kB time=00:00:12.42 bitrate= 751.4kbits/s
frame= 301 fps= 31 q=6.7 size= 1181kB time=00:00:12.85 bitrate= 752.5kbits/s
frame= 314 fps= 31 q=6.6 size= 1231kB time=00:00:13.40 bitrate= 752.1kbits/s
frame= 325 fps= 31 q=7.0 size= 1275kB time=00:00:13.86 bitrate= 753.0kbits/s
frame= 338 fps= 30 q=6.7 size= 1324kB time=00:00:14.36 bitrate= 754.8kbits/s
frame= 349 fps= 30 q=6.5 size= 1368kB time=00:00:14.87 bitrate= 753.5kbits/s
frame= 362 fps= 30 q=6.8 size= 1415kB time=00:00:15.37 bitrate= 753.9kbits/s
frame= 373 fps= 30 q=6.2 size= 1457kB time=00:00:15.88 bitrate= 751.7kbits/s
frame= 387 fps= 30 q=3.8 size= 1506kB time=00:00:16.45 bitrate= 749.7kbits/s
frame= 400 fps= 29 q=4.1 size= 1549kB time=00:00:16.96 bitrate= 748.2kbits/s
frame= 415 fps= 29 q=5.4 size= 1597kB time=00:00:17.56 bitrate= 744.9kbits/s
frame= 427 fps= 29 q=5.2 size= 1639kB time=00:00:18.04 bitrate= 744.1kbits/s
frame= 439 fps= 29 q=4.4 size= 1679kB time=00:00:18.56 bitrate= 740.6kbits/s
frame= 451 fps= 29 q=3.6 size= 1717kB time=00:00:19.07 bitrate= 737.4kbits/s
frame= 464 fps= 28 q=2.6 size= 1761kB time=00:00:19.67 bitrate= 733.2kbits/s
frame= 475 fps= 28 q=7.0 size= 1799kB time=00:00:20.08 bitrate= 734.0kbits/s
frame= 488 fps= 28 q=8.3 size= 1847kB time=00:00:20.70 bitrate= 730.8kbits/s
frame= 502 fps= 28 q=5.9 size= 1895kB time=00:00:21.25 bitrate= 730.2kbits/s
frame= 515 fps= 28 q=3.3 size= 1935kB time=00:00:21.76 bitrate= 728.5kbits/s
frame= 528 fps= 28 q=2.5 size= 1976kB time=00:00:22.31 bitrate= 725.6kbits/s
frame= 540 fps= 28 q=3.4 size= 2017kB time=00:00:22.81 bitrate= 724.2kbits/s
frame= 553 fps= 28 q=6.2 size= 2072kB time=00:00:23.36 bitrate= 726.2kbits/s
frame= 568 fps= 28 q=6.7 size= 2132kB time=00:00:23.94 bitrate= 729.3kbits/s
frame= 580 fps= 28 q=6.8 size= 2174kB time=00:00:24.42 bitrate= 729.3kbits/s
frame= 592 fps= 27 q=6.8 size= 2219kB time=00:00:24.92 bitrate= 729.3kbits/s
frame= 604 fps= 27 q=7.4 size= 2263kB time=00:00:25.43 bitrate= 728.8kbits/s
frame= 615 fps= 27 q=6.1 size= 2305kB time=00:00:25.93 bitrate= 727.9kbits/s
frame= 626 fps= 27 q=7.4 size= 2339kB time=00:00:26.36 bitrate= 726.5kbits/s
frame= 638 fps= 27 q=6.8 size= 2383kB time=00:00:26.89 bitrate= 725.8kbits/s
frame= 651 fps= 27 q=5.8 size= 2436kB time=00:00:27.47 bitrate= 726.5kbits/s
frame= 662 fps= 27 q=7.0 size= 2471kB time=00:00:27.90 bitrate= 725.4kbits/s
frame= 675 fps= 27 q=5.9 size= 2523kB time=00:00:28.40 bitrate= 727.6kbits/s
frame= 679 fps= 26 q=6.8 size= 2534kB time=00:00:28.57 bitrate= 726.5kbits/s
frame= 703 fps= 27 q=8.0 size= 2622kB time=00:00:29.58 bitrate= 726.1kbits/s
frame= 714 fps= 27 q=7.6 size= 2662kB time=00:00:30.08 bitrate= 724.7kbits/s
frame= 729 fps= 27 q=6.5 size= 2712kB time=00:00:30.68 bitrate= 724.0kbits/s
frame= 741 fps= 27 q=7.0 size= 2753kB time=00:00:31.14 bitrate= 724.1kbits/s
frame= 755 fps= 27 q=7.5 size= 2801kB time=00:00:31.76 bitrate= 722.2kbits/s
frame= 767 fps= 26 q=7.2 size= 2842kB time=00:00:32.27 bitrate= 721.5kbits/s
frame= 779 fps= 26 q=6.8 size= 2881kB time=00:00:32.77 bitrate= 720.0kbits/s
frame= 791 fps= 26 q=8.2 size= 2922kB time=00:00:33.30 bitrate= 718.8kbits/s
frame= 803 fps= 26 q=7.0 size= 2961kB time=00:00:33.76 bitrate= 718.4kbits/s
frame= 816 fps= 26 q=6.6 size= 3003kB time=00:00:34.33 bitrate= 716.4kbits/s
frame= 828 fps= 26 q=6.4 size= 3044kB time=00:00:34.84 bitrate= 715.7kbits/s
frame= 840 fps= 26 q=7.5 size= 3084kB time=00:00:35.34 bitrate= 714.7kbits/s
frame= 855 fps= 26 q=5.0 size= 3137kB time=00:00:35.94 bitrate= 714.8kbits/s
frame= 866 fps= 26 q=6.2 size= 3169kB time=00:00:36.40 bitrate= 713.3kbits/s
frame= 880 fps= 26 q=5.9 size= 3219kB time=00:00:36.95 bitrate= 713.6kbits/s
frame= 892 fps= 26 q=6.8 size= 3259kB time=00:00:37.43 bitrate= 713.2kbits/s
frame= 904 fps= 26 q=5.3 size= 3300kB time=00:00:37.96 bitrate= 712.2kbits/s
frame= 916 fps= 26 q=5.5 size= 3338kB time=00:00:38.46 bitrate= 711.0kbits/s
frame= 928 fps= 26 q=5.5 size= 3377kB time=00:00:38.94 bitrate= 710.4kbits/s
frame= 941 fps= 26 q=6.4 size= 3422kB time=00:00:39.52 bitrate= 709.4kbits/s
frame= 953 fps= 26 q=5.4 size= 3460kB time=00:00:40.00 bitrate= 708.6kbits/s
frame= 967 fps= 26 q=5.2 size= 3506kB time=00:00:40.60 bitrate= 707.3kbits/s
frame= 979 fps= 26 q=4.8 size= 3546kB time=00:00:41.12 bitrate= 706.2kbits/s
frame= 985 fps= 26 q=5.2 size= 3563kB time=00:00:41.36 bitrate= 705.6kbits/s
frame= 1008 fps= 26 q=4.8 size= 3639kB time=00:00:42.30 bitrate= 704.6kbits/s
frame= 1022 fps= 26 q=4.3 size= 3684kB time=00:00:42.88 bitrate= 703.7kbits/s
frame= 1034 fps= 26 q=4.5 size= 3723kB time=00:00:43.38 bitrate= 702.9kbits/s
frame= 1046 fps= 26 q=3.8 size= 3763kB time=00:00:43.88 bitrate= 702.5kbits/s
frame= 1056 fps= 26 q=5.3 size= 3800kB time=00:00:44.32 bitrate= 702.3kbits/s
frame= 1069 fps= 26 q=5.5 size= 3842kB time=00:00:44.84 bitrate= 701.8kbits/s
frame= 1081 fps= 26 q=6.3 size= 3883kB time=00:00:45.35 bitrate= 701.3kbits/s
frame= 1093 fps= 26 q=6.3 size= 3925kB time=00:00:45.85 bitrate= 701.1kbits/s
frame= 1105 fps= 26 q=5.3 size= 3964kB time=00:00:46.36 bitrate= 700.5kbits/s
frame= 1117 fps= 26 q=6.7 size= 4006kB time=00:00:46.86 bitrate= 700.3kbits/s
frame= 1129 fps= 26 q=4.5 size= 4046kB time=00:00:47.32 bitrate= 700.4kbits/s
frame= 1141 fps= 26 q=7.1 size= 4089kB time=00:00:47.87 bitrate= 699.8kbits/s
Larger timestamp than 24-bit: 0x310042f0
WriteN, RTMP send error 10054 (133 bytes)
WriteN, RTMP send error 10054 (35 bytes)
WriteN, RTMP send error 10038 (42 bytes)
av_interleaved_write_frame(): Operation not permitted
Error writing trailer of rtmp://<live ip="ip" address="address">:1935/live/: Operation not permitte
dframe= 1143 fps= 25 q=8.1 Lsize= 4109kB time=00:00:47.92 bitrate= 702.5kbits
/s dup=0 drop=5 speed=1.07x
video:1343kB audio:2248kB subtitle:0kB other streams:0kB global headers:0kB muxi
ng overhead: 14.429363%
Conversion failed!
</live></live></live>but in the end, I get this error :
WriteN, RTMP send error 10054 (133 bytes)
WriteN, RTMP send error 10054 (35 bytes)
WriteN, RTMP send error 10038 (42 bytes)
av_interleaved_write_frame(): Operation not permitted
Error writing trailer of rtmp://<live ip="ip" address="address">:1935/live/: Operation not permitte
dframe= 1143 fps= 25 q=8.1 Lsize= 4109kB time=00:00:47.92 bitrate= 702.5kbits
/s dup=0 drop=5 speed=1.07x
video:1343kB audio:2248kB subtitle:0kB other streams:0kB global headers:0kB muxi
ng overhead: 14.429363%
Conversion failed!
</live>On the receiver side (where ffplay is running), I always get this error :
RTMP_ReadPacket, failed to read RTMP packet headersq= 0B f=0/0
rtmp://<live ip="ip" address="address">:1935/live/: Invalid data found when processing input
</live>Detailed output :
ffplay rtmp://<live ip="ip" address="address">:1935/live/
ffplay version N-80386-g5f5a97d Copyright (c) 2003-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-nv
enc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enabl
e-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --en
able-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libil
bc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-
amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-li
bspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo
-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libweb
p --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-l
ibzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 24.100 / 55. 24.100
libavcodec 57. 46.100 / 57. 46.100
libavformat 57. 38.100 / 57. 38.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 46.101 / 6. 46.101
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
RTMP_ReadPacket, failed to read RTMP packet headersq= 0B f=0/0
rtmp://<live ip="ip" address="address">:1935/live/: Invalid data found when processing input
</live></live>and if I enable debug mode, this is the receiving side log :
ffplay -loglevel debug rtmp://<live ip="ip" address="address">:1935/live/
ffplay version N-80386-g5f5a97d Copyright (c) 2003-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-nv
enc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enabl
e-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --en
able-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libil
bc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-
amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-li
bspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo
-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libweb
p --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-l
ibzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 24.100 / 55. 24.100
libavcodec 57. 46.100 / 57. 46.100
libavformat 57. 38.100 / 57. 38.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 46.101 / 6. 46.101
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
[rtmp @ 0310d800] No default whitelist set 0KB sq= 0B f=0/0
Parsing... : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
Parsed protocol: 0
Parsed host : <live ip="ip" address="address">
Parsed app : live
RTMP_Connect1, ... connected, handshaking= 0KB sq= 0B f=0/0
HandShake: Type Answer : 03q= 0KB vq= 0KB sq= 0B f=0/0
HandShake: Server Uptime : 324510454
HandShake: FMS Version : 0.0.0.0
HandShake: Handshaking finished....0KB vq= 0KB sq= 0B f=0/0
RTMP_Connect1, handshaked
RTMP_SendPacket: fd=648, size=174
0000: 03 00 00 00 00 00 ae 14 00 00 00 00 ............
0000: 02 00 07 63 6f 6e 6e 65 63 74 00 3f f0 00 00 00 ...connect.?....
0010: 00 00 00 03 00 03 61 70 70 02 00 04 6c 69 76 65 ......app...live
0020: 00 05 74 63 55 72 6c 02 00 1e 72 74 6d 70 3a 2f ..tcUrl...rtmp:/
0030: 2f 36 34 2e 34 39 2e 32 33 34 2e 32 35 30 3a 31 /<live ip="ip" address="address">:1
0040: 39 33 35 2f 6c 69 76 65 00 04 66 70 61 64 01 00 935/live..fpad..
0050: 00 0c 63 61 70 61 62 69 6c 69 74 69 65 73 00 40 ..capabilities.@
0060: 2e 00 00 00 00 00 00 00 0b 61 75 64 69 6f 43 6f .........audioCo
0070: 64 65 63 73 00 40 a8 ee 00 00 00 00 00 00 0b 76 decs.@.........v
0000: c3 .
0000: 69 64 65 6f 43 6f 64 65 63 73 00 40 6f 80 00 00 ideoCodecs.@o...
0010: 00 00 00 00 0d 76 69 64 65 6f 46 75 6e 63 74 69 .....videoFuncti
0020: 6f 6e 00 3f f0 00 00 00 00 00 00 00 00 09 on.?..........
Invoking connect
RTMP_ReadPacket: fd=648
0000: 02 00 00 00 00 00 04 05 00 00 00 00 ............
0000: 00 4c 4b 40 .LK@
HandleServerBW: server BW = 5000000
RTMP_ReadPacket: fd=648
0000: 02 00 00 00 00 00 05 06 00 00 00 00 ............
0000: 00 4c 4b 40 02 .LK@.
HandleClientBW: client BW = 5000000 2
RTMP_ReadPacket: fd=648
0000: 02 00 00 00 00 00 04 01 00 00 00 00 ............
0000: 00 00 10 00 ....
HandleChangeChunkSize, received: chunk size change to 4096
RTMP_ReadPacket: fd=648
0000: 03 00 00 00 00 00 be 14 00 00 00 00 ............
0000: 02 00 07 5f 72 65 73 75 6c 74 00 3f f0 00 00 00 ..._result.?....
0010: 00 00 00 03 00 06 66 6d 73 56 65 72 02 00 0d 46 ......fmsVer...F
0020: 4d 53 2f 33 2c 30 2c 31 2c 31 32 33 00 0c 63 61 MS/3,0,1,123..ca
0030: 70 61 62 69 6c 69 74 69 65 73 00 40 3f 00 00 00 pabilities.@?...
0040: 00 00 00 00 00 09 03 00 05 6c 65 76 65 6c 02 00 .........level..
0050: 06 73 74 61 74 75 73 00 04 63 6f 64 65 02 00 1d .status..code...
0060: 4e 65 74 43 6f 6e 6e 65 63 74 69 6f 6e 2e 43 6f NetConnection.Co
0070: 6e 6e 65 63 74 2e 53 75 63 63 65 73 73 00 0b 64 nnect.Success..d
0080: 65 73 63 72 69 70 74 69 6f 6e 02 00 15 43 6f 6e escription...Con
0090: 6e 65 63 74 69 6f 6e 20 73 75 63 63 65 65 64 65 nection succeede
00a0: 64 2e 00 0e 6f 62 6a 65 63 74 45 6e 63 6f 64 69 d...objectEncodi
00b0: 6e 67 00 00 00 00 00 00 00 00 00 00 00 09 ng............
RTMP_ClientPacket, received: invoke 190 bytes
(object begin)
Property:
Property:
Property:
(object begin)
Property: 3,0,1,123>
Property:
(object end)
Property:
(object begin)
Property:
Property:
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking <_result>
HandleInvoke, received result for method call <connect> 0B f=0/0
RTMP_SendPacket: fd=648, size=4
0000: 02 00 00 00 00 00 04 05 00 00 00 00 ............
0000: 00 4c 4b 40 .LK@
sending ctrl. type: 0x0003
RTMP_SendPacket: fd=648, size=10
0000: 42 00 00 00 00 00 0a 04 B.......
0000: 00 03 00 00 00 00 00 00 01 2c .........,
RTMP_SendPacket: fd=648, size=25
0000: 43 00 00 00 00 00 19 14 C.......
0000: 02 00 0c 63 72 65 61 74 65 53 74 72 65 61 6d 00 ...createStream.
0010: 40 00 00 00 00 00 00 00 05 @........
Invoking createStream
RTMP_ReadPacket: fd=648
0000: 03 00 00 00 00 00 1d 14 00 00 00 00 ............
0000: 02 00 07 5f 72 65 73 75 6c 74 00 40 00 00 00 00 ..._result.@....
0010: 00 00 00 05 00 3f f0 00 00 00 00 00 00 .....?.......
RTMP_ClientPacket, received: invoke 29 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object end)
HandleInvoke, server invoking <_result>
HandleInvoke, received result for method call <createstream>
SendPlay, seekTime=0, stopTime=0, sending play: (null)
RTMP_SendPacket: fd=648, size=29
0000: 08 00 00 00 00 00 1d 14 01 00 00 00 ............
0000: 02 00 04 70 6c 61 79 00 40 08 00 00 00 00 00 00 ...play.@.......
0010: 05 02 00 00 00 00 00 00 00 00 00 00 00 .............
Invoking play 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
sending ctrl. type: 0x0003
RTMP_SendPacket: fd=648, size=10
0000: c2 .
0000: 00 03 00 00 00 01 00 00 0b b8 ..........
RTMP_ReadPacket: fd=648
0000: 05 00 00 00 00 00 60 14 01 00 00 00 ......`.....
0000: 02 00 08 6f 6e 53 74 61 74 75 73 00 00 00 00 00 ...onStatus.....
0010: 00 00 00 00 05 03 00 05 6c 65 76 65 6c 02 00 06 ........level...
0020: 73 74 61 74 75 73 00 04 63 6f 64 65 02 00 14 4e status..code...N
0030: 65 74 53 74 72 65 61 6d 2e 50 6c 61 79 2e 53 74 etStream.Play.St
0040: 61 72 74 00 0b 64 65 73 63 72 69 70 74 69 6f 6e art..description
0050: 02 00 0a 53 74 61 72 74 20 6c 69 76 65 00 00 09 ...Start live...
RTMP_ClientPacket, received: invoke 96 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object begin)
Property:
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking <onstatus>
HandleInvoke, onStatus: NetStream.Play.Start
RTMP_ReadPacket: fd=648
0000: 05 00 00 00 00 00 18 12 01 00 00 00 ............
0000: 02 00 11 7c 52 74 6d 70 53 61 6d 70 6c 65 41 63 ...|RtmpSampleAc
0010: 63 65 73 73 01 01 01 01 cess....
RTMP_ClientPacket, received: notify 24 bytes
(object begin)
Property:
Property: nan : 0.000 fd= 0
aq= 0KB vq= 0KB sq= 0B f=0/0
Property:
(object end)
RTMP_ReadPacket: fd=648
RTMPSockBuf_Fill, recv returned -1. GetSockError(): 10060 (Unknown error)
RTMP_ReadPacket, failed to read RTMP packet header
[AVIOContext @ 04c81be0] Statistics: 0 bytes read, 0 seeks
RTMP_SendPacket: fd=648, size=34
0000: 43 00 00 00 00 00 22 14 C.....".
0000: 02 00 0c 64 65 6c 65 74 65 53 74 72 65 61 6d 00 ...deleteStream.
0010: 40 10 00 00 00 00 00 00 05 00 3f f0 00 00 00 00 @.........?.....
0020: 00 00 ..
Invoking deleteStreamd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
rtmp://<live ip="ip" address="address">:1935/live/: Invalid data found when processing input
</live></onstatus></createstream></connect></live></live></live>By the way, this is my server config file ( /etc/nginx/nginx.conf )
#user nobody;
worker_processes 4;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
}
}
}I can telnet into both port 80 and 1935, and made sure port 1935 is open as input and output in iptables...
-A INPUT -m state --state NEW -m tcp -p tcp --dport 1935 -j ACCEPT
-A OUTPUT -m state --state NEW -m tcp -p tcp --dport 1935 -j ACCEPTbut nothing works.
Can anyone help in this regards ?
-
Issue trying to stream RTSP to RTMP (live) through NGINX
28 août 2020, par taansariI want live RTMP streaming through nginx. I setup this server on a public ip (linux - CentOS), using this tutorial : https://notehub.org/rcfdu.



My target is : RTSP source -> transcode to RTMP -> recieve on nginx (live ip),



Then, I want to receive this stream through server ; something like :



nginx -> ffplay.



On transmission side, I have ffmpeg application, and on receiver side, I have ffplay application.



I have setup everything I could think of, and I can see it is properly setup (apparently). But, when I try to stream using similar command :



ffmpeg -i rtsp://aaa.bb.ccc.ddd/vod/mp4:filename.mov -f mpegts rtmp://<live ip="ip" address="address">:1935/live/
</live>



I get lots of messages (where everything looks alright) :



ffmpeg -i rtsp://aaa.bb.ccc.ddd/vod/mp4:filename.mov -f mpegts rtmp://<live ip="ip" address="address">:1935/live/
ffmpeg version N-80386-g5f5a97d Copyright (c) 2000-2016 the FFmpeg developers
 built with gcc 5.4.0 (GCC)
 configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-nv
enc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enabl
e-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --en
able-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libil
bc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-
amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-li
bspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo
-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libweb
p --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-l
ibzimg --enable-lzma --enable-decklink --enable-zlib
 libavutil 55. 24.100 / 55. 24.100
 libavcodec 57. 46.100 / 57. 46.100
 libavformat 57. 38.100 / 57. 38.100
 libavdevice 57. 0.101 / 57. 0.101
 libavfilter 6. 46.101 / 6. 46.101
 libswscale 4. 1.100 / 4. 1.100
 libswresample 2. 1.100 / 2. 1.100
 libpostproc 54. 0.100 / 54. 0.100
[rtsp @ 03087ca0] UDP timeout, retrying with TCP
Input #0, rtsp, from 'rtsp://aaa.bb.ccc.ddd/vod/mp4:filename.mov':
 Metadata:
 title : filename.mov
 Duration: 00:09:56.46, start: 0.000000, bitrate: N/A
 Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp
 Stream #0:1: Video: h264 (Constrained Baseline), yuv420p, 240x160, 24 fps, 4
8 tbr, 90k tbn, 48 tbc
[mpegts @ 04d033a0] Using AVStream.codec to pass codec parameters to muxers is d
eprecated, use AVStream.codecpar instead.
 Last message repeated 1 times
Output #0, mpegts, to 'rtmp://<live ip="ip" address="address">:1935/live/':
 Metadata:
 title : filename.mov
 encoder : Lavf57.38.100
 Stream #0:0: Video: mpeg2video (Main), yuv420p, 240x160, q=2-31, 200 kb/s, 2
4 fps, 90k tbn, 24 tbc
 Metadata:
 encoder : Lavc57.46.100 mpeg2video
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
 Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
 Metadata:
 encoder : Lavc57.46.100 mp2
Stream mapping:
 Stream #0:1 -> #0:0 (h264 (native) -> mpeg2video (native))
 Stream #0:0 -> #0:1 (aac (native) -> mp2 (native))
Press [q] to stop, [?] for help
Past duration 0.999992 too large
 Last message repeated 4 times
frame= 85 fps=0.0 q=2.9 size= 322kB time=00:00:03.85 bitrate= 684.4kbits/s
frame= 95 fps= 94 q=3.5 size= 366kB time=00:00:04.28 bitrate= 698.9kbits/s
frame= 108 fps= 71 q=3.7 size= 421kB time=00:00:04.79 bitrate= 719.9kbits/s
frame= 122 fps= 61 q=4.1 size= 478kB time=00:00:05.34 bitrate= 733.1kbits/s
frame= 134 fps= 53 q=4.5 size= 527kB time=00:00:05.87 bitrate= 735.8kbits/s
frame= 146 fps= 48 q=5.2 size= 579kB time=00:00:06.35 bitrate= 747.2kbits/s
frame= 159 fps= 45 q=5.5 size= 632kB time=00:00:06.88 bitrate= 751.9kbits/s
frame= 171 fps= 42 q=5.3 size= 677kB time=00:00:07.38 bitrate= 751.5kbits/s
frame= 183 fps= 40 q=5.6 size= 725kB time=00:00:07.91 bitrate= 750.8kbits/s
frame= 193 fps= 38 q=6.3 size= 765kB time=00:00:08.34 bitrate= 750.7kbits/s
frame= 207 fps= 37 q=6.6 size= 820kB time=00:00:08.89 bitrate= 755.2kbits/s
frame= 219 fps= 36 q=6.6 size= 865kB time=00:00:09.40 bitrate= 754.2kbits/s
frame= 231 fps= 35 q=7.2 size= 911kB time=00:00:09.90 bitrate= 753.6kbits/s
frame= 243 fps= 34 q=7.4 size= 959kB time=00:00:10.40 bitrate= 754.6kbits/s
frame= 255 fps= 34 q=6.7 size= 1002kB time=00:00:10.91 bitrate= 752.1kbits/s
frame= 267 fps= 33 q=5.5 size= 1047kB time=00:00:11.41 bitrate= 751.4kbits/s
frame= 279 fps= 33 q=4.6 size= 1088kB time=00:00:11.89 bitrate= 749.1kbits/s
frame= 291 fps= 32 q=6.1 size= 1140kB time=00:00:12.42 bitrate= 751.4kbits/s
frame= 301 fps= 31 q=6.7 size= 1181kB time=00:00:12.85 bitrate= 752.5kbits/s
frame= 314 fps= 31 q=6.6 size= 1231kB time=00:00:13.40 bitrate= 752.1kbits/s
frame= 325 fps= 31 q=7.0 size= 1275kB time=00:00:13.86 bitrate= 753.0kbits/s
frame= 338 fps= 30 q=6.7 size= 1324kB time=00:00:14.36 bitrate= 754.8kbits/s
frame= 349 fps= 30 q=6.5 size= 1368kB time=00:00:14.87 bitrate= 753.5kbits/s
frame= 362 fps= 30 q=6.8 size= 1415kB time=00:00:15.37 bitrate= 753.9kbits/s
frame= 373 fps= 30 q=6.2 size= 1457kB time=00:00:15.88 bitrate= 751.7kbits/s
frame= 387 fps= 30 q=3.8 size= 1506kB time=00:00:16.45 bitrate= 749.7kbits/s
frame= 400 fps= 29 q=4.1 size= 1549kB time=00:00:16.96 bitrate= 748.2kbits/s
frame= 415 fps= 29 q=5.4 size= 1597kB time=00:00:17.56 bitrate= 744.9kbits/s
frame= 427 fps= 29 q=5.2 size= 1639kB time=00:00:18.04 bitrate= 744.1kbits/s
frame= 439 fps= 29 q=4.4 size= 1679kB time=00:00:18.56 bitrate= 740.6kbits/s
frame= 451 fps= 29 q=3.6 size= 1717kB time=00:00:19.07 bitrate= 737.4kbits/s
frame= 464 fps= 28 q=2.6 size= 1761kB time=00:00:19.67 bitrate= 733.2kbits/s
frame= 475 fps= 28 q=7.0 size= 1799kB time=00:00:20.08 bitrate= 734.0kbits/s
frame= 488 fps= 28 q=8.3 size= 1847kB time=00:00:20.70 bitrate= 730.8kbits/s
frame= 502 fps= 28 q=5.9 size= 1895kB time=00:00:21.25 bitrate= 730.2kbits/s
frame= 515 fps= 28 q=3.3 size= 1935kB time=00:00:21.76 bitrate= 728.5kbits/s
frame= 528 fps= 28 q=2.5 size= 1976kB time=00:00:22.31 bitrate= 725.6kbits/s
frame= 540 fps= 28 q=3.4 size= 2017kB time=00:00:22.81 bitrate= 724.2kbits/s
frame= 553 fps= 28 q=6.2 size= 2072kB time=00:00:23.36 bitrate= 726.2kbits/s
frame= 568 fps= 28 q=6.7 size= 2132kB time=00:00:23.94 bitrate= 729.3kbits/s
frame= 580 fps= 28 q=6.8 size= 2174kB time=00:00:24.42 bitrate= 729.3kbits/s
frame= 592 fps= 27 q=6.8 size= 2219kB time=00:00:24.92 bitrate= 729.3kbits/s
frame= 604 fps= 27 q=7.4 size= 2263kB time=00:00:25.43 bitrate= 728.8kbits/s
frame= 615 fps= 27 q=6.1 size= 2305kB time=00:00:25.93 bitrate= 727.9kbits/s
frame= 626 fps= 27 q=7.4 size= 2339kB time=00:00:26.36 bitrate= 726.5kbits/s
frame= 638 fps= 27 q=6.8 size= 2383kB time=00:00:26.89 bitrate= 725.8kbits/s
frame= 651 fps= 27 q=5.8 size= 2436kB time=00:00:27.47 bitrate= 726.5kbits/s
frame= 662 fps= 27 q=7.0 size= 2471kB time=00:00:27.90 bitrate= 725.4kbits/s
frame= 675 fps= 27 q=5.9 size= 2523kB time=00:00:28.40 bitrate= 727.6kbits/s
frame= 679 fps= 26 q=6.8 size= 2534kB time=00:00:28.57 bitrate= 726.5kbits/s
frame= 703 fps= 27 q=8.0 size= 2622kB time=00:00:29.58 bitrate= 726.1kbits/s
frame= 714 fps= 27 q=7.6 size= 2662kB time=00:00:30.08 bitrate= 724.7kbits/s
frame= 729 fps= 27 q=6.5 size= 2712kB time=00:00:30.68 bitrate= 724.0kbits/s
frame= 741 fps= 27 q=7.0 size= 2753kB time=00:00:31.14 bitrate= 724.1kbits/s
frame= 755 fps= 27 q=7.5 size= 2801kB time=00:00:31.76 bitrate= 722.2kbits/s
frame= 767 fps= 26 q=7.2 size= 2842kB time=00:00:32.27 bitrate= 721.5kbits/s
frame= 779 fps= 26 q=6.8 size= 2881kB time=00:00:32.77 bitrate= 720.0kbits/s
frame= 791 fps= 26 q=8.2 size= 2922kB time=00:00:33.30 bitrate= 718.8kbits/s
frame= 803 fps= 26 q=7.0 size= 2961kB time=00:00:33.76 bitrate= 718.4kbits/s
frame= 816 fps= 26 q=6.6 size= 3003kB time=00:00:34.33 bitrate= 716.4kbits/s
frame= 828 fps= 26 q=6.4 size= 3044kB time=00:00:34.84 bitrate= 715.7kbits/s
frame= 840 fps= 26 q=7.5 size= 3084kB time=00:00:35.34 bitrate= 714.7kbits/s
frame= 855 fps= 26 q=5.0 size= 3137kB time=00:00:35.94 bitrate= 714.8kbits/s
frame= 866 fps= 26 q=6.2 size= 3169kB time=00:00:36.40 bitrate= 713.3kbits/s
frame= 880 fps= 26 q=5.9 size= 3219kB time=00:00:36.95 bitrate= 713.6kbits/s
frame= 892 fps= 26 q=6.8 size= 3259kB time=00:00:37.43 bitrate= 713.2kbits/s
frame= 904 fps= 26 q=5.3 size= 3300kB time=00:00:37.96 bitrate= 712.2kbits/s
frame= 916 fps= 26 q=5.5 size= 3338kB time=00:00:38.46 bitrate= 711.0kbits/s
frame= 928 fps= 26 q=5.5 size= 3377kB time=00:00:38.94 bitrate= 710.4kbits/s
frame= 941 fps= 26 q=6.4 size= 3422kB time=00:00:39.52 bitrate= 709.4kbits/s
frame= 953 fps= 26 q=5.4 size= 3460kB time=00:00:40.00 bitrate= 708.6kbits/s
frame= 967 fps= 26 q=5.2 size= 3506kB time=00:00:40.60 bitrate= 707.3kbits/s
frame= 979 fps= 26 q=4.8 size= 3546kB time=00:00:41.12 bitrate= 706.2kbits/s
frame= 985 fps= 26 q=5.2 size= 3563kB time=00:00:41.36 bitrate= 705.6kbits/s
frame= 1008 fps= 26 q=4.8 size= 3639kB time=00:00:42.30 bitrate= 704.6kbits/s
frame= 1022 fps= 26 q=4.3 size= 3684kB time=00:00:42.88 bitrate= 703.7kbits/s
frame= 1034 fps= 26 q=4.5 size= 3723kB time=00:00:43.38 bitrate= 702.9kbits/s
frame= 1046 fps= 26 q=3.8 size= 3763kB time=00:00:43.88 bitrate= 702.5kbits/s
frame= 1056 fps= 26 q=5.3 size= 3800kB time=00:00:44.32 bitrate= 702.3kbits/s
frame= 1069 fps= 26 q=5.5 size= 3842kB time=00:00:44.84 bitrate= 701.8kbits/s
frame= 1081 fps= 26 q=6.3 size= 3883kB time=00:00:45.35 bitrate= 701.3kbits/s
frame= 1093 fps= 26 q=6.3 size= 3925kB time=00:00:45.85 bitrate= 701.1kbits/s
frame= 1105 fps= 26 q=5.3 size= 3964kB time=00:00:46.36 bitrate= 700.5kbits/s
frame= 1117 fps= 26 q=6.7 size= 4006kB time=00:00:46.86 bitrate= 700.3kbits/s
frame= 1129 fps= 26 q=4.5 size= 4046kB time=00:00:47.32 bitrate= 700.4kbits/s
frame= 1141 fps= 26 q=7.1 size= 4089kB time=00:00:47.87 bitrate= 699.8kbits/s
Larger timestamp than 24-bit: 0x310042f0
WriteN, RTMP send error 10054 (133 bytes)
WriteN, RTMP send error 10054 (35 bytes)
WriteN, RTMP send error 10038 (42 bytes)
av_interleaved_write_frame(): Operation not permitted
Error writing trailer of rtmp://<live ip="ip" address="address">:1935/live/: Operation not permitte
dframe= 1143 fps= 25 q=8.1 Lsize= 4109kB time=00:00:47.92 bitrate= 702.5kbits
/s dup=0 drop=5 speed=1.07x
video:1343kB audio:2248kB subtitle:0kB other streams:0kB global headers:0kB muxi
ng overhead: 14.429363%
Conversion failed!
</live></live></live>



but in the end, I get this error :



WriteN, RTMP send error 10054 (133 bytes)
WriteN, RTMP send error 10054 (35 bytes)
WriteN, RTMP send error 10038 (42 bytes)
av_interleaved_write_frame(): Operation not permitted
Error writing trailer of rtmp://<live ip="ip" address="address">:1935/live/: Operation not permitte
dframe= 1143 fps= 25 q=8.1 Lsize= 4109kB time=00:00:47.92 bitrate= 702.5kbits
/s dup=0 drop=5 speed=1.07x
video:1343kB audio:2248kB subtitle:0kB other streams:0kB global headers:0kB muxi
ng overhead: 14.429363%
Conversion failed!
</live>



On the receiver side (where ffplay is running), I always get this error :



RTMP_ReadPacket, failed to read RTMP packet headersq= 0B f=0/0
 rtmp://<live ip="ip" address="address">:1935/live/: Invalid data found when processing input
</live>



Detailed output :



ffplay rtmp://<live ip="ip" address="address">:1935/live/
ffplay version N-80386-g5f5a97d Copyright (c) 2003-2016 the FFmpeg developers
 built with gcc 5.4.0 (GCC)
 configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-nv
enc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enabl
e-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --en
able-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libil
bc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-
amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-li
bspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo
-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libweb
p --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-l
ibzimg --enable-lzma --enable-decklink --enable-zlib
 libavutil 55. 24.100 / 55. 24.100
 libavcodec 57. 46.100 / 57. 46.100
 libavformat 57. 38.100 / 57. 38.100
 libavdevice 57. 0.101 / 57. 0.101
 libavfilter 6. 46.101 / 6. 46.101
 libswscale 4. 1.100 / 4. 1.100
 libswresample 2. 1.100 / 2. 1.100
 libpostproc 54. 0.100 / 54. 0.100
RTMP_ReadPacket, failed to read RTMP packet headersq= 0B f=0/0
rtmp://<live ip="ip" address="address">:1935/live/: Invalid data found when processing input
</live></live>



and if I enable debug mode, this is the receiving side log :



ffplay -loglevel debug rtmp://<live ip="ip" address="address">:1935/live/
ffplay version N-80386-g5f5a97d Copyright (c) 2003-2016 the FFmpeg developers
 built with gcc 5.4.0 (GCC)
 configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-nv
enc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enabl
e-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --en
able-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libil
bc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-
amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-li
bspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo
-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libweb
p --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-l
ibzimg --enable-lzma --enable-decklink --enable-zlib
 libavutil 55. 24.100 / 55. 24.100
 libavcodec 57. 46.100 / 57. 46.100
 libavformat 57. 38.100 / 57. 38.100
 libavdevice 57. 0.101 / 57. 0.101
 libavfilter 6. 46.101 / 6. 46.101
 libswscale 4. 1.100 / 4. 1.100
 libswresample 2. 1.100 / 2. 1.100
 libpostproc 54. 0.100 / 54. 0.100
[rtmp @ 0310d800] No default whitelist set 0KB sq= 0B f=0/0
Parsing... : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
Parsed protocol: 0
Parsed host : <live ip="ip" address="address">
Parsed app : live
RTMP_Connect1, ... connected, handshaking= 0KB sq= 0B f=0/0
HandShake: Type Answer : 03q= 0KB vq= 0KB sq= 0B f=0/0
HandShake: Server Uptime : 324510454
HandShake: FMS Version : 0.0.0.0
HandShake: Handshaking finished....0KB vq= 0KB sq= 0B f=0/0
RTMP_Connect1, handshaked
RTMP_SendPacket: fd=648, size=174
 0000: 03 00 00 00 00 00 ae 14 00 00 00 00 ............
 0000: 02 00 07 63 6f 6e 6e 65 63 74 00 3f f0 00 00 00 ...connect.?....
 0010: 00 00 00 03 00 03 61 70 70 02 00 04 6c 69 76 65 ......app...live
 0020: 00 05 74 63 55 72 6c 02 00 1e 72 74 6d 70 3a 2f ..tcUrl...rtmp:/
 0030: 2f 36 34 2e 34 39 2e 32 33 34 2e 32 35 30 3a 31 /<live ip="ip" address="address">:1
 0040: 39 33 35 2f 6c 69 76 65 00 04 66 70 61 64 01 00 935/live..fpad..
 0050: 00 0c 63 61 70 61 62 69 6c 69 74 69 65 73 00 40 ..capabilities.@
 0060: 2e 00 00 00 00 00 00 00 0b 61 75 64 69 6f 43 6f .........audioCo
 0070: 64 65 63 73 00 40 a8 ee 00 00 00 00 00 00 0b 76 decs.@.........v
 0000: c3 .
 0000: 69 64 65 6f 43 6f 64 65 63 73 00 40 6f 80 00 00 ideoCodecs.@o...
 0010: 00 00 00 00 0d 76 69 64 65 6f 46 75 6e 63 74 69 .....videoFuncti
 0020: 6f 6e 00 3f f0 00 00 00 00 00 00 00 00 09 on.?..........
Invoking connect
RTMP_ReadPacket: fd=648
 0000: 02 00 00 00 00 00 04 05 00 00 00 00 ............
 0000: 00 4c 4b 40 .LK@
HandleServerBW: server BW = 5000000
RTMP_ReadPacket: fd=648
 0000: 02 00 00 00 00 00 05 06 00 00 00 00 ............
 0000: 00 4c 4b 40 02 .LK@.
HandleClientBW: client BW = 5000000 2
RTMP_ReadPacket: fd=648
 0000: 02 00 00 00 00 00 04 01 00 00 00 00 ............
 0000: 00 00 10 00 ....
HandleChangeChunkSize, received: chunk size change to 4096
RTMP_ReadPacket: fd=648
 0000: 03 00 00 00 00 00 be 14 00 00 00 00 ............
 0000: 02 00 07 5f 72 65 73 75 6c 74 00 3f f0 00 00 00 ..._result.?....
 0010: 00 00 00 03 00 06 66 6d 73 56 65 72 02 00 0d 46 ......fmsVer...F
 0020: 4d 53 2f 33 2c 30 2c 31 2c 31 32 33 00 0c 63 61 MS/3,0,1,123..ca
 0030: 70 61 62 69 6c 69 74 69 65 73 00 40 3f 00 00 00 pabilities.@?...
 0040: 00 00 00 00 00 09 03 00 05 6c 65 76 65 6c 02 00 .........level..
 0050: 06 73 74 61 74 75 73 00 04 63 6f 64 65 02 00 1d .status..code...
 0060: 4e 65 74 43 6f 6e 6e 65 63 74 69 6f 6e 2e 43 6f NetConnection.Co
 0070: 6e 6e 65 63 74 2e 53 75 63 63 65 73 73 00 0b 64 nnect.Success..d
 0080: 65 73 63 72 69 70 74 69 6f 6e 02 00 15 43 6f 6e escription...Con
 0090: 6e 65 63 74 69 6f 6e 20 73 75 63 63 65 65 64 65 nection succeede
 00a0: 64 2e 00 0e 6f 62 6a 65 63 74 45 6e 63 6f 64 69 d...objectEncodi
 00b0: 6e 67 00 00 00 00 00 00 00 00 00 00 00 09 ng............
RTMP_ClientPacket, received: invoke 190 bytes
(object begin)
Property: 
Property: 
Property: 
(object begin)
Property: 3,0,1,123>
Property: 
(object end)
Property: 
(object begin)
Property: 
Property: 
Property: 
Property: 
(object end)
(object end)
HandleInvoke, server invoking <_result>
HandleInvoke, received result for method call <connect> 0B f=0/0
RTMP_SendPacket: fd=648, size=4
 0000: 02 00 00 00 00 00 04 05 00 00 00 00 ............
 0000: 00 4c 4b 40 .LK@
sending ctrl. type: 0x0003
RTMP_SendPacket: fd=648, size=10
 0000: 42 00 00 00 00 00 0a 04 B.......
 0000: 00 03 00 00 00 00 00 00 01 2c .........,
RTMP_SendPacket: fd=648, size=25
 0000: 43 00 00 00 00 00 19 14 C.......
 0000: 02 00 0c 63 72 65 61 74 65 53 74 72 65 61 6d 00 ...createStream.
 0010: 40 00 00 00 00 00 00 00 05 @........
Invoking createStream
RTMP_ReadPacket: fd=648
 0000: 03 00 00 00 00 00 1d 14 00 00 00 00 ............
 0000: 02 00 07 5f 72 65 73 75 6c 74 00 40 00 00 00 00 ..._result.@....
 0010: 00 00 00 05 00 3f f0 00 00 00 00 00 00 .....?.......
RTMP_ClientPacket, received: invoke 29 bytes
(object begin)
Property: 
Property: 
Property: NULL
Property: 
(object end)
HandleInvoke, server invoking <_result>
HandleInvoke, received result for method call <createstream>
SendPlay, seekTime=0, stopTime=0, sending play: (null)
RTMP_SendPacket: fd=648, size=29
 0000: 08 00 00 00 00 00 1d 14 01 00 00 00 ............
 0000: 02 00 04 70 6c 61 79 00 40 08 00 00 00 00 00 00 ...play.@.......
 0010: 05 02 00 00 00 00 00 00 00 00 00 00 00 .............
Invoking play 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
sending ctrl. type: 0x0003
RTMP_SendPacket: fd=648, size=10
 0000: c2 .
 0000: 00 03 00 00 00 01 00 00 0b b8 ..........
RTMP_ReadPacket: fd=648
 0000: 05 00 00 00 00 00 60 14 01 00 00 00 ......`.....
 0000: 02 00 08 6f 6e 53 74 61 74 75 73 00 00 00 00 00 ...onStatus.....
 0010: 00 00 00 00 05 03 00 05 6c 65 76 65 6c 02 00 06 ........level...
 0020: 73 74 61 74 75 73 00 04 63 6f 64 65 02 00 14 4e status..code...N
 0030: 65 74 53 74 72 65 61 6d 2e 50 6c 61 79 2e 53 74 etStream.Play.St
 0040: 61 72 74 00 0b 64 65 73 63 72 69 70 74 69 6f 6e art..description
 0050: 02 00 0a 53 74 61 72 74 20 6c 69 76 65 00 00 09 ...Start live...
RTMP_ClientPacket, received: invoke 96 bytes
(object begin)
Property: 
Property: 
Property: NULL
Property: 
(object begin)
Property: 
Property: 
Property: 
(object end)
(object end)
HandleInvoke, server invoking <onstatus>
HandleInvoke, onStatus: NetStream.Play.Start
RTMP_ReadPacket: fd=648
 0000: 05 00 00 00 00 00 18 12 01 00 00 00 ............
 0000: 02 00 11 7c 52 74 6d 70 53 61 6d 70 6c 65 41 63 ...|RtmpSampleAc
 0010: 63 65 73 73 01 01 01 01 cess....
RTMP_ClientPacket, received: notify 24 bytes
(object begin)
Property: 
Property: nan : 0.000 fd= 0
 aq= 0KB vq= 0KB sq= 0B f=0/0
Property: 
(object end)
RTMP_ReadPacket: fd=648
RTMPSockBuf_Fill, recv returned -1. GetSockError(): 10060 (Unknown error)
RTMP_ReadPacket, failed to read RTMP packet header
[AVIOContext @ 04c81be0] Statistics: 0 bytes read, 0 seeks
RTMP_SendPacket: fd=648, size=34
 0000: 43 00 00 00 00 00 22 14 C.....".
 0000: 02 00 0c 64 65 6c 65 74 65 53 74 72 65 61 6d 00 ...deleteStream.
 0010: 40 10 00 00 00 00 00 00 05 00 3f f0 00 00 00 00 @.........?.....
 0020: 00 00 ..
Invoking deleteStreamd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
rtmp://<live ip="ip" address="address">:1935/live/: Invalid data found when processing input
</live></onstatus></createstream></connect></live></live></live>



By the way, this is my server config file ( /etc/nginx/nginx.conf )



#user nobody;
worker_processes 4;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;


events {
 worker_connections 1024;
}


http {
 include mime.types;
 default_type application/octet-stream;

 #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
 # '$status $body_bytes_sent "$http_referer" '
 # '"$http_user_agent" "$http_x_forwarded_for"';

 #access_log logs/access.log main;

 sendfile on;
 #tcp_nopush on;

 #keepalive_timeout 0;
 keepalive_timeout 65;

 #gzip on;

 server {
 listen 80;
 server_name localhost;

 #charset koi8-r;

 #access_log logs/host.access.log main;

 location / {
 root html;
 index index.html index.htm;
 }

 #error_page 404 /404.html;

 # redirect server error pages to the static page /50x.html
 #
 error_page 500 502 503 504 /50x.html;
 location = /50x.html {
 root html;
 }

 # proxy the PHP scripts to Apache listening on 127.0.0.1:80
 #
 #location ~ \.php$ {
 # proxy_pass http://127.0.0.1;
 #}

 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
 #
 #location ~ \.php$ {
 # root html;
 # fastcgi_pass 127.0.0.1:9000;
 # fastcgi_index index.php;
 # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
 # include fastcgi_params;
 #}

 # deny access to .htaccess files, if Apache's document root
 # concurs with nginx's one
 #
 #location ~ /\.ht {
 # deny all;
 #}
 }


 # another virtual host using mix of IP-, name-, and port-based configuration
 #
 #server {
 # listen 8000;
 # listen somename:8080;
 # server_name somename alias another.alias;

 # location / {
 # root html;
 # index index.html index.htm;
 # }
 #}


 # HTTPS server
 #
 #server {
 # listen 443 ssl;
 # server_name localhost;

 # ssl_certificate cert.pem;
 # ssl_certificate_key cert.key;

 # ssl_session_cache shared:SSL:1m;
 # ssl_session_timeout 5m;

 # ssl_ciphers HIGH:!aNULL:!MD5;
 # ssl_prefer_server_ciphers on;

 # location / {
 # root html;
 # index index.html index.htm;
 # }
 #}

}
rtmp {
 server {
 listen 1935;
 chunk_size 4096;

 application live {
 live on;
 record off;
 }
 }
}




I can telnet into both port 80 and 1935, and made sure port 1935 is open as input and output in iptables...



-A INPUT -m state --state NEW -m tcp -p tcp --dport 1935 -j ACCEPT
-A OUTPUT -m state --state NEW -m tcp -p tcp --dport 1935 -j ACCEPT




but nothing works.



Can anyone help in this regards ?