Recherche avancée

Médias (91)

Autres articles (78)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (10980)

  • Is there a way to (automatically) detect if the channels of a stereo video/audio are out of phase and canceling each other ?

    8 mars 2024, par Rhenan Bartels

    Background

    


    I've encountered an issue while attempting to convert an audio downloaded from a youtube video into a mono .wav format using ffmpeg. Despite using typical conversion commands (code below), the resulting audio is either silent or corrupted, indicating potential stereo channel cancellation.
I tried to load the audio into Python and calculate phase and cross-correlation, but this step uses a lot of memory, especially for a 6-hour-long audio.

    


    Goal

    


    I'm seeking a method, preferably using ffmpeg, to detect if stereo channels are canceling each other out due to phase misalignment. Additionally, I aim to automate the process of phase inversion before converting to mono to ensure the integrity of the resulting audio.

    


    Question :

    


    How can I automatically detect if stereo channels are canceling each other and subsequently invert the phase to ensure successful conversion to mono using ffmpeg ? Any insights, solutions, or alternative approaches would be greatly appreciated.

    


    Steps Taken :

    


      

    1. Downloaded audio from YouTube using yt-dlp.
    2. 


    3. Attempted audio conversion to mono using ffmpeg, resulting in silent or corrupted output.
    4. 


    5. Successfully converted audio to mono by manually inverting the phase of one channel prior to conversion.
    6. 


    


    Download audio from youtube

    


    yt-dlp -f bestaudio https://www.youtube.com/watch?v=s3QB_rJzH08 -o input.webm


    


    Audio conversion

    


    The resulting file is silent or corrupted

    


    ffmpeg -i input.webm  -ac 1 -ar 16000 -c:a pcm_s16le output.wav


    


    Audio conversion to mono .wav with phase inversion

    


    The resulting file has audio

    


    ffmpeg -i input.webm -af "aeval=val(0)|-val(1)" -ac 1 -ar 16000 -c:a pcm_s16le output.wav


    


  • how to begin streaming while ffmpeg is still transcoding the file in PHP

    15 janvier 2013, par Joyal

    I want to transcode an AVI video to mp4 with ffmpeg, but while is still transcoding, I would like to watch the video transcoded on a flash video player in realtime , Im using jwplayer , I made some test with mp4 and works great , but Im not able to make it work while is transcoding

    I made a php script to run the command in background

    ffmpeg.exe -threads 1 -y -i "a.avi" -s 1280x720 -f mp4 -vcodec libx264 -b 2000000 -ab 128000 -ar 44100 "a.mp4"

    on the jwplayer i have as source "a.mp4"

  • ffmpeg transcode to youtube live bad video container

    13 juillet 2017, par popcorn9499

    I’ve been attempting to transcode a stream produced by obs studio to my nginx server and send it off to youtube. Now I’ve made it work with twitch and I know these settings are actually transcoding it mostly correctly and is viewable. The problem being that youtube live picks it up as Bad video settings and tells me to change the current video container format. The other side effect that is probly unrelated is the stream looks really poorly on youtube. Looks like it was streamed at a poor bitrate and stuff but the real problem is the bad video settings error.

    The ffmpeg command being used is as follows

    ffmpeg -i rtmp://localhost/Private/Private1 -vb 6000k -minrate 6000k -maxrate 6000k -bufsize 6000k -s 1280x720 -c:v libx264 -preset faster -r 50 -g 100 -keyint_min 50 -x264opts nal-hrd=cbr:force-cfr=1 -sws_flags lanczos -tune film -pix_fmt yuv420p -c:a copy -f flv -threads 6 -strict normal  rtmp://a.rtmp.youtube.com/live2/{key}

    I’ve tried with different framerates and been googling for awhile and found nothing or interpreted everything wrongly. Either way I would be very happy for some help here.

    System info.

    • OS : Ubuntu Server 16.04 LTS
    • Ram : 10gb
    • Processor : AMD Phenom(tm) II X6 1090T
    • GPU : Geforce GT 520

    Internet.

    • Upload 15mbit
    • Download 150mbit

    If you need any more info I will gladly send it. Thanks for reading.

    Edit 1

    After some googling about what I’m doing wrong I decided to try and change stuff slightly and came up with this command

    ffmpeg -re -i rtmp://localhost/(app)/(key) -c:v libx264 -r 50 -g 100 -keyint_min 100 -x264opts "keyint=100:min-keyint=100:no-scenecut" -sws_flags lanczos -profile:v baseline -preset veryfast -vb 6000K -minrate 6000k -maxrate 6000k -bufsize 6000k -s 1280x720 -tune film,zerolatency -pix_fmt yuv420p -f flv -c:a copy -ac 1 -strict normal rtmp://(output site)/(output app)/(output key)

    which as of my current testing seems to at least have a healthy stream for longer than 2 minutes if i only output to youtube live directly. Ive found output to my nginx server then youtube live breaks things.

    my nginx rtmp settings are on this link https://pastebin.com/siE99Tv8

    Edit 2

    If I push the stream to a site like restream to stream it to youtube then it seems to be working. tested for 25 minutes with no change of them saying bad video container or anything. So I’m going to say nginx is partly to blame in how its distributing the files ? Unsure what I’m doing wrong. I am pretty sure ffmpeg isn’t to blame here at least