
Recherche avancée
Médias (2)
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (49)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (6687)
-
PHP exec() function command finished but last function not execute
12 juin 2018, par NoeekaThe PHP file should execute FFmpeg command after this command finished it should take data into the database. However, I found that the
exec($command--FFmpeg)
has been completed and it run pretty well but the data is not in the database.I have set
php.ini ignore_user_abort = On
It could run the PHP process in the background
my could is as follows
set_time_limit(0);
$tumbfileName = time();
$filepath = dirname(dirname(dirname(__FILE__))) . "/files/video/";
$cmd = 'ffmpeg -i ' . dirname(dirname(dirname(__FILE__))).$content . ' -c:v libx264 -strict -2 ' . $filepath . "post_" . $tumbfileName . '.mp4';
exec($cmd, $output, $error);
$cmdImg="ffmpeg -y -ss 2 -i ".dirname(dirname(dirname(__FILE__))).$content." -vframes 1 -f image2 -s 400*300 ".$filepath . "notice_thumb_" . $tumbfileName . '.jpg';
//$cmdImg = "ffmpeg -i " . dirname(dirname(dirname(__FILE__))).$content . " -f image2 -ss 10 -s 400*300 -vframes 10 " . $filepath . "notice_thumb_" . $tumbfileName . '.jpg';
exec($cmdImg, $outputImg, $errorImg);
$data = array(
'content' => "/files/video/"."post_" . $tumbfileName . '.mp4',
'author' => 'management',
'deadline' => $deadline,
'type' => $type,
'datetime' => time(),
'thumb' => "/files/video/"."notice_thumb_" . $tumbfileName . '.jpg'
);
$flag = $this->db->insert('notice_info', $data); -
System.AccessViolationException on avcodec_open2 using FFMpeg.AutoGen
5 décembre 2024, par forlayoI am using FFMpeg.AutoGen (v6.0.0.2) with hwencode support for Nvidia cards, and in few devices (for example on NVIDIA GeForce MX350) when I am doing fffmpeg.avcodec_open2 I got the following ffmpeg message in logs :


[h264_nvenc @ 000001f473fcc480] OpenEncodeSessionEx failed: unsupported device (2): (no details)




And then it crashes with the following crash :


Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
 at FFmpeg.AutoGen.DynamicallyLoadedBindings+<>c.<initialize>b__2_494(FFmpeg.AutoGen.AVCodecContext*, FFmpeg.AutoGen.AVCodec*, FFmpeg.AutoGen.AVDictionary**)
 at FFmpeg.AutoGen.ffmpeg.avcodec_open2(FFmpeg.AutoGen.AVCodecContext*, FFmpeg.AutoGen.AVCodec*, FFmpeg.AutoGen.AVDictionary**)
 at GraphicsCheck.FfmpegChecker.StartEncoder(Omni.Platforms.Windows.Services.AV.CodecInfo, Int32, Int32, Int32)
 at GraphicsCheck.FfmpegChecker.CheckConfig(CodecConfig)
 at Program.<main>$(System.String[])
</main></initialize>


I created a sample app to demo this issue. And following the path of the calls..


- 

- That happens at nvenc_open_session and is called here
- That would cause going to fail2 routine, which is this one :






fail2:
 CHECK_CU(dl_fn->cuda_dl->cuCtxDestroy(ctx->cu_context_internal));
 ctx->cu_context_internal = NULL;



- 

