Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (41)

  • 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

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (8057)

  • Android crashes when new FFmpegFrameRecorder()

    23 mai 2021, par James Yu

    I try to create rtsp stream (or video file) with bitmaps using FFmpegFrameRecorder, and I get this message in logcat at the very beginning of the process :

    


    Thread[6,tid=2010,WaitingInMainSignalCatcherLoop,Thread*=0x795a268000,peer=0x12ec00b8,"Signal Catcher"]: reacting to signal 3


    


    and get

    


    SIGILL (signal SIGILL: illegal instruction)


    


    in debug tag, then my app hangs after these message shows up.
It is confirmed this SIGILL pops when new FFmpegFrameRecorder() is invoked, I wonder why it complains illegal instruction ?

    


    This is how I create an instance of FFmpegFrameRecorder :

    


        private void startRecorder() {
        if(recorder != null) { return; }
        recorder = new FFmpegFrameRecorder("/sdcard/test.flv", 640, 480, 0);
        recorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
        recorder.setFormat("flv");
        recorder.setFrameRate(25);
        recorder.setInterleaved(true);
        recorder.setVideoOption("crf", Integer.toString(25));
        recorder.setPixelFormat(0);
        recorder.setGopSize(-1);
        recorder.setVideoOption("tune", "zerolatency");
        recorder.setVideoOption("preset", "ultrafast");
        try {
            recorder.start();
        } catch (FFmpegFrameRecorder.Exception e) {
            Log.e("sensetime", e.getMessage(), e);
        }
    }


    


    Environment information is as follows :

    


    Hardware: Qualcomm SDM660
Android: 10


    


    Dependencies in build.gradle :

    


    implementation group: 'org.bytedeco', name: 'javacv', version: '1.5.5'
implementation group: 'org.bytedeco', name: 'javacpp', version: '1.5.5'
implementation group: 'org.bytedeco', name: 'javacpp', version: '1.5.5', classifier: 'android-arm64'
implementation group: 'org.bytedeco', name: 'javacpp', version: '1.5.5', classifier: 'android-arm'
implementation group: 'org.bytedeco', name: 'ffmpeg', version: '4.3.2-1.5.5'
implementation group: 'org.bytedeco', name: 'ffmpeg', version: '4.3.2-1.5.5', classifier: 'android-arm64'
implementation group: 'org.bytedeco', name: 'ffmpeg', version: '4.3.2-1.5.5', classifier: 'android-arm'


    


    packagingOptions in build.gradle :

    


    packagingOptions {
    pickFirst 'META-INF/native-image/android-arm64/jnijavacpp/jni-config.json'
    pickFirst 'META-INF/native-image/android-arm64/jnijavacpp/reflect-config.json'
    pickFirst 'META-INF/native-image/android-arm/jnijavacpp/reflect-config.json'
    pickFirst 'META-INF/native-image/android-arm/jnijavacpp/jni-config.json'
}


    


  • FFMPEG Error Code : "Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_scale_10" ; [complex_filter], [-loop 1], [overlay]

    30 août 2020, par Leroy Freyler

    I'm currently experimenting a bit with ffmpeg around.

    


    I want to produce a video that has a .jpg background image over which several videos are overlaid.

    


    Currently I can overlay a black background with any number of videos. But I'm trying to add a static image to the background and then it doesn't work anymore.

    


    My FFMPEG command line is

    


    command = f"ffmpeg -loop 1 -i background.jpg -i vid1.mp4 -i vid2.mp4 -i vid3.mp4 -i vid4.mp4 -filter_complex "nullsrc=size=1920x1080 [base]; 
    [0:v] setpts=PTS-STARTPTS, scale=320x240 [low]; 
    [1:v] setpts=PTS-STARTPTS, scale=320x240 [upperleft]; 
    [2:v] setpts=PTS-STARTPTS, scale=320x240 [upperright]; 
    [3:v] setpts=PTS-STARTPTS, scale=320x240 [lowerleft]; 
    [4:v] setpts=PTS-STARTPTS; scale=320x240 [lowerright]; 
    [base][upperleft] overlay=shortest=1 [tmp0]; 
    [tmp0][low] overlay=shortest=1:x=420:y=240 [tmp1]; 
    [tmp1][upperright] overlay=shortest=1:x=320 [tmp2]; 
    [tmp2][lowerleft] overlay=shortest=1:y=240 [tmp3]; 
    [tmp3][lowerright] overlay=shortest=1:x=320:y=240" 
    -c:v libx264 output.mkv"


    


    This will generate the following error message

    


    Input #0, image2, from '/home/leroy/Schreibtisch/FFMPEG_TEST/bild.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 71996 kb/s
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/home/leroy/Schreibtisch/FFMPEG_TEST/1.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomavc1
    creation_time   : 2015-08-07T09:13:36.000000Z
  Duration: 00:00:30.53, start: 0.000000, bitrate: 4675 kb/s
    Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 4486 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2015-08-07T09:13:36.000000Z
      handler_name    : L-SMASH Video Handler
      encoder         : AVC Coding
    Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
    Metadata:
      creation_time   : 2015-08-07T09:13:36.000000Z
      handler_name    : L-SMASH Audio Handler
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from '/home/leroy/Schreibtisch/FFMPEG_TEST/2.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2010-03-20T21:29:11.000000Z
    encoder         : HandBrake 0.9.4 2009112300
  Duration: 00:00:05.57, start: 0.000000, bitrate: 551 kb/s
    Stream #2:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 560x320, 465 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2010-03-20T21:29:11.000000Z
      encoder         : JVT/AVC Coding
    Stream #2:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 83 kb/s (default)
    Metadata:
      creation_time   : 2010-03-20T21:29:11.000000Z
