Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (28)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

  • L’utiliser, en parler, le critiquer

    10 avril 2011

    La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
    Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
    Une liste de discussion est disponible pour tout échange entre utilisateurs.

Sur d’autres sites (4315)

  • How to change metadata with ffmpeg/avconv ?

    14 juillet 2012, par tampis

    I am writing a python script for producing audio and video podcasts. There are a bunch of recorded media files (audio and video) and text files containing the meta information.

    Now I want to program a function which shall add the information from the meta data text files to all media files (the original and the converted ones). Because I have to handle many different file formats (wav, flac, mp3, mp4, ogg, ogv...) it would be great to have a tool which add meta data to arbitrary formats.

    My Question :

    How can I change the metadata of a file with ffmpeg/avconv without changing the audio or video of it and without creating a new file ? Is there another commandline/python tool which would do the job for me ?

    What I tried so far :

    I thought ffmpeg/avconv could be such a tool, because it can handle nearly all media formats. I hoped, that if I set -i input_file and the output_file to the same file, ffmpeg/avconv will be smart enough to leave the file unchanged. Then I could set -metadata key=value and just the metadata will be changed.

    But I noticed, that if I type avconv -i test.mp3 -metadata title='Test title' test.mp3 the audio test.mp3 will be reconverted in another bitrate.

    So I thought to use -c copy to copy all video and audio information. Unfortunately also this does not work :

    :~$ du -h test.wav # test.wav is 303 MB big
    303M    test.wav

    :~$ avconv -i test.wav -c copy -metadata title='Test title' test.wav
    avconv version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the
    Libav    developers
    built on Jun 12 2012 16:37:58 with gcc 4.6.3
    [wav @ 0x846b260] max_analyze_duration reached
    Input #0, wav, from 'test.wav':
    Duration: 00:29:58.74, bitrate: 1411 kb/s
       Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
    File 'test.wav' already exists. Overwrite ? [y/N] y
    Output #0, wav, to 'test.wav':
    Metadata:
       title           : Test title
       encoder         : Lavf53.21.0
       Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, 1411 kb/s
    Stream mapping:
    Stream #0:0 -> #0:0 (copy)
    Press ctrl-c to stop encoding
    size=     896kB time=5.20 bitrate=1411.3kbits/s    
    video:0kB audio:896kB global headers:0kB muxing overhead 0.005014%

    :~$ du -h test.wav # file size of test.wav changed dramatically
    900K    test.wav

    You see, that I cannot use -c copy if input_file and output_file are the same. Of course I could produce a temporarily file :

    :-$ avconv -i test.wav -c copy -metadata title='Test title' test_temp.mp3
    :-$ mv test_tmp.mp3 test.mp3

    But this solution would create (temporarily) a new file on the filesystem and is therefore not preferable.

  • How to build and link FFMPEG to iOS ?

    30 juin 2015, par Alexander Tkachenko

    all !

    I know, there are a lot of questions here about FFMPEG on iOS, but no one answer is appropriate for my case :(
    Something strange happens each case when I am trying to link FFMPEG in my project, so please, help me !

    My task is to write video-chat application for iOS, that uses RTMP-protocol for publishing and reading video-stream to/from custom Flash Media Server.

    I decided to use rtmplib, free open-source library for streaming FLV video over RTMP, as it is the only appropriate library.

    Many problem appeared when I began research of it, but later I understood how it should work.

    Now I can read live stream of FLV video(from url) and send it back to channel, with the help of my application.

    My trouble now is in sending video FROM Camera.
    Basic operations sequence, as I understood, should be the following :

    1. Using AVFoundation, with the help of sequence (Device-AVCaptureSession-AVVideoDataOutput-> AVAssetWriter) I write this to a file(If you need, I can describe this flow more detailed, but in the context of question it is not important). This flow is necessary to make hardware-accelerated conversion of live video from the camera into H.264 codec. But it is in MOV container format. (This is completed step)

    2. I read this temporary file with each sample written, and obtain the stream of bytes of video-data, (H.264 encoded, in QuickTime container). (this is allready completed step)

    3. I need to convert videodata from QuickTime container format to FLV. And it all in real-time.(packet - by - packet)

    4. If i will have the packets of video-data, contained in FLV container format, I will be able to send packets over RTMP using rtmplib.

    Now, the most complicated part for me, is step 3.

    I think, I need to use ffmpeg lib to this conversion (libavformat). I even found the source code, showing how to decode h.264 data packets from MOV file (looking in libavformat, i found that it is possible to extract this packets even from byte stream, which is more appropriate for me). And having this completed, I will need to encode packets into FLV(using ffmpeg or manually, in a way of adding FLV-headers to h.264 packets, it is not problem and is easy, if I am correct).

    FFMPEG has great documentation and is very powerfull library, and I think, there won’t be a problem to use it. BUT the problem here is that I can not got it working in iOS project.

    I have spend 3 days reading documentation, stackoverflow and googling the answer on the question "How to build FFMPEG for iOS" and I think, my PM is gonna fire me if I will spend one more week on trying to compile this library :))

    I tried to use many different build-scripts and configure files, but when I build FFMPEG, i Got libavformat, libavcodec, etc. for x86 architecture (even when I specify armv6 arch in build-script). (I use "lipo -info libavcodec.a" to show architectures)

    So I cannot build this sources, and decided to find prebuilt FFMPEG, that is build for architecture armv7, armv6, i386.

    I have downloaded iOS Comm Lib from MidnightCoders from github, and it contains example of usage FFMPEG, it contains prebuilt .a files of avcodec,avformat and another FFMPEG libraries.

    I check their architecture :

    iMac-2:MediaLibiOS root# lipo -info libavformat.a
    Architectures in the fat file: libavformat.a are: armv6 armv7 i386

    And I found that it is appropriate for me !
    When I tried to add this libraries and headers to xCode project, It compiles fine(and I even have no warnings like "Library is compiled for another architecture"), and I can use structures from headers, but when I am trying to call C-function from libavformat (av_register_all()), the compiler show me error message "Symbol(s) not found for architecture armv7 : av_register_all".

    I thought, that maybe there are no symbols in lib, and tried to show them :

    root# nm -arch armv6 libavformat.a | grep av_register_all
    00000000 T _av_register_all

    Now I am stuck here, I don’t understand, why xCode can not see this symbols, and can not move forward.

    Please, correct me if I am wrong in the understanding of flow for publishing RTMP-stream from iOS, and help me in building and linking FFMPEG for iOS.

    I have iPhone 5.1. SDK and xCode 4.2.

  • Can't find preset files

    1er juin 2012, par Bilthon

    this is a ffmpeg issue. I've got this error saying it could not find the hq preset file, then I read in the documentation that it looks for the preset files at 'PREFIX/share/ffmpeg' and also at '$HOME/.ffmpeg'. The thing is I'm calling ffmpeg from whithin a php file that calls a python script that finally executes the command something like 'commands.getstatusoutput(command)' so I was not sure who the user was.

    The solution ? I just used -fpre and my call now looks like this :

    /usr/local/bin/ffmpeg -i ../files/tmpvideos/myStream.flv -y -acodec libfaac -ab 96k -b 800k -maxrate 800k -minrate 600k -bufsize 800k -s 720x640 -vcodec libx264 -g 300 -r 20 -fpre /home/admin/.ffmpeg/libx264-hq.ffpreset -threads 0 ../files/tmpvideos/4647-60.mp4

    I created that directory under /home/admin and am 100% sure that there the file is there now, but still ffmpeg says :

    File for preset '/home/admin/.ffmpeg/libx264-hq.ffpreset' not found

    So I'm not sure why is it not working since I'm specifying the complete path now. Any ideas ?

    One reason that I'm thinking of, is that it maybe was not compiled correctly, like with all the flags and stuff. What I mean is that while some outputs out there looked like this :

    FFmpeg version SVN-r22976, Copyright (c) 2000-2010 the FFmpeg developers
     built on Apr 30 2010 12:03:12 with gcc 4.2.1-sjlj (mingw32-2)
     configuration: --enable-shared --enable-static --enable-memalign-hack
    --enable
    -libmp3lame --enable-libx264 --enable-gpl
     libavutil     50.14. 0 / 50.14. 0
     libavcodec    52.66. 0 / 52.66. 0
     libavformat   52.61. 0 / 52.61. 0
     libavdevice   52. 2. 0 / 52. 2. 0
     libswscale     0.10. 0 /  0.10. 0

    mine looks more like this :

    Output: FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
     built on Nov 12 2010 16:32:38 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
     configuration:
     libavutil     50.15. 1 / 50.15. 1
     libavcodec    52.72. 2 / 52.72. 2
     libavformat   52.64. 2 / 52.64. 2
     libavdevice   52. 2. 0 / 52. 2. 0
     libswscale     0.11. 0 /  0.11. 0

    No configuration stuff. What do u think ? could be that this ffmpeg was not compiled correctly so it will never find the presets ? I didn't compile it, so can't be sure.

    Thanks and sorry for the verbosity of the question.

    Nelson