
Recherche avancée
Autres articles (106)
-
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 (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Pas question de marché, de cloud etc...
10 avril 2011Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
sur le web 2.0 et dans les entreprises qui en vivent.
Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)
Sur d’autres sites (12864)
-
QML multimedia cannot play m3u8 that is generated with ffmpeg
5 juin 2023, par LeXela-EDWith the following command, I am trying to stream an IP camera over web :


ffmpeg -re -i "rtsp://<user>:<password>@<ip>:<port>" -c:v copy -c:a copy -hls_segment_type mpegts -hls_list_size 5 -hls_wrap 5 -hls_time 2 -hls_flags split_by_time -segment_time_delta 1.00 -reset_timestamps 1 -hls_allow_cache 0 -movflags faststart live.m3u8```
</port></ip></password></user>


This command, produces live.m3u8 and five ts files : live0.ts, live1.ts, live2.ts, live3.ts, and live4. And conversion goes smoothly. At some random point, the content of live.m3u8 is as follows :


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:2
#EXT-X-MEDIA-SEQUENCE:92
#EXTINF:2.000000,
live2.ts
#EXTINF:2.000000,
live3.ts
#EXTINF:2.035800,
live4.ts
#EXTINF:2.000000,
live0.ts
#EXTINF:1.963278,
live1.ts



However, when I tried to play live.m3u8 with the following QML code, it only played a very first segments of it :


import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtMultimedia 5.15

Window
{
 width: 640
 height: 480
 visible: true

 Item
 {
 anchors.fill: parent

 MediaPlayer
 {
 id: mediaplayer
 source: "path-to-live/live.m3u8"
 videoOutput: videoOutput
 }

 VideoOutput
 {
 id: videoOutput
 anchors.fill: parent
 }

 MouseArea
 {
 anchors.fill: parent
 onPressed: mediaplayer.play();
 }
 }
}




The interesting thing is : I manually deleted live.m3u8, and obviously, ffmpeg generated another one after ! Then I clicked on the QML program window, and surprisingly, it played the stream nonstop as it was expected at the first run !


What is the problem here ? What I am missing ? Should I change the ffmpeg command or do something with my qml code ? Any idea or help ?


Thank you in advance.


-
Play h.264 video stream in html page
12 juin 2017, par e2l3nI am using ffmpeg and vlc on linux to produce MPEG transport stream (
mpegts
) over HTTP. Basicallyffmpeg
captures the screen and producesh.264
stream usingmpegts
and thenvlc
is used as a server that delivers the stream overhttp
. That’s how I manage to accomplish this.ffmpeg -f x11grab -s 1280x800 -r 30 -i :0.0+0,0 -f alsa -ac 2 -i pulse -vcodec libx264 -preset ultrafast -s 1280x800 -threads 0 -f mpegts - | vlc -I dummy - --sout '#std{access=http,mux=ts,dst=:3030}
And some useful log about the resulting stream :
Output #0, mpegts, to 'pipe:':
Metadata:
encoder : Lavf57.72.101
Stream #0:0: Video: h264 (libx264), yuv444p(progressive), 1280x800, q=-1--1, 30 fps, 90k tbn, 30 tbc
Metadata:
encoder : Lavc57.96.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
Metadata:
encoder : Lavc57.96.101 mp2All looks good except for that I am unable to play the stream in a HTML page. Could someone point me at some solution to either render the stream in HTML page or change the stream type so that it gets rendered.
Thank you in advance !EDIT :
I’ve noticed something weird. The<video></video>
fails to play mp4 files on Firefox (51.0.1) for Ubuntu (I have also tested on Windows 8 with Chrome).
I simply useffmpeg
to record screen for 10 seconds and produce .mp4 video (see below).ffmpeg -video_size 1280x800 -framerate 25 -f x11grab -i :0.0+0,0 -t 00:00:10 ~/Workspace/videostream/output.mp4
And then play the output.mp4 video with the following snippet.
<video width="480" height="320" controls="controls">
<source src="output.mp4" type="video/mp4">
</source></video>This simply does not play although I can open the video with any other media player. The media info (using MediaInfo, v0.7.96) of the
output.mp4
file is :GENERAL: MPEG-4 (Base Media): 1.007 MiB, 10s 0ms; 1 Video stream: AVC; Overall bit rate: 825 Kbps; Writing application: Lavf57.72.101
VIDEO: 2 343 Kbps, 1280*800(16:10), at 25.000 fps, MPEG Video (Version 2) (Main@High 1440)However, if I replace the
output.mp4
with any other.mp4
file, it does play in Firefox. So, this leads me to conclude that it is not a browser issue but something with the way I exploitffmpeg
. Below is the media info of a proper.mp4
file that successfully runs in the browser.GENERAL: MPEG-4 (Base Media/Version 2): 48.4 MiB, 2mn 50s; 1 Video stream: AVC; 1 Audio stream: AAC; Overall bit mode rate: Variable; Overall bit rate: 2 385 Kbps;
VIDEO: 2 256 Kbps, 1280*720(16:9), at 25.000 fps, AVC (Main@L3.1) (CABAC / 3 Ref Frames); ISO media produced by Google Inc.
AUDIO:
126 Kbps, 44.1 KHz, 2 channels, AAC (LC), ISO media produced by Google Inc.And here is the media info of the output file that results from redirecting the h.264 mpegts stream using the
ffmpeg
command with -pix_fmt yuv420p./ffmpeg -t 00:00:10 -f x11grab -s 1280x800 -r 30 -i :0.0+0,0 -pix_fmt yuv420p -vcodec libx264 -preset ultrafast -s 1280x800 -threads 0 -f mpegts - > ~/Workspace/file.ts
:GENERAL: MPEG-TS: 2.93 MiB, 9s 960ms; 1 Video stream: MPEG Video; 1 Menu stream: MPEG Video; Overall bit rate mode: Variable; Overall bit rate: 2 465 Kbps;
VIDEO: 2 343 Kbps, 1280*800(16:10), at 25.000 fps, MPEG Video (Version 2) (Main@High 1440) -
ffplay does not play an RTMP stream on VM with Ubuntu
7 novembre 2020, par PiotrKuleszaI am trying to run my RTMP stream on a VM with Ubuntu installed. The stream starts on the host computer from the obs program.


Obs stream settings :


Server: rtmp://192.168.56.102:1935/show
Stream key: stream



Obs sends the stream to the nginx server on the VM with Ubuntu installed.


RTMP configuration in nginx.conf


rtmp {
 server {
 listen 1935; # Listen on standard RTMP port
 chunk_size 4000;

 application show {
 live on;
 # Turn on HLS
 hls on;
 hls_path /mnt/hls/;
 hls_fragment 3;
 hls_playlist_length 60;
 # disable consuming the stream from nginx as rtmp
 deny play all;
 }
 }
}



When I start the stream it connects because it shows up in
netstat
.

Output from netstat :


Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State 
tcp 0 0 webapp-VirtualBox:1935 192.168.56.1:56924 ESTABLISHED



But when I try to play stream with ffplay, it doesn't work. I am getting the following error.


ffplay version 4.2.4-1ubuntu0.1 Copyright (c) 2003-2020 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
 configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
rtmp://192.168.56.102:1935/show/stream: Broken pipeq= 0B f=0/0 



I have tried the following commands to play a stream but each one gives the same error.


ffplay -i rtmp://192.168.56.102:1935/show/stream
ffplay -i rtmp://webapp-VirtualBox:1935/show/stream
ffplay -i rtmp://localhost:1935/show/stream



I also tried VLC but this program also didn't work.
Can anyone tell me what I am doing wrong or forgot to play this stream ?