Input #3, mov,mp4,m4a,3gp,3g2,mj2, from '/home/leroy/Schreibtisch/FFMPEG_TEST/3.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2010-03-20T21:29:11.000000Z
    encoder         : HandBrake 0.9.4 2009112300
  Duration: 00:00:05.57, start: 0.000000, bitrate: 551 kb/s
    Stream #3:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 560x320, 465 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2010-03-20T21:29:11.000000Z
      encoder         : JVT/AVC Coding
    Stream #3:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 83 kb/s (default)
    Metadata:
      creation_time   : 2010-03-20T21:29:11.000000Z
Input #4, mov,mp4,m4a,3gp,3g2,mj2, from '/home/leroy/Schreibtisch/FFMPEG_TEST/4.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2010-03-20T21:29:11.000000Z
    encoder         : HandBrake 0.9.4 2009112300
  Duration: 00:00:05.57, start: 0.000000, bitrate: 551 kb/s
    Stream #4:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 560x320, 465 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2010-03-20T21:29:11.000000Z
      encoder         : JVT/AVC Coding
    Stream #4:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 83 kb/s (default)
    Metadata:
      creation_time   : 2010-03-20T21:29:11.000000Z

Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_scale_10


    


    I used Ubuntu 18.04.LST and Programmed in Python3.6.9.

    


    My complet Code is :

    


    from pathlib import Path
import os
suffix = '.mp4'
suffix1 = '.jpg'
os.system("clear")


input_path = Path.home() / "/home/leroy/Schreibtisch/FFMPEG_TEST"
file_paths = [subp for subp in input_path.rglob('*') if  suffix == subp.suffix or suffix1 == subp.suffix]
file_paths.sort()
output_path =  Path.home() / "/home/leroy/Schreibtisch/FFMPEG_TEST/new"
output_path.mkdir(parents=True, exist_ok=True)


vid1 = '/home/leroy/Schreibtisch/FFMPEG_TEST/1.mp4'
vid2 = '/home/leroy/Schreibtisch/FFMPEG_TEST/2.mp4'
vid3 = '/home/leroy/Schreibtisch/FFMPEG_TEST/3.mp4'
vid4 = '/home/leroy/Schreibtisch/FFMPEG_TEST/4.mp4'
background = '/home/leroy/Schreibtisch/FFMPEG_TEST/bild.jpg'


