Recherche avancée

Médias (91)

Autres articles (62)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Personnaliser l’affichage de mon Médiaspip

    27 mai 2013

    Vous pouvez modifier la configuration du squelette afin de personnaliser votre Médiaspip Voir aussi plus d’informations en suivant ce lien
    Comment supprimer le nombre de vues d’affichage d’un média ?
    Administrer > Gestion du squelette > Pages des articles et médias Cocher dans "Informations non affichées sur les pages de médias" les paramètres que vous ne souhaitez pas afficher.
    Comment supprimer le titre de mon Médiaspip dans le bandeau horizontal ?
    Administrer > Gestion du squelette > (...)

  • Modifier la date de publication

    21 juin 2013, par

    Comment changer la date de publication d’un média ?
    Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
    Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
    Dans la rubrique "Champs à ajouter, cocher "Date de publication "
    Cliquer en bas de la page sur Enregistrer

Sur d’autres sites (7517)

  • ffmepg why error :Failed to write core dump

    9 juillet 2021, par dmouse

    I wang to implement a feature that allows me to save RTSP stram as a file,
use javacv implement a demo,but there's an error.
i debug the demo , execute 'recorder.record(frame) ;' error, "ulimit -c unlimited" is useless,the program still reports an error.
review of the source code did note find the problem principle.pleace give me a hand.

    


    import org.bytedeco.javacpp.avcodec;
import org.bytedeco.javacv.FFmpegFrameGrabber;
import org.bytedeco.javacv.FFmpegFrameRecorder;
import org.bytedeco.javacv.Frame;

import java.io.File;
import java.io.IOException;

/**
 * @ClassName video
 * @Description TODO
 * @Author mouse
 * @Date 2021/7/9 11:13
 * @Version 1.0
 **/
