Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (57)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (10383)

  • FFMPEG failing to convert to ogv [closed]

    25 juillet 2012, par Todd R

    I have several videos I'm trying to convert to mp4, swf and ogv. I've got the mp4 and swf's working, but ogv is failing and I'm not sure why. I understand all the arguments you can pass to ffmpeg, but feel like getting the correct ones is a huge guessing game. Any suggestions on what I can change to get this to work would be much appreciated.

    Here's the command I'm using :

    ffmpeg -i /private/var/tmp/phpU5KPR7 -y -s 330X240 -acodec libvorbis -vcodec libtheora outputpath/Videos/1.ogv 2>&1

    And here are the results :

    2012-07-24T19:05:11-07:00 INFO (6): Creating ogv for 1 returned 1:
    2012-07-24T19:05:11-07:00 INFO (6): Array
    (
       [0] => ffmpeg version 0.8.6, Copyright (c) 2000-2011 the FFmpeg developers
       [1] =>   built on Nov 16 2011 19:56:59 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
       [2] =>   configuration: --enable-libmp3lame --enable-libfaac --enable-libtheora --enable-libvorbis --enable-nonfree --disable-yasm
       [3] =>   libavutil    51.  9. 1 / 51.  9. 1
       [4] =>   libavcodec   53.  7. 0 / 53.  7. 0
       [5] =>   libavformat  53.  4. 0 / 53.  4. 0
       [6] =>   libavdevice  53.  1. 1 / 53.  1. 1
       [7] =>   libavfilter   2. 23. 0 /  2. 23. 0
       [8] =>   libswscale    2.  0. 0 /  2.  0. 0
       [9] => Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/private/var/tmp/phpU5KPR7':
       [10] =>   Metadata:
       [11] =>     major_brand     : 3gp4
       [12] =>     minor_version   : 768
       [13] =>     compatible_brands: 3gp43gp6
       [14] =>   Duration: 00:00:03.17, start: 0.000000, bitrate: 433 kb/s
       [15] =>     Stream #0.0(eng): Audio: amrnb, 8000 Hz, 1 channels, flt, 12 kb/s
       [16] =>     Stream #0.1(eng): Video: mpeg4, yuv420p, 352x288 [PAR 1:1 DAR 11:9], 411 kb/s, 13.87 fps, 15 tbr, 15k tbn, 15 tbc
       [17] => WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
       [18] => Incompatible sample format 'flt' for codec 'libfaac', auto-selecting format 's16'
       [19] => [buffer @ 0x101001480] w:352 h:288 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
       [20] => [scale @ 0x101002560] w:352 h:288 fmt:yuv420p -> w:330 h:240 fmt:yuv420p flags:0x4
       [21] => Output #0, mp4, to 'outputpath/Videos/1.mp4':
       [22] =>   Metadata:
       [23] =>     major_brand     : 3gp4
       [24] =>     minor_version   : 768
       [25] =>     compatible_brands: 3gp43gp6
       [26] =>     encoder         : Lavf53.4.0
       [27] =>     Stream #0.0(eng): Video: mpeg4, yuv420p, 330x240 [PAR 8:9 DAR 11:9], q=2-31, 300 kb/s, 20 tbn, 20 tbc
       [28] =>     Stream #0.1(eng): Audio: libfaac, 44100 Hz, 1 channels, s16, 0 kb/s
       [29] => Stream mapping:
       [30] =>   Stream #0.1 -> #0.0
       [31] =>   Stream #0.0 -> #0.1
       [32] => Press [q] to stop, [?] for help
       [33] => Warning, using s16 intermediate sample format for resampling
       [34] => frame=   62 fps=  0 q=6.4 Lsize=     253kB time=00:00:03.08 bitrate= 670.6kbits/s dup=18 drop=0
       [35] => video:238kB audio:12kB global headers:0kB muxing overhead 1.096923%
       [36] => ffmpeg version 0.8.6, Copyright (c) 2000-2011 the FFmpeg developers
       [37] =>   built on Nov 16 2011 19:56:59 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
       [38] =>   configuration: --enable-libmp3lame --enable-libfaac --enable-libtheora --enable-libvorbis --enable-nonfree --disable-yasm
       [39] =>   libavutil    51.  9. 1 / 51.  9. 1
       [40] =>   libavcodec   53.  7. 0 / 53.  7. 0
       [41] =>   libavformat  53.  4. 0 / 53.  4. 0
       [42] =>   libavdevice  53.  1. 1 / 53.  1. 1
       [43] =>   libavfilter   2. 23. 0 /  2. 23. 0
       [44] =>   libswscale    2.  0. 0 /  2.  0. 0
       [45] => Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/private/var/tmp/phpU5KPR7':
       [46] =>   Metadata:
       [47] =>     major_brand     : 3gp4
       [48] =>     minor_version   : 768
       [49] =>     compatible_brands: 3gp43gp6
       [50] =>   Duration: 00:00:03.17, start: 0.000000, bitrate: 433 kb/s
       [51] =>     Stream #0.0(eng): Audio: amrnb, 8000 Hz, 1 channels, flt, 12 kb/s
       [52] =>     Stream #0.1(eng): Video: mpeg4, yuv420p, 352x288 [PAR 1:1 DAR 11:9], 411 kb/s, 13.87 fps, 15 tbr, 15k tbn, 15 tbc
       [53] => Incompatible sample format 'flt' for codec 'libvorbis', auto-selecting format 's16'
       [54] => [buffer @ 0x1010021a0] w:352 h:288 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
       [55] => [scale @ 0x101002520] w:352 h:288 fmt:yuv420p -> w:330 h:240 fmt:yuv420p flags:0x4
       [56] => [libvorbis @ 0x101801e00] oggvorbis_encode_init: init_encoder failed
       [57] => Output #0, ogg, to 'outputpath/Videos/1.ogv':
       [58] =>     Stream #0.0(eng): Video: libtheora, yuv420p, 330x240 [PAR 8:9 DAR 11:9], q=2-31, 200 kb/s, 90k tbn, 15 tbc
       [59] =>     Stream #0.1(eng): Audio: libvorbis, 8000 Hz, 1 channels, s16, 64 kb/s
       [60] => Stream mapping:
       [61] =>   Stream #0.1 -> #0.0
       [62] =>   Stream #0.0 -> #0.1
       [63] => Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
    )
  • Audio out of sync, direct capture device stream (Windows 10)

    3 mai 2020, par user3459555

    Using ffplay, the video stays in sync using this command :

    



    ffplay -f dshow -rtbufsize 702000k video="Cam Link"
