Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (46)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (7041)

  • ClickOnce Deployment looking for manifest signature on an nuget sourced .exe (FFMPEG #) as if it is a .csproj output. Deployment fails

    9 octobre 2019, par M_Ryce

    I have a C# forms app which utilizes the nuget package "FFMPEG Sharp" (Nuget Github) to generate video from a sequence of images.

    Unlike most nuget packages which simply pull in a .dll, installing FFMPEG Sharp places an "FFMPEG" folder into the .csproj root directory, in addition to bringing the appropriate .dll into "packages"

    Inside this folder are a few FFMPEG artifacts and a /bin folder containing FFMPEG executables. According to the project’s Github readme, this /bin directory needs to be specified in the app.config.

    From Github Readme example :

    <appsettings>
     <add key="ffmpegRoot" value="C:\ffmpeg\bin\"></add>
    </appsettings>`

    Adjusting the above to work in alignment with the default location Nuget placed the dependency artifacts :

    <appsettings>
     <add key="ffmpegRoot" value="..\..\FFMPEG\bin"></add>
    </appsettings>`

    Everything related to this dev effort has been smooth sailing, until I tried to utilize the existing Clickonce deployment for the app. The FFMPEG folder in my .csproj root wasn’t making it to the build output and therefore the application’s call to the FFMPEG .exe was throwing a null reference error. Understandable result, given that I had not set up any method of ensuring the FFMPEG artifacts made it to the build output with the same folder structure as existed on my local dev box.

    To counter this, I set a POST-build command to XCOPY....

    XCOPY "$(SolutionDir)MyApp\FFMPEG" "$(TargetDir)FFMPEG" /S /Y /I

    ...the nuget-provisioned FFMPEG artifacts into the build output root, and adjusted the config setting accordingly (see below)

    <appsettings>
     <add key="ffmpegRoot" value=".\FFMPEG\bin"></add>
    </appsettings>`

    This worked like a dream when building/running locally. The XCOPY succeeded in placing FFMPEG folder contents into the compiled solution’s Debug/Release bin and the updated config referenced them. No errors.

    Attempting to deploy with the .NET ClickOnce tool has created a rather befuddling error though.

    (Apologies for formatting ugliness below. I tried but didn’t succeed. The important parts are in bold)

    ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    Activation of https://MySite/MyApp/Install/MyApp.application resulted in exception. Following failure messages were detected :
    + Downloading https://MySite/MyApp/Install/Application Files/MyApp/FFMPEG/bin/x86/ffmpeg.exe.deploy did not succeed.
    + The remote server returned an error : (404) Not Found.

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.
    WARNINGS
    The manifest for this application does not have a signature. Signature validation will be ignored.
    * The manifest for this application does not have a signature. Signature validation will be ignored.
    OPERATION PROGRESS STATUS
    * [10/8/2019 2:03:37 PM] : Activation of https://MySite/MyApp/Install/MyApp.application has started.
    * [10/8/2019 2:03:37 PM] : Processing of deployment manifest has successfully completed.
    * [10/8/2019 2:03:37 PM] : Installation of the application has started.
    * [10/8/2019 2:03:37 PM] : Processing of application manifest has successfully completed.
    * [10/8/2019 2:03:40 PM] : Found compatible runtime version 4.0.30319.
    * [10/8/2019 2:03:40 PM] : Request of trust and detection of platform is complete.
    ERROR DETAILS
    Following errors were detected during this operation.
    * [10/8/2019 2:03:40 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
    - Downloading https://MySite/MyApp/Install/Application Files/MyApp/FFMPEG/bin/x86/ffmpeg.exe.deploy did not succeed.*

    ...

    My interpretation of this is that the ClickOnce deployment is treating the Nuget-sourced .exe’s as if they are compiled code from this very project, and checking for a signed manifest.

    This ClickOnce deployment was not set up by me, and had not needed to account for such external artifacts existing in the output previously. I do not believe turning off signed assemblies is an option for me, for security reasons.

    Is there a way to make ClickOnce deployments ignore a specific .exe when checking for signed manifests ? I think the "correct" intended usage is for FFMPEG to be pre-installed on the machine as a stand-alone application, but This is not an option for me at this time. I will need FFMPEG to be brought in by the ClickOnce.

  • How to fix video in gallery from not playing (probable cause encoding from ffmpeg)

    30 avril 2020, par Nathan Sinclair

    I'm setting up a video stream by which I can download a video into the Android gallery, so that I can play it back later.&#xA;I have a problem with playing the video back from gallery. The same problem arises when trying to view the url in a videoview.

    &#xA;&#xA;

    video information from ffmpeg displays this.

    &#xA;&#xA;

    Input #0, mpjpeg, from &#x27;&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;    Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 25 tbr, 25 tbn, 25 tbc&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))&#xA;Press [q] to stop, [?] for help&#xA;[swscaler @ 0x1cab5e0] deprecated pixel format used, make sure you did set range correctly&#xA;[libx264 @ 0x1c6f030] using cpu capabilities: ARMv6 NEON&#xA;[libx264 @ 0x1c6f030] profile Constrained Baseline, level 3.0, 4:2:0, 8-bit&#xA;[libx264 @ 0x1c6f030] 264 - core 157 r2969 d4099dd - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=0 ref=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=crf mbtree=1 crf=18.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00&#xA;Output #0, mp4, to &#x27;out.mp4&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.33.100&#xA;    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 720x406, q=-1--1, 30 fps, 15360 tbn, 30 tbc&#xA;    Metadata:&#xA;      encoder         : Lavc58.59.101 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;Error opening file out.mp4: IsoMedia File is truncated28.56 bitrate= 734.1kbits/s speed=0.478x&#xA;[pid: 5138|app: 0|req: 1/1] 192.168.178.21 () {32 vars in 406 bytes} [Mon Oct  7 01:12:17 2019] GET /stop => generated 39 bytes in 152 msecs (HTTP/1.1 200) 2 headers in 79 bytes (1 switches on core 0)&#xA;frame=  899 fps= 15 q=-1.0 Lsize=    2779kB time=00:00:29.93 bitrate= 760.6kbits/s speed=0.49x&#xA;video:2775kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.157041%&#xA;

    &#xA;&#xA;

    I have attempted to follow this article. Android MediaPlayer error (1, -2147483648)

    &#xA;&#xA;

    I'm using FFMpeg to record from a mjpeg stream into a file, which then is hosted by a uwsgi/flask server into a convenient url : http://ipaddress/video.mp4

    &#xA;&#xA;

    Thus far ive been able to open the video fine using chrome in Android.

    &#xA;&#xA;

    my FFMPEG command looks like this :

    &#xA;&#xA;

    ffmpeg -i $1 -crf 18 -r 30 -vf "scale=720x406, setpts=&#x27;1/(30*TB) * (N &#x2B; 0.05 * sin(N*2*PI/25))&#x27;, fps=fps=30" -profile:v baseline -pix_fmt yuv420p -f mp4 -preset fast out.mp4&#xA;

    &#xA;&#xA;

    I thought it may have something to do with the transmission of the file. I'm using an android library called volley to send the url so it can be downloaded as a file on the Android. Then it is subsequently put in gallery. This is when I began to experience the problems. I wanted to be thorough, so tried to find out if the file contents was the issue. This is because when displaying it on gallery, there is no width or height information, or even duration. I have come to suspect something is at issue with ffmpeg. I'm not cutting out that it could be keeping the file from opening if it can't find it's normal file properties.

    &#xA;&#xA;

    The volley code for the downloaded file is as follows :

    &#xA;&#xA;

     @Override&#xA;    public void onResponse(byte[] response) {&#xA;        try {&#xA;            if (response!=null) {&#xA;&#xA;                File file = createVideoFile();&#xA;&#xA;                FileOutputStream stream = new FileOutputStream(file);&#xA;                try {&#xA;                    stream.write(response);&#xA;                } finally {&#xA;                    stream.close();&#xA;                }&#xA;&#xA;                addToGallery(file.getAbsolutePath());&#xA;                MediaScannerConnection.scanFile(this, new String[]{file.getAbsolutePath()}, null, (path, uri) -> {&#xA;                    Intent intent = new Intent (context, VideoActivity.class);&#xA;                    intent.setData(uri);&#xA;                    startActivity(intent);&#xA;&#xA;                });&#xA;&#xA;&#xA;                Toast.makeText(this, "Download complete.", Toast.LENGTH_LONG).show();&#xA;            }&#xA;        } catch (Exception e) {&#xA;            // TODO Auto-generated catch block&#xA;            Log.d("KEY_ERROR", "UNABLE TO DOWNLOAD FILE");&#xA;            e.printStackTrace();&#xA;        }&#xA;    }&#xA;&#xA;private void addToGallery(String path) throws FileNotFoundException {&#xA;        MediaScannerConnection.scanFile(context, new String[]{&#xA;&#xA;                        path},&#xA;&#xA;                null, new MediaScannerConnection.OnScanCompletedListener() {&#xA;&#xA;                    public void onScanCompleted(String path, Uri uri)&#xA;&#xA;                    {&#xA;&#xA;                        Log.e(TAG, "file" &#x2B; path &#x2B; " was scanned successfully");&#xA;&#xA;                    }&#xA;&#xA;                });&#xA;&#xA;        Uri uri = Uri.parse("file:///" &#x2B; path);&#xA;        Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, uri);&#xA;        context.sendBroadcast(intent);&#xA;&#xA;        }&#xA;

    &#xA;&#xA;

    I did have a VideoView to display it, as pertaining to a code example i found to download videos using volley.

    &#xA;&#xA;

    https://github.com/coderminion/AndroidVolleyLib

    &#xA;

  • Muxing files with different run times

    16 novembre 2019, par Dhruv Kanojia

    I’ve got a few files I want to mux.
    File 1 : MP4 File with runtime of 23 Minutes 45 Seconds
    File 2 : MP4 File with runtime of 23 Minutes 39 Seconds
    File 3 : Subtitle File
    File 4 : Subtitle File
    File 5 : Subtitle File
    File 6 : Subtitle File
    File 7 : Subtitle File
    File 8 : Subtitle File
    File 9 : Subtitle File

    I’m trying to mux these files. Now, since there’s a runtime difference, I’m getting weird errors like :

    [matroska @ 0x55e029fbd1a0] Only audio, video, and subtitles are supported for Matroska.
    av_interleaved_write_frame(): Invalid argument
    Error writing trailer of /root/my_dls/Output/My Vid/1/en-us/1080p/My Video - 1 [Dual Audio].mkv: Invalid argument

    I can mux files with same run time just fine... but, I’m stuck on this one. Can someone help me out here.

    The command I’m using :

    ffmpeg -i "/root/my_dls/Output/My Vid/1/en-us/1080p/My Video - 1 [enUS].mp4" -i "/root/my_dls/Output/My Vid/1/en-us/1080p/My Video - 1 [jaJP].mp4" -i "/root/my_dls/Output/My Vid/1/en-us/1080p/My Video - 1 [enUS] .ass" -i "/root/my_dls/Output/My Vid/1/en-us/1080p/My Video - 1 [itIT] .ass" -i "/root/my_dls/Output/My Vid/1/en-us/1080p/My Video - 1 [esLA] .ass" -i "/root/my_dls/Output/My Vid/1/en-us/1080p/My Video - 1 [frFR] .ass" -i "/root/my_dls/Output/My Vid/1/en-us/1080p/My Video - 1 [esES] .ass" -i "/root/my_dls/Output/My Vid/1/en-us/1080p/My Video - 1 [deDE] .ass" -i "/root/my_dls/Output/My Vid/1/en-us/1080p/My Video - 1 [ruRU] .ass" -i "/root/my_dls/Output/My Vid/1/en-us/1080p/My Video - 1 [ptBR] .ass" -map 1 -map 2 -map 3 -map 4 -map 5 -map 6 -map 7 -map 8  -map 0:v -map 0:a -map 1:a -c copy -metadata:s:a:0 title="English Audio" -metadata:s:a:1 title="Japanese Audio" -metadata:s:a:0 language=eng -metadata:s:a:1 language=jpn -metadata:s:s:0 title="English (US) Subtitle" -metadata:s:s:1 title="Italian Subtitle" -metadata:s:s:2 title="Spanish (Latin America) Subtitle" -metadata:s:s:3 title="French Subtitle" -metadata:s:s:4 title="Spanish Subtitle" -metadata:s:s:5 title="Deutsch Subtitle" -metadata:s:s:6 title="Russian Subtitle" -metadata:s:s:7 title="Portuguese Subtitle"  "/root/my_dls/Output/My Vid/1/en-us/1080p/My Video - 1 [Dual Audio].mkv"