Recherche avancée

Médias (1)

Mot : - Tags -/wave

Autres articles (66)

  • Submit enhancements and plugins

    13 avril 2011

    If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
    You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone.

  • 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

  • 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 (5920)

  • Anomalie #4345 : super_cron HS en https

    11 juin 2019, par jluc -

    Voici le nouveau .diff avec tout : "supercron v2"
    - le port 443 et le préfixe ssl :// pour fsockopen si on en est https
    - les logs d’échecs de connexion et de fsockopen
    - le timestamp sur l’url pour bypasser les caches

  • Does ffplay has support for https with ssl client certificate

    16 août 2017, par sandeep

    I have a webserver streaming a video over hls (https).My webserver needs ssl client certificate to authenticate.How I can provide ssl client certificate to ffplay so that I can play the hls stream.I am getting a 400 - bad request error while trying to play https url.

  • Python can't access FFmpeg binary in /data/user/0/com.app.name/files/ in Android Studio

    18 octobre 2024, par Dudek 3D

    I'm a beginner in android development (and java). I'm making a hybrid application in java which runs python (using chaquopy).
MainActivity.java runs the python script fine, the only problem is that the yt_dlp library that I've used can't access FFmpeg.
The FFmpeg binary file (for linuxarm64, I don't think that's the problem) is located in the assets folder (src/main/assets), then it's copied to /data/user/0/com.app.name/files :

    


    //FileUtils.java
public class FileUtils {
    public static void copyAsset(Context context, String assetName, String outputPath) {
        AssetManager assetManager = context.getAssets();
        try {
            InputStream in = assetManager.open(assetName);
            File outFile = new File(outputPath);
            OutputStream out = new FileOutputStream(outFile);
            byte[] buffer = new byte[1024];
            int read;
            while ((read = in.read(buffer)) != -1) {
                out.write(buffer, 0, read);
            }
            in.close();
            out.close();

            // Set executable permissions for the binary
            outFile.setExecutable(true);  // Ensure the file is executable
            outFile.setReadable(true);
            outFile.setWritable(true);
            Log.d("FileUtils", "FFmpeg File - Exists: " + outFile.exists() +
                    ", Executable: " + outFile.canExecute());

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}


//MainActivity.java
public class MainActivity extends AppCompatActivity {
    private pyRun pyrun;
    private static final int REQUEST_CODE_PERMISSION = 123;
    private static final String TAG = "MainActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Log.d("YTDownloader", "onCreate: Starting...");
        String ffmpegPath = getFilesDir() + "/ffmpeg";

        // Copy the binary
        FileUtils.copyAsset(this, "ffmpeg", ffmpegPath);

        // Check if file exist and log
        Log.d(TAG, "FFmpeg exists: " + new File(ffmpegPath).exists());
        Log.d(TAG, "PATH: "+ffmpegPath);

        //load python
        //load webview
    }
    //other functions
}


    


    And finally it should be loaded by yt_dlp in python :

    


    import os
import yt_dlp as youtube_dl
ffmpeg_path='/data/user/0/com.dudek3d.ytdownloader/files/ffmpeg'

ydl_opts = {
'ffmpeg_location': ffmpeg_path,
'format': 'bestvideo+bestaudio/best',
'postprocessors': [{
        'key': 'FFmpegVideoConvertor',
        'preferedformat': 'mp4'}],
'noplaylist': True,
'quiet': True,
'merge_output_format': 'mp4',
'outtmpl': filename+'.%(ext)s',
}

with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download([url])


    


    The downloaded file is corrupted because FFmpeg is not found.
I've found out that ffmpeg file cannot be accessed from neither Java nor Python.

    


    I've tried :

    


    1)
Changing the paths to cache : ffmpeg_path='/data/user/0/com.dudek3d.ytdownloader/cache/ffmpeg'
Changing the paths to data : ffmpeg_path='/data/data/com.dudek3d.ytdownloader/files/ffmpeg'
Changing the paths to data cache : ffmpeg_path='/data/data/com.dudek3d.ytdownloader/cache/ffmpeg'

    


    2)
Accessing ffmpeg path from MainActivity.java and got "Permission Denied" Error, so I added

    


    



    


    to AndroidManifest.xml but still the same error occurs.

    


    3)
Using ffmpeg implementations in dependecies in build.gradle (app Module) such as : 'com.arthenica:ffmpeg-kit-full:4.5'
but this won't work because I think that's accessible by java and not python.

    


    4)
I've changed location of ffmpeg to src/main/jniLibs/arc64-v8a :
ffmpegPath = getApplicationInfo().nativeLibraryDir + "/ffmpeg";
passed that to python :

    


    def run(format_choice, listt, ffmpeg_pat, ffprobe_pat):
    global ffmpeg_path, ffprobe_path
    ffmpeg_path, ffprobe_path= ffmpeg_pat, ffprobe_pat


    


    but I got :
WARNING: ffmpeg-location /data/app/~~42sSKOephY26jjdLYW7wmw==/com.dudek3d.ytdownloader-OWqWbazkZobYNlsqTsxfyA==/lib/x86_64/ffmpeg does not exist!

    


    I hope it's clear, thanks in advance.