Recherche avancée

Médias (91)

Autres articles (49)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (7053)

  • ffmeg : audio drifts in merged TS file for separate audio and video TS files

    13 septembre 2021, par Ronnie Marksch

    basic situation

    


    I have two lists of TS files (each list is specified in an m3u8 file).
The TS files in the first list have only video.
The TS files in the second list have only audio.

    


    I combine the TS files from the first list to get the video only file result_video.ts of duration A (see code for this used below).
I combine the TS files from the second list to get the audio only file result_audio.ts of duration B (see code for this used below).
The problem is that A * 76.28% = B whereas I expected both files to have the same length.
I then combine result_video.ts and result_audio.ts and get a result.ts file where the audio drifts from the video heavily and where the audio has gaps at the points where the chunks have been merged.

    


    Question : how to ensure that the audio is not too slow ? or : how to combine the TS files properly.

    


    code for obtaining the two result files

    


    ffmpeg -safe 0 -f concat -i filelist_video.txt -c copy result_video.ts
ffmpeg -safe 0 -f concat -i filelist_audio.txt -c copy result_audio.ts


    


    code for obtaining the final result

    


    ffmpeg.exe -i .\video_merge_0.ts -i .\audio_merge_0.ts -c copy result.ts


    


    test using only one TS file

    


    I copied the first of the audio input TS files to another TS file.
Doing that produced the output below with a muxing overhead of 22.44%, which is suspiciously close to 1-76.28%.

    


    ffmpeg.exe -i audio_chunk1.ts -c copy audio_chunk1_tmp.ts


    


    I get the info :

    


    Output #0, mpegts, to 'audio_chunk1.ts':
  Metadata:
    encoder         : Lavf58.45.100
    Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 125 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=     118kB time=00:00:05.99 bitrate= 161.1kbits/s speed=3.48e+03x
video:0kB audio:96kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 22.444508%


    


    using hls

    


    The following now produces files audio_chunk1_tmp.ts, audio_chunk1_tmp0.ts, ... audio_chunk1_tmp2.ts. So for some reason, the single file already gets split. However, ffmpeg shows that the duration of the result is 5.99s for the 5.87s input (which may be ok).

    


    ffmpeg.exe -i audio_chunk1.ts -f hls audio_chunk1_tmp.ts


    


  • Setting UseShellExecute = false doesn't work in Process.Start

    5 décembre 2015, par Alex Jolig

    There’s a good Q&A about hiding shell execute when running a process which led me to write my own code using ffmpeg :

    Process proc = new Process();
    proc.StartInfo.FileName = "ffmpeg";
    proc.StartInfo.Arguments = string.Format("-ss {0} -i \"{1}\" -t {2}{3} DB\\Media\\{4}{5} -y",
        TimeSpan.Parse(row.Cells["StartdgvList"].Value.ToString()),
        openFileDialog.FileName, _durationTime, quality, newTmpSound,
        GetExtension(openFileDialog.FileName));
    proc.StartInfo.RedirectStandardError = true;
    proc.StartInfo.UseShellExecute = false;
    proc.StartInfo.CreateNoWindow = true;
    if (!proc.Start()) return;
    StreamReader reader = proc.StandardError;
    string line;
    while ((line = reader.ReadLine()) != null && !_cancel)
    {
     //Doing something with process line
    }
    proc.Close();

    This works fine, But when I run it in a few user machines, it just stops working with no error.

    I tried removing lines which hides shell window and turned it to this :

    Process proc = new Process();
    proc.StartInfo.FileName = "ffmpeg";
    proc.StartInfo.Arguments = string.Format("-ss {0} -i \"{1}\" -t {2}{3} DB\\Media\\{4}{5} -y",
        TimeSpan.Parse(row.Cells["StartdgvList"].Value.ToString()),
        openFileDialog.FileName, _durationTime, quality, newTmpSound,
        GetExtension(openFileDialog.FileName));
    if (!proc.Start()) return;
    proc.Close();

    and it start working in all the machines.

    I’m wondering if there’s some sort of service or components missing in some machines which makes the process fails when console is hiding.

    I appreciate if anyone has any idea.

    P.S : I installed Visual Studio 2012 on a machine which has problem hiding shell window and it suddenly start working. Maybe VS2012 installed somwthing on the machine which solved the problem.

  • ffmpeg process stops for no reason at random position

    29 septembre 2021, par Peter Hammi

    I have a encoding script which can re-encode/repack h264, h265, acc, ac3, mp3, flac etc. using ffmpeg version 4.4 into HLS (http-live-stream). Actually the script is working pretty awesome and I have very nice results but for some reason my conversion process breaks if it simply runs long.

    


    Basically the ffmpeg process gets executed within docker using a
simple command call like so :

    


    def exec_command(string):
    """
    Shell command interface

    Returns returnCode, stdout, stderr
    """
    log('DEBUG', f'[Command] {string}')
    output = run(string, shell=True, check=True, capture_output=True)
    return output.returncode, output.stdout, output.stderr


    


    I sadly can't get to much into detail as the code is closed source and more than 1000 lines long, anyways the string parameter that gets passed and containing the command to be executed looks like this :

    


    command += f' -map 0:{stream["index"]} {build_command_encode(stream, job["config"])} -map_metadata -1 -map_chapters -1 -f hls -hls_time 6 -hls_list_size 0 -hls_segment_filename "{path}/f-%04d.m4s" -hls_fmp4_init_filename "init-{name}.m4s" -hls_segment_type fmp4 -movflags frag_keyframe -hls_flags independent_segments "{path}/master.m3u8"'


    


    Can maybe someone imagine why the ffmpeg process break for no reason ?

    


    Thanks in advance