command = f"ffmpeg -loop 1 -i {background} -i {vid1} -i {vid2} -i {vid3} -i {vid4} -filter_complex \
\"nullsrc=size=1920x1080 [base]; \
[0:v] setpts=PTS-STARTPTS, scale=320x240 [low]; \
[1:v] setpts=PTS-STARTPTS, scale=320x240 [upperleft]; \
[2:v] setpts=PTS-STARTPTS, scale=320x240 [upperright]; \
[3:v] setpts=PTS-STARTPTS, scale=320x240 [lowerleft]; \
[4:v] setpts=PTS-STARTPTS; scale=320x240 [lowerright]; \
[base][upperleft] overlay=shortest=1 [tmp0]; \
[tmp0][low] overlay=shortest=1:x=420:y=240 [tmp1]; \
[tmp1][upperright] overlay=shortest=1:x=320 [tmp2]; \
[tmp2][lowerleft] overlay=shortest=1:y=240 [tmp3]; \
[tmp3][lowerright] overlay=shortest=1:x=320:y=240 \" \
-c:v libx264 output.mkv"
print(command)
os.system(command)



    


  • FFMPEG av_interleaved_write_frame() : Operation not permitted

    21 décembre 2020, par camslaz

    Ok I receiving a 'av_interleaved_write_frame() : Operation not permitted' error while trying to encode an MOV file. Firstly I need to outline the conditions behind it.

    



    I am encoding 12 different files of different resolution sizes and format types via a PHP script that runs on cron. Basically it grabs a 250mb HD MOV file and encodes it in 4 different frame sizes as MOV, MP4 and WMV file types.

    



    Now the script takes over 10mins to run and encode each of the files for the 250mb input file. I am outputting the processing times and as soon as the time on the script hits 10mins FFMPEG crashes and returns "av_interleaved_write_frame() : Operation not permitted" for the current file being encoded and all other remaining files yet to be encoded.

    



    If the input videos is 150MB the total time the script runs for is under 10mins so it encodes all of the videos fine. Additionally if I run the FFMPEG command on the individual file that it fails on for the 250mb file it encodes the file with no issues.

    



    From doing to research on the error "av_interleaved_write_frame()" it seems it is related to timestamps of what I understand to be of the input file. But in saying that it doesn't seem to be the case in my instance because I can encode the file with no problem if I do it individually.

    



    example ffmpeg command

    



    ffmpeg -i GVowbt3vsrXL.mov -s 1920x1080 -sameq -vf "unsharp" -y GVowbt3vsrXL_4.wmv


    



    Error output on the failed file at 10mins. Remember there is no issue with the command if I run it by itself it is only when the script hits 10mins.

    



    'output' =>
     array (
       0 => 'FFmpeg version SVN-r24545, Copyright (c) 2000-2010 the FFmpeg developers',
       1 => '  built on Aug 20 2010 23:32:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)',
       2 => '  configuration: --enable-shared --enable-gpl --enable-pthreads --enable-nonfree --cpu=opteron --extra-cflags=\'-O3 -march=opteron -mtune=opteron\' --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-avfilter --enable-filter=movie --enable-avfilter-lavf --enable-swscale',
       3 => '  libavutil     50.23. 0 / 50.23. 0',
       4 => '  libavcore      0. 1. 0 /  0. 1. 0',
       5 => '  libavcodec    52.84. 1 / 52.84. 1',
       6 => '  libavformat   52.77. 0 / 52.77. 0',
       7 => '  libavdevice   52. 2. 0 / 52. 2. 0',
       8 => '  libavfilter    1.26. 1 /  1.26. 1',
       9 => '  libswscale     0.11. 0 /  0.11. 0',
       10 => 'Input #0, mov,mp4,m4a,3gp,3g2,mj2, from \'/home/hdfootage/public_html/process/VideoEncode/_tmpfiles/GVowbt3vsrXL/GVowbt3vsrXL.mov\':',
       11 => '  Metadata:',
       12 => '    major_brand     : qt',
       13 => '    minor_version   : 537199360',
       14 => '    compatible_brands: qt',
       15 => '  Duration: 00:00:20.00, start: 0.000000, bitrate: 110802 kb/s',
       16 => '    Stream #0.0(eng): Video: mjpeg, yuvj422p, 1920x1080 [PAR 72:72 DAR 16:9], 109386 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc',
       17 => '    Stream #0.1(eng): Audio: pcm_s16be, 44100 Hz, 2 channels, s16, 1411 kb/s',
       18 => '[buffer @ 0xdcd0e0] w:1920 h:1080 pixfmt:yuvj422p',
       19 => '[unsharp @ 0xe00280] auto-inserting filter \'auto-inserted scaler 0\' between the filter \'src\' and the filter \'Filter 0 unsharp\'',
       20 => '[scale @ 0xe005b0] w:1920 h:1080 fmt:yuvj422p -> w:1920 h:1080 fmt:yuv420p flags:0xa0000004',
       21 => '[unsharp @ 0xe00280] effect:sharpen type:luma msize_x:5 msize_y:5 amount:1.00',
       22 => '[unsharp @ 0xe00280] effect:none type:chroma msize_x:0 msize_y:0 amount:0.00',
       23 => 'Output #0, asf, to \'/home/hdfootage/public_html/process/VideoEncode/_tmpfiles/GVowbt3vsrXL/GVowbt3vsrXL_4.wmv\':',
       24 => '  Metadata:',
       25 => '    WM/EncodingSettings: Lavf52.77.0',
       26 => '    Stream #0.0(eng): Video: msmpeg4, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 1k tbn, 25 tbc',
       27 => '    Stream #0.1(eng): Audio: libmp3lame, 44100 Hz, 2 channels, s16, 64 kb/s',
       28 => 'Stream mapping:',
       29 => '  Stream #0.0 -> #0.0',
       30 => '  Stream #0.1 -> #0.1',
       31 => 'Press [q] to stop encoding',
       32 => '[msmpeg4 @ 0xdccb50] warning, clipping 1 dct coefficients to -127..127',


    



    Then it errors

    



    frame=   75 fps=  5 q=1.0 size=   12704kB time=2.90 bitrate=3588 6.0kbits av_interleaved_write_frame(): Operation not permitted',
     )


    



    Has any anybody encountered this sort of problem before ? It seems to be something to do with the timestamps but only because the script is running for a period longer then 10mins. It maybe related to PHP/Apache config but I don't know if it is FFMPEG or if it is server config I need to be looking at.