ffplay version git-2020-05-01-39fb1e9 Copyright (c) 2003-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200328
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 43.100 / 56. 43.100
  libavcodec     58. 82.100 / 58. 82.100
  libavformat    58. 42.101 / 58. 42.101
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 80.100 /  7. 80.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, dshow, from 'video=Cam Link':vq=    0KB sq=    0B f=0/0
  Duration: N/A, start: 141954.961000, bitrate: N/A
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 59.94 fps, 59.94 tbr, 10000k tbn, 10000k tbc
142992.53 M-V: -0.001 fd=   3 aq=    0KB vq=    0KB sq=    0B f=0/0


    



    Every controller button press stays in sync.

    



    The audio however :

    



    ffplay -f dshow audio="Digital Audio Interface (Cam Link)" -tune zerolatency
ffplay version git-2020-05-01-39fb1e9 Copyright (c) 2003-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200328
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 43.100 / 56. 43.100
  libavcodec     58. 82.100 / 58. 82.100
  libavformat    58. 42.101 / 58. 42.101
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 80.100 /  7. 80.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, dshow, from 'audio=Digital Audio Interface (Cam Link)':
  Duration: N/A, start: 143092.007000, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
143103.21 M-A:  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0


    



    Is always behined by about a full second.

    



    I'm not trying to record this, just trying to directly play from the Elgato Cam Link 1:1 output to my computer screen. When this is played in the Elgato Game Capture software, the video and audio are 1:1, no issues. So I know it's not the console or the capture device.

    


  • constructing an ffmpeg script for use in Xcode/swift project

    21 octobre 2019, par NCrusher

    I’m going back to the drawing board with this post because I’ve been through so much trial and error over the last day with this issue that the information I posted earlier is no longer relevant.

    I’ve only been learning both Swift and FFmpeg for a few weeks, and I’ve just exhausted my ability to troubleshoot this.

    I’m maybe 90% certain this is a problem with my ffmpeg script, rather than with the Swift component. But I think it’s complicated by what characters need special formatting in Swift (particularly mathematical operatives.)

    I started off using a method in Xcode modeled after this post, which Xcode actually managed to guide me through updating for current versions of swift without breaking. Which left me with this :

    func ffmpegConvert(inputPath: String, filters: String, outputPath: String) {
       guard let launchPath = Bundle.main.path(forResource: "ffmpeg", ofType: "") else { return }
       do {
           let convertTask: Process = Process()
           convertTask.launchPath = launchPath
           convertTask.arguments = [
               "-i", inputPath,
               filters,
               outputPath
           ]
           convertTask.standardInput = FileHandle.nullDevice
           convertTask.launch()
           convertTask.waitUntilExit()
       }
    }

    I call this function when I click the "Start Conversion" button on my app. Like I said, that part seems to work fine. The problem is either in the way ffmpeg is being called by the app, or with the construction of the strings in my arguments array.

    The inputFilePath and outputFilePath strings are self-explanatory. Both of them are perfectly acceptably formatted filepath strings.

    The filters is a little tougher. My app has five conversion options and a different filter set for each one. One is as simple as -c copy and the most complex is -c:a libmp3lame -ac 1 -ar 22050 -q:a 9 (I’m working with audiobooks so I don’t need a lot of complexity in my arguments.

    The app appears to be launching ffmpeg perfectly. But the console keeps giving me errors. And the errors keep changing depending on what I try. Here’s what I’ve been through so far :

    var inputFilePath = "/Volumes/CSW External/ffmpeg/diamonds.aac"
    var ffmpegFilters = "-c copy"
    var outputFilePath = "/Volumes/CSW External/ffmpeg/diamonds.m4b"

    Result :

    Unrecognized option ’c copy’.
    Error splitting the argument list : Option not found

    Next attempt, I tried var ffmpegFilters = "--c copy". Result was the same error.

    Then I tried var ffmpegFilters = " -c copy" and it actually read the metadata from my file before throwing a different error at me :

    Unable to find a suitable output format for ’ -c copy’ -c copy :
    Invalid argument

    I’m assuming that the fact that it read the metadata before throwing a different error at me means I made...some form of progress ?

    I spent a few hours researching that particular error and why people might be getting it and couldn’t find a situation that was analogous to what I was trying to do. Mostly people were encountering it from the command line and/or other operating systems. So no help there.

    At that point, since I was just throwing things at the wall to see what might stick, I decided to throw the whole command, inputPath / ffMpegFilters / outputPath into a single string to see if I could make that work (under the logic that if it did, I could narrow the cause of my trouble down to the way the separate strings are being constructed by XCode.)

    I tried it both with the whitespace in the filepath and with the whitespace escaped out (using double \ as required by Swift.) The ffmpeg log came displayed a perfectly valid

    Doing so took me back to the first error I got :

    Unrecognized option ’-c copy’.
    Error splitting the argument list : Option not found

    So then I started researching THAT error. Some of the discussions I came across indicated that the problem was that the arguments couldn’t all be in a single string, they needed to be split up and put in an array. Which I could see for a longer argument, but -c copy shouldn’t need that.

    But I decided to give it a go. Formerly my method for constructing the string of arguments would have looked like this

    func conversionSelection() {
       if inputFileUrl != nil {
           let conversionChoice = conversionOptionsPopup.indexOfSelectedItem
           switch conversionChoice {
               case 1 :
                   outputExtension = ".mp3"
                   ffmpegFilters = "-c:a libmp3lame -ac 1 -ar 22050 -q:a 9"
               (...case 2, 3, 4, default, etc)
           }
       }
    }

    Now it looks more like this :

    func conversionSelection() {
       if inputFileUrl != nil {
           let conversionChoice = conversionOptionsPopup.indexOfSelectedItem
           switch conversionChoice {
               case 1 :
                   outputExtension = ".mp3"
                   ffmpegCodec = "-c:a libmp3lame"
                   ffmpegChannels = "-ac 1"
                   ffmpegSampling = "-ar 22050"
                   ffmpegBitrate = "-q:a 9"
               (case 2, case 3, case 4, default, etc)
           }
       }
    }

    Unfortunately, this just brought me full circle. If I try to use -c:a libmp3lame or --c:a libmp3lame I get the Error splitting the argument list: Option not found error. Interestingly, however, it gives the argument with relation to the ffmpegSampling argument, which is a slight difference.

    If I put a whitespace in front of it -c:a libmp3lame it will get far enough into the process to read the input file metadata, then I get this :

    Unable to find a suitable output format for ’ -c:a libmp3lame’ -c:a
    libmp3lame : Invalid argument

    I’m stumped. I thought this was going to be an easy fix, but I’ve been at it almost a full day with all the trial and error, and nothing is working, and I’ve exhausted my newbie understanding of both Swift and ffmpeg.