Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (95)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • 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.

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (11740)

  • statistics.getTime() returns always total time of input file in milli seconds during the process in android

    11 avril 2024, par Hamza

    In 6.0-2 android how can i get the percentage because statistics.getTime() returns always total time of input file in milli seconds during the process but it was working proper in previous version 4.4.LTS because in that version it was returning the time based on how much process has complete.

    


    Current behavior
It is returning total time of input file every time.

    


    Here is the link of my test application https://github.com/HamzaBula/Reverse-Video-Demo

    


    [Here is the screenshot for 4.4.LTS (frame and time both are perfect here)]
(https://i.stack.imgur.com/OEZED.png)

    


    Expected behavior
The time value should have to increase with ongoing video processing.

    


    Here is the screenshot for 6.0-2 (frame is perfect but time is not)

    


  • Why does the PyAV-encoded video have a different total time in seconds than the original file

    13 octobre 2023, par Diego Medeiros

    I'm taking a mp4 file, decoding it frame by frame and reencoding it. I'm using PyAV and the reencoding is running on h265.
When the code is running, it seems that all frames are passed from the decoder to the encoder, but at the end I have a file with 3 seconds less. For longer videos I'll have bigger differences.

    


    I have already checked the fps, it comes out with a very small variation, even if I use the Fraction type to avoid decimal differences.

    


    I'd like to know if it's some parametrization error, or if this is something to do with the encoder itself like keyframes and all those sort of things. Is there a way to fix it ?

    


    import av


container = av.open('input.mp4')

# create an output container to receive the transcoded video packets
output_container = av.open('output.mp4', 'w', format='mp4')
# add a stream to output container with same fps as input and h265 codec
output_stream = output_container.add_stream(
    'libx265', rate=container.streams.video[0].average_rate)
# set the output stream size
output_stream.width = 640
output_stream.height = 480

print('Starting transcoding...')

actual_frame = 0
container_total_frames = container.streams.video[0].frames

# start decoding packets and reading frames from the container
try:
    for packet_input in container.demux():
        if packet_input.dts is None:
            break
        for frame in packet_input.decode():

            try:
                actual_frame += 1
                # convert the frame to a numpy array
                img = frame.to_ndarray(format='bgr24')

                # prepare the ndarray frame and encode it
                frame_nd = av.VideoFrame.from_ndarray(img, format='bgr24')
                packet_output = output_stream.encode(frame_nd)
                output_container.mux(packet_output)
                print('Frame: {}/{}'.format(actual_frame, container_total_frames))
            except Exception as e:
                print("Error writing frame: ", e)
                break
except Exception as e:
    print('Finished transcoding')

output_container.close()

print('Finished transcoding')



    


  • Getting the total samples of an audio file using ffmpeg.exe in C#

    12 juillet 2023, par hello world

    I'm currently working on a C# project where I need to determine the total number of samples in an audio file using ffmpeg.exe. I've been attempting to achieve this by executing the ffmpeg.exe command within my C# code and parsing the output, but I haven't been successful so far.

    


    Here's the code I've tried :

    


    using System;
using System.Diagnostics;

public class AudioUtils
{
    public static int GetTotalSamples(string audioFilePath)
    {
        string ffmpegPath = "path/to/ffmpeg.exe"; // Path to ffmpeg.exe

        Process process = new Process();
        ProcessStartInfo startInfo = new ProcessStartInfo
        {
            FileName = ffmpegPath,
            Arguments = $"-i \"{audioFilePath}\" -af \"volumedetect\" -vn -sn -dn -f null /dev/null 2>&1",
            RedirectStandardOutput = true,
            RedirectStandardError = true,
            UseShellExecute = false,
            CreateNoWindow = true
        };

        process.StartInfo = startInfo;
        process.Start();

        string output = process.StandardError.ReadToEnd();
        process.WaitForExit();

        int totalSamples = 0;
        // Parsing logic to extract total samples from output goes here...

        return totalSamples;
    }
}


    


    I suspect there might be an issue with the command or the parsing logic in the code snippet above. Could someone please guide me on how to correctly execute ffmpeg.exe and extract the total number of samples from the output in C# ? Any insights, alternative approaches, or modifications to the code would be greatly appreciated. Thank you in advance for your assistance !