Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (79)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

Sur d’autres sites (8308)

  • FFMPEG get an error message

    26 juillet 2018, par Tom

    I’m writing a batch script, encoding files using FFMPEG to MP3. Some files aren’t being converted, and FFMPEG doesn’t write in the terminal why. Is there a way to get any error messages in a case a process wasn’t successful ?

    Another example, I tried to convert with the same script a text file, obviously it didn’t work, but FFMPEG didn’t provide any error information. That’s why I’m asking if there’s a way, or if FFMPEG even has anything like that.

    Edit :

    The Code :

    FFMPEG.exe -loglevel quiet -i "%%F" -vn -ar 44100 -ac 2 -ab 192k -f mp3 output.mp3

    and the output is :

    FFmpeg version SVN-r13712, Copyright (c) 2000-2008 Fabrice Bellard, et al.
     configuration: --enable-memalign-hack --enable-avisynth --enable-libxvid --enable-libx264 --enable-libgsm --enable-libfaac --enable-libfaad --enable-liba52 --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-pthreads --enable-swscale --enable-gpl
     libavutil version: 49.7.0
     libavcodec version: 51.57.2
     libavformat version: 52.14.0
     libavdevice version: 52.0.0
     built on Jun  8 2008 21:33:14, gcc: 4.2.3
    D:\Documents\ffmpeg.exe: unrecognized option '-loglevel'
  • Catch if the Java process crashed

    10 mai 2018, par Victor Sheyanov

    I run java process to convert video using ffmpeg.exe.

    Runtime rt = Runtime.getRuntime();
    String cmd = FFMPEGFULLPATH + " -y -i " + '"' + mpeg4File + '"' + " -vcodec libx264 -vsync 2 " + '"' + H264file + '"';

    Process pr = rt.exec(cmd);

    ThreadedTranscoderIO errorHandler = new ThreadedTranscoderIO(pr.getErrorStream(), "Error Stream");
    errorHandler.start();
    ThreadedTranscoderIO inputHandler = new ThreadedTranscoderIO(pr.getInputStream(), "Output Stream");
    inputHandler.start();

    try {
         pr.waitFor();
    } catch (InterruptedException e) {
         LiveApplication.logger.info("Some shit happens during convertation 2 ");
         throw new IOException("UseTranscoderBlocking - Run_FFMPEG - process interrupted " + e);                  
    }

    But when the process started, sometimes especially with big files, but not always i get this windows message :

    enter image description here

    This happens only on Windows server 2008 and didn’t happened on Windows 7.

    I have 2 questions :

    1. Why this process fails ?
    2. Can I catch this fail in Java, close
      this window and continue thread execution (maybe I’ll restart this
      proccess).
  • Trying to convert an mp3 file to a Numpy Array, and ffmpeg just hangs

    29 mai 2021, par Rich

    I'm working on a music classification methodology with Scikit-learn, and the first step in that process is converting a music file to a numpy array.

    



    After unsuccessfully trying to call ffmpeg from a python script, I decided to simply pipe the file in directly :

    



    FFMPEG_BIN = "ffmpeg"
cwd = (os.getcwd())
dcwd = (cwd + "/temp")
if not os.path.exists(dcwd): os.makedirs(dcwd)

folder_path = sys.argv[1]
f = open("test.txt","a")

for f in glob.glob(os.path.join(folder_path, "*.mp3")):
    ff = f.replace("./", "/")
    print("Name: " + ff)
    aa = (cwd + ff)

    command = [ FFMPEG_BIN,
        '-i',  aa,
        '-f', 's16le',
        '-acodec', 'pcm_s16le',
        '-ar', '22000', # ouput will have 44100 Hz
        '-ac', '1', # stereo (set to '1' for mono)
        '-']

    pipe = sp.Popen(command, stdout=sp.PIPE, bufsize=10**8)
    raw_audio = pipe.proc.stdout.read(88200*4)
    audio_array = numpy.fromstring(raw_audio, dtype="int16")
    print (str(audio_array))
    f.write(audio_array + "\n")


    



    The problem is, when I run the file, it starts ffmpeg and then does nothing :

    



    [mp3 @ 0x1446540] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '/home/don/Code/Projects/MC/Music/Spaz.mp3':
  Metadata:
    title           : Spaz
    album           : Seeing souns
    artist          : N*E*R*D
    genre           : Hip-Hop
    encoder         : Audiograbber 1.83.01, LAME dll 3.96, 320 Kbit/s, Joint Stereo, Normal quality
    track           : 5/12
    date            : 2008
  Duration: 00:03:50.58, start: 0.000000, bitrate: 320 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
Output #0, s16le, to 'pipe:':
  Metadata:
    title           : Spaz
    album           : Seeing souns
    artist          : N*E*R*D
    genre           : Hip-Hop
    date            : 2008
    track           : 5/12
    encoder         : Lavf56.4.101
    Stream #0:0: Audio: pcm_s16le, 22000 Hz, mono, s16, 352 kb/s
    Metadata:
      encoder         : Lavc56.1.100 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help


    



    It just sits there, hanging, for far longer than the song is. What am I doing wrong here ?,