public class Video {
    public static void main(String[] args) {
        String streamUrl = "rtsp://admin:12345678.@192.168.20.180:554/h265/ch1/main/av_stream";
        String filePath = "./video/hello.mp3";
        File outFile = new File(filePath);
        FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(streamUrl);
        if (!outFile.getParentFile().exists()) {
            outFile.getParentFile().mkdirs();
        }
        FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(filePath,1080,1440, 1);
        recorder.setVideoCodec(avcodec.AV_CODEC_ID_H265);
        recorder.setFormat("flv");
        recorder.setVideoBitrate(4000);
        try {
            grabber.start();
            recorder.start();
            Frame frame = grabber.grabFrame();
            while (frame!=null){
                recorder.record(frame);
                frame = grabber.grabFrame();
            }
            recorder.record(frame);
            recorder.stop();
            grabber.stop();

        } catch (FFmpegFrameGrabber.Exception e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                if (recorder != null) {
                    recorder.stop();
                }
                if (grabber != null) {
                    grabber.stop();
                }
            } catch (FFmpegFrameRecorder.Exception | FFmpegFrameGrabber.Exception e) {
                e.printStackTrace();
            }
        }
    }
}



    


    log error

    


    #
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000131fef233, pid=50498, tid=0x0000000000001003
#
# JRE version: Java(TM) SE Runtime Environment (8.0_281-b09) (build 1.8.0_281-b09)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.281-b09 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  [libavformat.57.dylib+0xbf233]  av_write_frame+0x993
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#


    


    pom :

    


            <dependency>&#xA;            <groupid>org.bytedeco</groupid>&#xA;            <artifactid>javacv</artifactid>&#xA;            <version>1.4.3</version>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>org.bytedeco.javacpp-presets</groupid>&#xA;            <artifactid>ffmpeg-platform</artifactid>&#xA;            <version>4.0.2-1.4.3</version>&#xA;        </dependency>&#xA;

    &#xA;

    My os : macOS Bgi Sur 11.4 ;
    &#xA;JDK : 1.8.0_281
    &#xA;execute 'recorder.record(frame) ;' error,&#xA;"ulimit -c unlimited" is useless,the program still reports an error .

    &#xA;

  • Is there a way to batch split a file by chapter with ffmpeg and then reassemble with mkvmerge in windows ?

    8 novembre 2020, par Sipherdrakon

    So I made a batch script originally with the ability to relatively precision trim a video into chapters without having to run by keyframes, but the code looks horrible and I can't get it to loop through all mp4 files nor get mkvmerge to append the files after splitting them. Code is below but be gentle it is my first try.

    &#xA;

    @echo off&#xA;setlocal enableDelayedExpansion&#xA;&#xA;REM CODE BELOW CREATES JSON FILES FOR ALL MP4 FILES WITHIN THE SAME DIRECTORY&#xA;ffprobe -v quiet -print_format json -show_chapters -loglevel error "01x01.mp4" > "01x01.json"&#xA;&#xA;REM CODE BELOW SETS VARIABLES FROM EACH SPECIFIC JSON&#xA;FOR /F "delims=" %%i in (&#x27;jq .chapters[2].start ^&lt; 01x01.json&#x27;) DO SET /A start1=%%i&#xA;FOR /F "delims=" %%j in (&#x27;jq .chapters[2].end ^&lt; 01x01.json&#x27;) DO SET /A end1=%%j&#xA;&#xA;FOR /F "delims=" %%k in (&#x27;jq .chapters[4].start ^&lt; 01x01.json&#x27;) DO SET /A start2=%%k&#xA;FOR /F "delims=" %%l in (&#x27;jq .chapters[4].end ^&lt; 01x01.json&#x27;) DO SET /A end2=%%l&#xA;&#xA;FOR /F "delims=" %%m in (&#x27;jq .chapters[6].start ^&lt; 01x01.json&#x27;) DO SET /A start3=%%m&#xA;FOR /F "delims=" %%n in (&#x27;jq .chapters[6].end ^&lt; 01x01.json&#x27;) DO SET /A end3=%%n&#xA;&#xA;FOR /F "delims=" %%o in (&#x27;jq .chapters[8].start ^&lt; 01x01.json&#x27;) DO SET /A start4=%%o&#xA;FOR /F "delims=" %%p in (&#x27;jq .chapters[8].end ^&lt; 01x01.json&#x27;) DO SET /A end4=%%p&#xA;&#xA;REM SETS THE DURATION OF EACH FILE TO USE PRECISION TIMING FOR START AND STOP TIMES&#xA;CALL vbs (%end1%-%start1%)/1000&#xA;SET duration1=%val%&#xA;CALL vbs (%end2%-%start2%)/1000&#xA;SET duration2=%val%&#xA;CALL vbs (%end3%-%start3%)/1000&#xA;SET duration3=%val%&#xA;CALL vbs (%end4%-%start4%)/1000&#xA;SET duration4=%val%&#xA;&#xA;REM SETS THE START TIME IN SECONDS VS MILLISECONDS&#xA;CALL vbs (%start1%)/1000&#xA;SET start1=%val%&#xA;CALL vbs (%start2%)/1000&#xA;SET start2=%val%&#xA;CALL vbs (%start3%)/1000&#xA;SET start3=%val%&#xA;CALL vbs (%start4%)/1000&#xA;SET start4=%val%&#xA;&#xA;REM TRIM AND SPLIT ORIGINAL FILE INTO SEPERATE SECTIONS BASED ON CHAPTER MARKERS&#xA;ffmpeg -ss %START1% -i 01x01.mp4 -ss 0 -c copy -to %DURATION1% -avoid_negative_ts make_zero 01x01-1.mp4&#xA;ffmpeg -ss %START2% -i 01x01.mp4 -ss 0 -c copy -to %DURATION2% -avoid_negative_ts make_zero 01x01-2.mp4&#xA;ffmpeg -ss %START3% -i 01x01.mp4 -ss 0 -c copy -to %DURATION3% -avoid_negative_ts make_zero 01x01-3.mp4&#xA;ffmpeg -ss %START4% -i 01x01.mp4 -ss 0 -c copy -to %DURATION4% -avoid_negative_ts make_zero 01x01-4.mp4&#xA;&#xA;REM DELETES UNNEEDED JSON AFTER USE&#xA;del /s *.json&#xA;&#xA;REM APPEND ALL MP4 FILES INTO COHESIVE MKV&#xA;for /d /r %%D in (*) do (&#xA;    pushd %%D&#xA;    set files=&#xA;    for %%F in (*.mp4) do set files=!files! &#x2B; ^( "%%F" ^)&#xA;    if not "!files!"=="" %mkvmerge% -o "01x01-FINAL.mkv" !files:~2!&#xA;    popd&#xA;)&#xA;&#xA;REM DELETE UNNEEDED MP4 ORIGINALS AND SPLIT FILES&#xA;del /s *.mp4&#xA;

    &#xA;

    I know it is super long and every time I try to use a variable or a loop to run through all files it can't read the json file. I've been at this all day and I can use the script as is but I have to make a file for each iteration.

    &#xA;

    I was also hoping to be able to have it only pull chapters labeled as "video" but I haven't quite figured that one out yet.

    &#xA;

    I'll add the vbs batch file for the arithmetic section as well as the sample json if it will help.

    &#xA;

    @echo off&#xA;>"%temp%\VBS.vbs" echo Set fso = CreateObject("Scripting.FileSystemObject") : Wscript.echo (%*)&#xA;for /f "delims=" %%a in (&#x27;cscript /nologo "%temp%\VBS.vbs"&#x27;) do set "val=%%a"&#xA;del "%temp%\VBS.vbs"&#xA;

    &#xA;

    {&#xA;    "chapters": [&#xA;        {&#xA;            "id": 0,&#xA;            "time_base": "1/1000",&#xA;            "start": 0,&#xA;            "start_time": "0.000000",&#xA;            "end": 5590,&#xA;            "end_time": "5.590000",&#xA;            "tags": {&#xA;                "title": "Video"&#xA;            }&#xA;        },&#xA;        {&#xA;            "id": 1,&#xA;            "time_base": "1/1000",&#xA;            "start": 5590,&#xA;            "start_time": "5.590000",&#xA;            "end": 13994,&#xA;            "end_time": "13.994000",&#xA;            "tags": {&#xA;                "title": "Advertisement"&#xA;            }&#xA;        },&#xA;        {&#xA;            "id": 2,&#xA;            "time_base": "1/1000",&#xA;            "start": 13994,&#xA;            "start_time": "13.994000",&#xA;            "end": 163964,&#xA;            "end_time": "163.964000",&#xA;            "tags": {&#xA;                "title": "Video"&#xA;            }&#xA;        },&#xA;        {&#xA;            "id": 3,&#xA;            "time_base": "1/1000",&#xA;            "start": 163964,&#xA;            "start_time": "163.964000",&#xA;            "end": 195940,&#xA;            "end_time": "195.940000",&#xA;            "tags": {&#xA;                "title": "Advertisement"&#xA;            }&#xA;        },&#xA;        {&#xA;            "id": 4,&#xA;            "time_base": "1/1000",&#xA;            "start": 195940,&#xA;            "start_time": "195.940000",&#xA;            "end": 547849,&#xA;            "end_time": "547.849000",&#xA;            "tags": {&#xA;                "title": "Video"&#xA;            }&#xA;        },&#xA;        {&#xA;            "id": 5,&#xA;            "time_base": "1/1000",&#xA;            "start": 547849,&#xA;            "start_time": "547.849000",&#xA;            "end": 595850,&#xA;            "end_time": "595.850000",&#xA;            "tags": {&#xA;                "title": "Advertisement"&#xA;            }&#xA;        },&#xA;        {&#xA;            "id": 6,&#xA;            "time_base": "1/1000",&#xA;            "start": 595850,&#xA;            "start_time": "595.850000",&#xA;            "end": 1413588,&#xA;            "end_time": "1413.588000",&#xA;            "tags": {&#xA;                "title": "Video"&#xA;            }&#xA;        },&#xA;        {&#xA;            "id": 7,&#xA;            "time_base": "1/1000",&#xA;            "start": 1413588,&#xA;            "start_time": "1413.588000",&#xA;            "end": 1477569,&#xA;            "end_time": "1477.569000",&#xA;            "tags": {&#xA;                "title": "Advertisement"&#xA;            }&#xA;        },&#xA;        {&#xA;            "id": 8,&#xA;            "time_base": "1/1000",&#xA;            "start": 1477569,&#xA;            "start_time": "1477.569000",&#xA;            "end": 1529696,&#xA;            "end_time": "1529.696000",&#xA;            "tags": {&#xA;                "title": "Video"&#xA;            }&#xA;        }&#xA;    ]&#xA;}&#xA;

    &#xA;

    I also tried using the start_time so I didn't have to do extra calculations but jq didn't like that either.

    &#xA;

    mkvmerge doesn't even try to run when I have it in here and I still need to cut 7 seconds off the end and 12 seconds off the front of it once it is all one file again.

    &#xA;

    Any help would be appreciated, I know it's a lot but I seem to have hit a roadblock or just sleep deprived at this point.

    &#xA;

    UPDATE

    &#xA;

    This works amazing I just need to figure out how to use files with spaces and I'm all set. I guess I could run a batch before hand replacing all spaces with underscores. That would probably work but I would like to not change filenames if I can help it.

    &#xA;

    @echo off&#xA;&#xA;for %%i in (*.mp4) do (&#xA;FOR /F "delims=" %%A IN (&#x27;ffprobe -v quiet -print_format json -show_chapters -loglevel error "%%i" ^| xidel - -se "$json/(chapters)()[id!=0 and tags/title=&#x27;Video&#x27;]/concat(&#x27;ffmpeg -ss &#x27;,start div 1000,&#x27; -i %%i -to &#x27;,((end - start) div 1000),&#x27; -c copy -avoid_negative_ts make_zero %%~ni-&#x27;,position(),&#x27;.mp4&#x27;)"&#x27;) DO %%A&#xA;FOR /F "delims=" %%A IN (&#x27;xidel -s --xquery "concat(&#x27;mkvmerge -o &amp;quot;%%~ni-FINAL.mkv&amp;quot; &amp;quot;&#x27;,join(file:list(.,false(),&#x27;%%~ni-*.mp4&#x27;),&#x27;&amp;quot; &#x2B; &amp;quot;&#x27;),&#x27;&amp;quot;&#x27;)"&#x27;) DO %%A&#xA;)&#xA;

    &#xA;

  • ffmpeg fast seek large MP4 over HTTP

    28 juillet 2024, par Gmanicus

    I'm attempting to download snapshots from a video provided by the U.S House of Representatives :

    &#xA;

    https://houseliveprod-f9h4cpb9dyb8gegg.a01.azurefd.net/east/2024-04-11T08-55-12_Download/video_3000000_1.mp4&#xA;

    &#xA;

    I am using fluent-ffmpeg in Node to execute this command :

    &#xA;

    ffmpeg(&#x27;https://houseliveprod-f9h4cpb9dyb8gegg.a01.azurefd.net/east/2024-04-11T08-55-12_Download/video_3000000_1.mp4&#x27;)&#xA;  .inputOption(`-ss 03:33:33`)&#xA;  .outputOptions([&#xA;     &#x27;-vframes 1&#x27;&#xA;  ])&#xA;  .output(&#x27;test.png&#x27;)&#xA;&#xA;// Effectively:&#xA;// ffmpeg -ss 03:33:33 -i  -y -vframes 1 test.png&#xA;

    &#xA;

    My intention is to fast-seek to the desired timestamp and take a snapshot over HTTP. However, when doing so, the performance is not great. A snapshot takes about 10s per 3hrs of video and seems to increase fairly linearly at that rate.

    &#xA;

    However, when using ffmpeg on the same video locally, it's super fast ! Sub-500ms regardless of the desired timestamp.

    &#xA;

    Is there some magic that could be done via ffmpeg options or perhaps some sort of technique with manual requests to get a snapshot at the desired segment of video more efficiently ?

    &#xA;