
Recherche avancée
Autres articles (111)
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
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 (...) -
Le plugin : Gestion de la mutualisation
2 mars 2010, parLe plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
Installation basique
On installe les fichiers de SPIP sur le serveur.
On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
< ?php (...)
Sur d’autres sites (4604)
-
hls fails to play m3u8 playlist with videojs
9 novembre 2020, par charlieI created an hls stream from yuv frames with ffmpeg which appears to work just fine. It creates a playlist and updates that, and all .ts files as expected. However even videojs refuses to play it, and I really run out of ideas, probably missing the obvious ?


First, the m3u8 list which is continuously updated :


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:2
#EXT-X-MEDIA-SEQUENCE:190
#EXTINF:2.000000,
test190.ts
#EXTINF:2.000000,
test191.ts
#EXTINF:2.000000,
test192.ts
#EXTINF:2.000000,
test193.ts
#EXTINF:2.000000,
test194.ts



Those .ts files exist and have sizes of approx 250 kBytes.
Then, I open this standard videojs html file (residing in the same directory) :








 


 <h1>VSTream</h1>

 
 <source src="test.m3u8" type="application/x-mpegURL">
 
 
 <code class="echappe-js"><script src='http://stackoverflow.com/feeds/tag/video.min.js'></script>

<script src='http://stackoverflow.com/feeds/tag/videojs-http-streaming.min.js'></script>

 
<script>&#xA; var player = videojs(&#x27;my_video_1&#x27;);&#xA; </script>

 




I open this in Firefox (or Chrome, or Edge, none works) and use its debugger which in the console shows :




VIDEOJS : WARN : A plugin named "reloadSourceOnError" already exists.
You may want to avoid re-registering plugins ! video.min.js:12:977
Specified “type” attribute of “application/x-mpegURL” is not
supported. Load of media resource test.m3u8 failed. vstream.html All
candidate resources failed to load. Media load paused. vstream.html
XML Parsing Error : syntax error Location : file :///C :/test/test.m3u8
Line Number 1, Column 1 : 2 test.m3u8:1:1 MouseEvent.mozPressure is
deprecated. Use PointerEvent.pressure instead. video.min.js:12:9031
VIDEOJS : ERROR : (CODE:3 MEDIA_ERR_DECODE) Playback cannot continue. No
available working or supported playlists. Object code : 3, message :
"Playback cannot continue. No available working or supported
playlists." video.min.js:12:977




This doesn't make much sense to me. Why would it throw an XML parsing error for an m3u8 file ? Of course, the MEDIA_ERR_DECODE points in some direction, but the same problem persists with fMP4 files.


The relevant ffmpeg c++ code (format is "hls" and formatContext works well in other scenarios, gop is 2) :


AVDictionary* options = 0;
 if (fragmented)
 {
 // type
 if (codecID == AV_CODEC_ID_H264)
 av_dict_set (&options, "hls_segment_type", "fmp4", 0);
 else
 av_dict_set (&options, "hls_segment_type", "mpegts", 0);

 av_dict_set (&options, "hls_time", "2.0", 0);
 av_dict_set_int (&options, "hls_list_size", 5, 0);
 av_dict_set (&options, "hls_flags", "delete_segments", 0);
 }

 int ret = avformat_write_header (formatContext, &options);



...which returns success. Then writing frames


int ret = avcodec_send_frame (videoStream->codecContext, frame);
 av_init_packet (avPacket);
 AVRational timeBase = videoStream->getTimeBase ();
 avPacket->stream_index = streams.indexOf (videoStream);
 ret = avcodec_receive_packet (videoStream->codecContext, avPacket);
 avPacket->duration = av_rescale_q (1, videoStream->codecContext->time_base, videoStream->getTimeBase ());
 pts += avPacket->duration;
 avPacket->pts = pts;
 avPacket->dts = pts; // AV_NOPTS_VALUE;
 ret = av_interleaved_write_frame (formatContext, avPacket);



(videoStream here is an internal object representing the avstream).
I've omitted error checks for clarity. All return values show success.
Thanks for any help on this !


-
UWP C# and Windows Runtime Component C++ Permission Denied error when opening file
29 décembre 2020, par Surya SolankiI have developed a UWP app in C# which contains a Windows Runtime Component C++ project. the app allows the user to choose an mp4 file and passes this file to the c++ code, which then utilizes ffmpeg libraries to retrieve the presentation time stamps of a video file and output them to a file.


the issue i'm facing is that the c++ code is not able to open the mp4 file when using the
avformat_open_input
function :

int PTSExtraction::parse_file(Platform::String^ filename)
{
 int ret = 0;
 AVPacket pkt = { 0 };


 std::wstring fileNameW(filename->Begin());
 std::string fileNameA(fileNameW.begin(), fileNameW.end());
 const wchar_t* w_chars = fileNameW.c_str();
 src_filename = fileNameA.c_str(); 

 if (avformat_open_input(&fmt_ctx, src_filename, NULL, NULL) < 0) {
 fprintf(stderr, "Could not open source file %s\n", src_filename);
 return 1; 
 }
 // rest of code 
}



the error received by
avformat_open_input
isPermission Denied
. I cannot even open a random text file in this function by doing :

ofstream output; 
output.open("output.txt");



I realize there are file system permissions that are blocking the C++ component of my uwp app from opening files. here are the things i have tried so far :


- 

- i have enabled broadFileSystemAccess in the Package.appxmanifest (https://blogs.windows.com/windowsdeveloper/2018/05/18/console-uwp-applications-and-file-system-access/) - in the Capabilities section of the Package.appxmanifest file I've allowed access to Location, Pictures Library, and Videos Library.
- I've checked the File System Privacy Settings on my computer and enabled my app to access the File System.
- I've tried moving the mp4 file to various locations (Documents, Pictures Library, Videos Library) to see if the C++ component has access to these locations.
- I've tried the solution from this post : Qt WinRT App cannot access file permission denied.










None of these allow the C++ component to open any files. i would really appreciate if anyone has a solution for this problem.


-
How to record playable video files in gstreamer even if recording is interrupted unexpectedly (e.g. power disconnects) ?
16 septembre 2021, par Otter_warriorI have been recording video streams on my Jetson Xavier NX using a simple gstreamer pipeline such as this


gst-launch-1.0 -v \
nvarguscamerasrc sensor-id=0 ! \
'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! \
nvv4l2h265enc ! 'video/x-h265, stream-format=(string)byte-stream' ! \
h265parse ! qtmux ! filesink location=video.mp4 -e



All is working if the recording is interrupted by keyboard interrupt
Ctrl + C
, but if the recording is interrupted unexpectedly (e.g. power gets disconnected) the resulting file has no playable stream, even if the file size is correct.

I know that mp4 recording needs to be stopped properly otherwise it won't have the necessary information at the end of the file, but I was wondering if there was any other gstreamer pipelines or final file formats that would allow for an H265 encoded video file to be playable even if the recording is ended unexpectedly.


It would be good even if the recorded file needed to be converted before being playable (e.g. with ffmpeg), as long as the information can be recovered without having to go through non-free mp4 recovery tools.