Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (25)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

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

Sur d’autres sites (4499)

  • how to fix errors while converting yuv to mp4 using ffmpeg, with out compression

    10 janvier 2020, par johanna

    I am trying to convert a yuv file to mp4, without further compression, using :
    ffmpeg -f rawvideo -s 768x432 -r 50 -i test.yuv -c:a acc -strict experimental test.mp4 but I am getting the following error :

    ffmpeg version N-94000-g78e1d7f Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-36)
     configuration:
     libavutil      56. 28.100 / 56. 28.100
     libavcodec     58. 52.102 / 58. 52.102
     libavformat    58. 27.103 / 58. 27.103
     libavdevice    58.  7.100 / 58.  7.100
     libavfilter     7. 55.100 /  7. 55.100
     libswscale      5.  4.101 /  5.  4.101
     libswresample   3.  4.100 /  3.  4.100
    [rawvideo @ 0x22f0700] Estimating duration from bitrate, this may be inaccurate
    Input #0, rawvideo, from 'test.yuv':
     Duration: 00:00:00.38, start: 0.000000, bitrate: 198476 kb/s
       Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 768x432, 199065 kb/s, 50 tbr, 50 tbn, 50 tbc
    File 'test.mp4' already exists. Overwrite ? [y/N] y
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
    Press [q] to stop, [?] for help
    Output #0, mp4, to 'test.mp4':
     Metadata:
       encoder         : Lavf58.27.103
       Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 768x432, q=2-31, 200 kb/s, 50 fps, 12800 tbn, 50 tbc
       Metadata:
         encoder         : Lavc58.52.102 mpeg4
       Side data:
         cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    test.yuv: corrupt input packet in stream 0
    [rawvideo @ 0x22fa780] Invalid buffer size, packet size 469698 < expected frame_size 497664
    Error while decoding stream #0:0: Invalid argument
    frame=   18 fps=0.0 q=24.8 Lsize=    3340kB time=00:00:00.34 bitrate=80445.8kbits/s speed=3.51x
    video:3339kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.028110%

    I am also trying : ffmpeg -f rawvideo -s 768x432 -r 50 -i test.yuv -c:a acc -strict experimental test.mp4 but I am getting the following error :

    ffmpeg version N-94000-g78e1d7f Copyright (c) 2000-2019 the FFmpeg developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-36) configuration: libavutil      56. 28.100 / 56. 28.100 libavcodec     58. 52.102 / 58. 52.102 libavformat    58. 27.103 / 58. 27.103 libavdevice    58.  7.100 / 58.  7.100 libavfilter     7. 55.100 /  7. 55.100 libswscale      5.  4.101 /  5.  4.101 libswresample   3.  4.100 /  3.  4.100 [rawvideo @ 0x22f0700] Estimating duration from bitrate, this may be inaccurate Input #0, rawvideo, from 'test.yuv': Duration: 00:00:00.38, start: 0.000000, bitrate: 198476 kb/s Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 768x432, 199065 kb/s, 50 tbr, 50 tbn, 50 tbc File 'test.mp4' already exists. Overwrite ? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native)) Press [q] to stop, [?] for help Output #0, mp4, to 'test.mp4': Metadata: encoder         : Lavf58.27.103 Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 768x432, q=2-31, 200 kb/s, 50 fps, 12800 tbn, 50 tbc Metadata: encoder         : Lavc58.52.102 mpeg4 Side data: cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1 pr_768x432_50_QP22.yuv: corrupt input packet in stream 0 [rawvideo @ 0x22fa780] Invalid buffer size, packet size 469698 < expected frame_size 497664 Error while decoding stream #0:0: Invalid argument frame=   18 fps=0.0 q=24.8 Lsize=    3340kB time=00:00:00.34 bitrate=80445.8kbits/s speed=3.51x video:3339kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.028110%

    how can I solve these errors ?

  • Command line ffmpeg, to insert part of a mp3 audio to another file

    14 janvier 2020, par tgkprog

    Want to copy from 3rd second of b.mp3 till 2:05 seconds of b.mp3 and append to the end of a.mp3 (its 3:23 long).

    Command :

    ffmpeg -i a.mp3 -i b.mp3

    Output :

    ffmpeg version 4.0.4-0ubuntu1 Copyright (c) 2000-2019 the FFmpeg developers   built with gcc 8 (Ubuntu 8.2.0-7ubuntu1)
     configuration: --prefix=/usr --extra-version=0ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
     libavutil      56. 14.100 / 56. 14.100
     libavcodec     58. 18.100 / 58. 18.100
     libavformat    58. 12.100 / 58. 12.100
     libavdevice    58.  3.100 / 58.  3.100
     libavfilter     7. 16.100 /  7. 16.100
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libpostproc    55.  1.100 / 55.  1.100
    Input #0, mp3, from 'a.mp3':
     Metadata:
       encoder         : Lavf58.12.100
     Duration: 00:02:48.00, start: 0.011021, bitrate: 144 kb/s
       Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 144 kb/s
       Metadata:
         encoder         : Lavc58.18
    Input #1, mp3, from 'b.mp3':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2mp41
       encoder         : Lavf58.12.100
     Duration: 00:01:33.02, start: 0.011995, bitrate: 117 kb/s
       Stream #1:0: Audio: mp3, 44100 Hz, stereo, fltp, 117 kb/s
       Metadata:
         encoder         : Lavc58.18
    At least one output file must be specified
  • PyQt-thread. Get dynamically output

    1er janvier 2020, par ZPro

    I use PyQt-thread for parallel conversion of mp3 files to aac via ffmpeg.
    Here is my code :

    class SubprocessThread(QThread):
       signal = pyqtSignal('PyQt_PyObject')

       def __init__(self, command, args):
           QThread.__init__(self)
           self.command = command
           self.args = args

       def __del__(self):
           self.wait()

       def run(self):
           output = subprocess.check_output('{0} {1}'.format(self.command, self.args), shell=True).split()
           self.signal.emit(output)

    And here is example of usage :

    threads = []

    for part in parts.keys():
       args = "-i \'{0}.mp3\' -c:a aac -b:a {1}k \'{2}.m4a\'".format(
           os.path.join(tmp_dir, str(part)),
           int(self.bitrate_cbx.currentText()),
           os.path.join(tmp_dir, str(part)))
       print(args)  # debug
       ffmpeg_thread = SubprocessThread('ffmpeg', args)
       ffmpeg_thread.signal.connect(self.on_data_ready)
       threads.append(ffmpeg_thread)
       ffmpeg_thread.start()
       self.threads_count += 1

    I want to make progress bar, based on conversion, but ffmpeg always updates last string in his output (when conversion in progress).
    Here is an example of ffmpeg output while files are converting :

    user@host$ ffmpeg -i '/home/user/001.mp3' -c:a aac -b:a 128k -vn '/home/user/test.m4a'
    ffmpeg version n4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 9.2.0 (GCC)
     configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
     libavutil      56. 31.100 / 56. 31.100
     libavcodec     58. 54.100 / 58. 54.100
     libavformat    58. 29.100 / 58. 29.100
     libavdevice    58.  8.100 / 58.  8.100
     libavfilter     7. 57.100 /  7. 57.100
     libswscale      5.  5.100 /  5.  5.100
     libswresample   3.  5.100 /  3.  5.100
     libpostproc    55.  5.100 / 55.  5.100
    Input #0, mp3, from '/home/user/001.mp3':
     Metadata:
       encoder         : Lavf57.41.100
       title           : test
       artist          : test
       album_artist    : test
       album           : test
       composer        : test
       genre           : test
       date            : 2018
     Duration: 00:12:38.02, start: 0.025056, bitrate: 192 kb/s
       Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 192 kb/s
       Metadata:
         encoder         : Lavc57.48
       Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 500x500 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc (attached pic)
       Metadata:
         comment         : Cover (front)
    Stream mapping:
     Stream #0:0 -> #0:0 (mp3 (mp3float) -> aac (native))
    Press [q] to stop, [?] for help
    Output #0, ipod, to '/home/user/test.m4a':
     Metadata:
       date            : test
       title           : test
       artist          : test
       album_artist    : test
       album           : test
       composer        : test
       genre           : test
       encoder         : Lavf58.29.100
       Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
       Metadata:
         encoder         : Lavc58.54.100 aac
    size=   12107kB time=00:12:38.01 bitrate= 130.8kbits/s speed=79.2x

    How can I receive this data (string, that begins from "size=...") from my parallel QThreads to calculate overall progress ?