- ctx->cu_context_internal comes from (in same method) then I suppose it was created properly (as otherwise wouldn't continue).




ret = CHECK_CU(dl_fn->cuda_dl->cuCtxCreate(&ctx->cu_context_internal, 0, cu_device));
 if (ret < 0)
 goto fail;



- 

- ctx in that method is the priv_data of AVCodecContext as we can see here :




static av_cold int nvenc_check_device(AVCodecContext *avctx, int idx)
{
 NvencContext *ctx = avctx->priv_data;



- 

- Also the act of printing the error message, on nvenc_print_error, is interacting with context.




static int nvenc_print_error(AVCodecContext *avctx, NVENCSTATUS err,
 const char *error_string)
{
 const char *desc;
 const char *details = "(no details)";
 int ret = nvenc_map_error(err, &desc);

#ifdef NVENC_HAVE_GETLASTERRORSTRING
 NvencContext *ctx = avctx->priv_data;
 NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &ctx->nvenc_dload_funcs.nvenc_funcs;

 if (p_nvenc && ctx->nvencoder)
 details = p_nvenc->nvEncGetLastErrorString(ctx->nvencoder);
#endif

 av_log(avctx, AV_LOG_ERROR, "%s: %s (%d): %s\n", error_string, desc, err, details);

 return ret;
}



- 

-
av_log is executed as we can see the error message on logs then the other lines shouldn't be a problem.


-
Seeing the other calls, when nvenc_check_device fails the error is going up to nvenc_check_device -> nvenc_setup_device but we aren't seeing more logs then the issue may be on nvenc_check_device on fail2 routine or on nvenc_print_error








Any thoughts ?


-
Shaka Player returns 4001 error - Node.js local web server playing MPEG-DASH
27 mai 2020, par salgarjiI've used Chrome inspection tool to access 'Console' and analyze what is happening. Complete error information :



D {severity: 2, category: 4, code: 4001, data: Array(1), handled: false}
category: 4
code: 4001
data: Array(1)
0: "http://localhost:8080/dash_segmentos/video.mpd"
length: 1
__proto__: Array(0)
handled: false
severity: 2
__proto__: Object




My
Server.js
file :


var http = require('http');
var fs = require('fs');

console.log(__dirname);

var path='dash_segmentos/video.mpd';
fs.access(path, fs.constants.R_OK | fs.constants.W_OK, (err) => {
 if (err) {
 console.log("%s doesn't exist", path);
 } else {
 console.log('can read/write %s', path);
 }
});

const PORT=8080; 

fs.readFile('./player.html', function (err, html) {

 if (err) throw err; 

 http.createServer(function(request, response) { 
 response.setHeader("Access-Control-Allow-Headers", "authorization, content-type");
 response.setHeader("Access-Control-Allow-Origin", "*");
 response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
 response.writeHeader(200, {"Content-Type": "text/html"}); 
 response.write(html); 
 response.end();
 }).listen(PORT);
});




As you can see I've added CORS (I guess it's correct) and a console.log to see if it's in the proper location. Furthermore, I've verified that file is accessible with
fs.access
and it returnscan read/write dash_segmentos/video.mpd
For this reason, I'm sure I am in the correct path and referencing the right file.


The HTML code (
player.html
) provided toServer.js
:




 
 <code class="echappe-js"><script type="text/javascript"&#xA;src="https://cdnjs.cloudflare.com/ajax/libs/shaka-player/2.5.11/shaka-player.compiled.js"></script>

 
 

 



<script>&#xA;function initApp() { &#xA;shaka.polyfill.installAll(); &#xA;if (shaka.Player.isBrowserSupported()) { &#xA; initPlayer(); &#xA; } else { &#xA; console.error(&#x27;Browser not supported!&#x27;);&#xA; }}&#xA;&#xA;function initPlayer() { &#xA;var video = document.getElementById( &#x27;video&#x27; );&#xA;var player = new shaka.Player( video );&#xA; window.player = player; &#xA;player.addEventListener(&#x27;error&#x27;, onErrorEvent); &#xA;player.load(path).then(function (){&#xA; console.log(&#x27;Video loaded correctly&#x27;);&#xA; }).catch(onError);&#xA;&#xA;function onErrorEvent(event) {&#xA; onError(event.detail); &#xA; }&#xA;function onError(error) {&#xA; console.error(&#x27;Codigo de error: &#x27;, error.code, &#x27; en &#x27;, error);&#xA; }&#xA;}&#xA;</script>


<script>&#xA;var path=&#x27;dash_segmentos/video.mpd&#x27;;&#xA;//var path=&#x27;https://dash.akamaized.net/dash264/TestCases/2c/qualcomm/1/MultiResMPEG2.mpd&#x27;;&#xA;//the URL above is working! but it won&#x27;t read my local mpd&#xA;&#xA;document.addEventListener(&#x27;DOMContentLoaded&#x27;, initApp);&#xA;&#xA; </script>

 




I've tried changing the URL to an online resource and the player is properly working.



My fluent-ffmpeg command which generates the video is :



var ffmpeg = require('fluent-ffmpeg');

var grabacion = new ffmpeg();

grabacion.addInput('0')
.inputOptions(['-y -nostdin', '-f avfoundation', '-video_size 1280x720', '-framerate 30'])
.outputOptions(['-vcodec libx264', '-keyint_min 0', '-g 100', '-map 0:v', '-b:v 1000k', '-f dash',
 '-use_template 1', '-use_timeline 0', '-init_seg_name video0-$RepresentationID$-$Number$.mp4',
 '-media_seg_name video0-$RepresentationID$-$Number$.mp4','-single_file 0', '-remove_at_exit 0', '-window_size 20', '-seg_duration 4'])
.output('/path/to/files/dash_segmentos/video.mpd')
.run();




The mpd manifest file is :



<?xml version="1.0" encoding="utf-8"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT26.7S" maxsegmentduration="PT4.0S" minbuffertime="PT13.2S">
 <programinformation>
 </programinformation>
 <servicedescription>
 </servicedescription>
 <period start="PT0.0S">
 <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" framerate="30000/1001" maxwidth="1280" maxheight="720" par="16:9">
 <representation mimetype="video/mp4" codecs="avc1.7a001f" bandwidth="1000000" width="1280" height="720" sar="1:1">
 <segmenttemplate timescale="1000000" duration="4000000" initialization="video0-$RepresentationID$-$Number$.mp4" media="video0-$RepresentationID$-$Number$.mp4" startnumber="1">
 </segmenttemplate>
 </representation>
 </adaptationset>
 </period>
</mpd>




Is something about ffmpeg ? Permissions ? Pixel format ? Encoding ? I've tried with other mpd file provided by my Raspberry Pi using video4linux (v4l) and it returns the same error !



I know that's a lot of code, but maybe you find it quicker than me. I guess it's a Shaka Player thing with the XML, but I can't explain how ffmpeg is wrongly creating XML code.



Thank you in advance !!