Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (97)

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

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

Sur d’autres sites (10666)

  • FFMPEG : audio out of sync

    15 novembre 2020, par Martin

    ffmpeg -rtsp_transport tcp -i "rtsp://.............." -re -stream_loop -1 -i audio.m4a -filter_complex "[0:a]highpass=f=200,lowpass=f=3000,volume=0.3[mic];[1:a]volume=0.1[mic2];[mic][mic2]amix=duration=shortest[a]" -map 0:v -map "[a]" -c:v copy -b:a 320k -c:a aac -f flv "rtmp://......."

    


    This is my working very well script thanks to @Ilogan

    


    But now i have a problem with an audio out of sync, i don't care about the second one, its just a file audio but the first one is from a microphone of camera IP so it should be synced with the video but now the sound from a microphone is almost 28 seconds later.

    


    Any tips how to do it ?

    


    adelay=28000 ? - nope, that didnt help since i need to delay the video to sync this with an audio.Also tried -use_wallclock_as_timestamps 1 but it didnt help neither.
Also i used -itsoffset 28 it helped but for a while, looks like that the delay time between video and audio is rising and now its 40sec+
Whats going on ?

    


    Now i'm trying with tpad=start_duration=28

    


    edit :

    


      Metadata:
    title           : NVT
    comment         : From NVT
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuvj420p(pc, progressive), 1920x1080, 5 fps, 30 tbr, 90k tbn, 10 tbc
    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
    Stream #0:2: Data: none
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'audio.m4a':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    title           : Nature
    artist          : 
    date            : 2018
    encoder         : Lavf58.20.100
    comment         : 
  Duration: 08:20:49.15, start: 0.000000, bitrate: 129 kb/s
    Stream #1:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc. Created on: 01/28/2020.
Stream mapping:
  Stream #0:1 (pcm_mulaw) -> highpass
  Stream #1:0 (aac) -> volume
  Stream #0:0 -> #0:0 (copy)
  amix -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[rtsp @ 0x82e490] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
Output #0, flv, to 'rtmp://....':
  Metadata:
    title           : NVT
    comment         : From NVT
    encoder         : Lavf58.20.100
    Stream #0:0: Video: h264 (High) ([7][0][0][0] / 0x0007), yuvj420p(pc, progressive), 1920x1080, q=2-31, 5 fps, 30 tbr, 1k tbn, 90k tbc
    Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      encoder         : Lavc58.35.100 aac
frame=    7 fps=0.0 q=-1.0 size=     572kB time=00:00:00.44 bitrate=10634.7kbitsframe=   13 fps= 13 q=-1.0 size=     697kB time=00:00:00.88 bitrate=6463.4kbits/frame=   25 fps= 16 q=-1.0 size=    1185kB time=00:00:01.48 bitrate=6533.1kbits/frame=   33 fps= 16 q=-1.0 size=    1390kB time=00:00:01.99 bitrate=5702.1kbits```


    


  • How to generate a video by looping an image and then concat with another very long video without re-encoding using ffmpeg ?

    23 mars 2021, par Linghao Chen

    I have an image and a very long video (1.5h).
Now I want to generate a heading video about 5 seconds by looping the image, and then concatenate it with the long video. Since the video is long, I don't want to re-encode the videos.
I have tried to generate the heading video using

    


    ffmpeg -loop 1 -i image.png -c:v libx264 -t 5 -pix_fmt yuv420p head.mp4


    


    and then

    


    ffmpeg -f concat -i list.txt -c:v copy concat.mp4


    


    where the list.txt contains

    


    file head.mp4
file longvideo.mp4


    


    I have tried these operations on two machines.
On one machine, the concatenated video has no audio. Moreover, it stucks at 5-10 seconds and directly jump to 11s.
On the other machine, the video and audio are not synchronized.

    


    To provide more information, I have checked the codecs of the two videos by

    


    ffprobe -v error -select_streams v:0 -show_entries stream=codec_name \
  -of default=noprint_wrappers=1:nokey=1 xxxxx.mp4


    


    Both of them are h264.

    


    My question is, how to generate it correctly with ffmpeg ? If it is hard using ffmpeg, is there any method to do it fast ? As far as I know, Adobe Premiere and Final Cut Pro do not export as fast as I expect because they re-encode the videos.

    


  • Using ffmpeg to chunk a long audio file

    3 novembre 2020, par Boris Adaev

    I have the following code here to split a long audio file (15 hours long) into shorter chunks (each a little over an hour long, except the last 16th one, which is whatever remains).

    


    import subprocess
import os, math

def get_length(input_video):
    result = subprocess.run(['ffprobe', '-v', 'error', '-show_entries', 'format=duration',
                             '-of', 'default=noprint_wrappers=1:nokey=1', input_video],
                             stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    return float(result.stdout)

def chunk(fname, title, split_by=3600):
    head_dir = title + ' (split)'
    if head_dir not in os.listdir():
        os.mkdir(head_dir)

    dur_seconds = get_length(fname)
    iters = math.ceil(dur_seconds / split_by)

    left_off = 0

    print(dur_seconds)

    for i in range(1, iters+1):
        last_iter = i == iters
        if not last_iter:
            go_till = left_off + 3630
        else:
            go_till = int(dur_seconds)

        print(f'from {left_off} to {go_till} for {i:02d}.mp3')
        subprocess.call(['ffmpeg', '-i', fname, '-ss', str(left_off), '-to', str(go_till),
                         '-c', 'copy', f'{head_dir}/{i:02d}.mp3'])
        left_off += 3600

fname = 'Brian C. Muraresku - The Immortality Key The Secret History of the Religion with No Name.mp3'
title = 'The Immortality Key'

chunk(fname, title)


    


    The code makes perfect sense, and when I run it with the subprocess.call line commented out, what it prints also makes sense.

    


    54681.353625
from 0 to 3630 for 01.mp3
from 3600 to 7230 for 02.mp3
from 7200 to 10830 for 03.mp3
from 10800 to 14430 for 04.mp3
from 14400 to 18030 for 05.mp3
from 18000 to 21630 for 06.mp3
from 21600 to 25230 for 07.mp3
from 25200 to 28830 for 08.mp3
from 28800 to 32430 for 09.mp3
from 32400 to 36030 for 10.mp3
from 36000 to 39630 for 11.mp3
from 39600 to 43230 for 12.mp3
from 43200 to 46830 for 13.mp3
from 46800 to 50430 for 14.mp3
from 50400 to 54030 for 15.mp3
from 54000 to 54681 for 16.mp3


    


    But with the subprocess.call line, it creates these audios (01.mp3, 02.mp3, 03.mp3, etc.), but the timestamps are wrong. When the code is done running, they all start from the same place for some odd reason.

    


    UPDATE : I also tried placing the -i part after the -ss part, as well as the following

    


    subprocess.call(['ffmpeg', '-ss', str(left_off), '-i', fname, '-t', '3630',
                 '-c', 'copy',  f'{head_dir}/{i:02d}.mp3'])


    


    But still the same problem. 15 identical audios, of which only the 15th is the way it's supposed to be, and then the last 16th ten minute remainder. When I run them separately, it goes as follows :

    


    01.mp3 is right,

    


    02.mp3 is right but 01.mp3 is now wrong, because it's identical to 02.mp3

    


    03.mp3 is right, but the previous two are identical to it

    


    04.mp3 is right, but the previous three are identical to it

    


    ... and so on