Recherche avancée

Médias (1)

Mot : - Tags -/university

Autres articles (89)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (3747)

  • Shows improper/corrupted TS segments from Opencv webcam and FFmpeg

    30 juin 2020, par playmaker420

    Im experimenting with opencv and ffmpeg to create a live hls stream from the webcam using some scripts

    


    The ffmpeg version i use is 3.4

    


    frame-detection.py

    


    import numpy as np
import cv2
import sys


cap = cv2.VideoCapture(0)

while(True):
    # Capture frame-by-frame
    ret, frame = cap.read()
    framestring = frame.tostring()
    sys.stdout.write(str(framestring))

    # Display the resulting frame
    cv2.imshow('frame', frame)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()


    


    hlslive_generator.sh

    


    #!/bin/bash

# Create folder from args
mkdir -p $1

# Get into the folder
cd $1

# Start running FFmpeg HLS Live streaming
python frame-detection.py | ffmpeg  \
  -f rawvideo \
  -framerate 10 \
  -video_size 640x480 \
  -i - foo.mp4  \
  -vcodec libx264 \
  -acodec copy \
  -pix_fmt yuv420p \
  -color_range 2 \
  -hls_time 1 \
  -hls_list_size 5 \
  -hls_flags delete_segments \
  -use_localtime 1 \
  -hls_segment_filename '%Y%m%d-%s.ts' \
  ./playlist.m3u8


    


    I used the following commands to run the scripts and it creates a folder and generate ts segments in it

    


    ./hlslive_generator.sh hlssegments


    


    The issue i face here is with the created ts files, on playing these segments with the video player it shows improper/corrupted segments.enter image description here

    


    Can someone help me to identify the issue ? Thanks in advance

    


  • Updating app uses FFMpeg version used in older version of app

    29 juin 2020, par Android Developer

    I was using FFMpeg old version in my app and now i updated my app to new FFMpeg version.But when i update my old app version to new app version it still seems to use old version of FFMpeg until i uninstall old app version and then install new app version.I tried programmatically delete cache data in my new version of app using below code but with that also I face problem in some devices which still uses old FFMpeg version-

    


      private void clearData()
    {
        try {
            PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
            int mCurrentVersion = pInfo.versionCode;
            SharedPreferences mSharedPreferences = getSharedPreferences("xyz",  Context.MODE_PRIVATE);
            SharedPreferences.Editor mEditor = mSharedPreferences.edit();
            mEditor.apply();
            int last_version = mSharedPreferences.getInt("last_version", -1);
            if(last_version != mCurrentVersion)
            {
                deleteCache(this);
            }
            mEditor.putInt("last_version", mCurrentVersion);
            mEditor.commit();
        } catch (Exception e) {
            FirebaseCrashlytics.getInstance().recordException(e);
        }
    }
    private void deleteCache(Context context) {
        try {
            File dir = context.getCacheDir();
            deleteCacheDir(dir);
        } catch (Exception e) { FirebaseCrashlytics.getInstance().recordException(e);
        }
    }
    private boolean deleteCacheDir(File dir) {
        if (dir != null && dir.isDirectory()) {
            String[] children = dir.list();
            for (int i = 0; i < children.length; i++) {
                boolean success = deleteCacheDir(new File(dir, children[i]));
                if (!success) {
                    return false;
                }
            }
            return dir.delete();
        } else if(dir!= null && dir.isFile()) {
            return dir.delete();
        } else {
            return false;
        }
    }


    


  • FFMPEG concat leaves audio gapes between clips

    14 novembre 2022, par GotCubes

    I'm writing a python script that uses subprocess to invoke FFMPEG, not using pyffmpeg.

    



    My script generates a variable number of MP4 files using the AAC audio codec, and concatenates them together using FFMPEG. Here is how I'm constructing each clip :

    



    ffmpeg -loop 1 -i image.jpg -i recording.mp3 -tune stillimage -c:a aac -b:a 256k -shortest clip.mp4


    



    The command I'm using to concatenate them is :

    



    ffmpeg -f concat -i clip_names.txt -c copy video_raw.mp4


    



    I then take that resulting video, and mix a looping audio track over it, and adjust the volume. (Sorry for the awful formatting)

    



    ffmpeg -i video_raw -filter_complex
                 "amovie=Tracks/Breaktime.mp3:loop=0,
                  volume=0.1,
                  asetpts=N/SR/TB[aud];
                  [0:a][aud]amix[a]"
-map 0:v -map [a] -b:a 256k -shortest final_video.mp4


    



    These commands seem to work as I intend them to. When I play the resulting MP4 from my local machine, everything plays without issue.

    



    However, I uploaded the video to YouTube, and ran into issues. When the video is played from YouTube, there is about a second of silence at every timestamp where two clips were concatenated, before the next clip begins. I've tried this from Chrome, IE, and Firefox, all with the same issues.

    



    Based on what I've looked into so far, I think it could be an issue with how the priming samples of each individual clip are handled. I'm not obligated to keep using MP4 or AAC, so if using a different audio/video codec would work better, feel free to suggest !

    



    Is there some type of manipulation I can do in FFMPEG to get rid of the priming samples, or somehow process them differently ? In the end, I'm looking for each clip to play back to back without the delay that the concat operation seems to insert. Thank you !