Recherche avancée

Médias (91)

Autres articles (15)

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

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

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

Sur d’autres sites (5222)

  • Audio is lost on transcoding from DTS to AAC

    18 octobre 2015, par cirko

    On a Synology drive, I’m trying to transcode audio in an .MKV file from DTS to AAC using the native ffmpeg encoder. But without any error message (at least I don’t recognize any here), the audio stream is just missing in the output files. I tried it on several different files, all with the same result, leading to the conclusion that either I’m unable to see the error or something’s wrong with FFMPEG. I used the standard FFMPEG package provided with OPKG.
    This is the output I usually get :

    CirkosDaten> ffmpeg -i encodertest.mkv -map 0 -c:v copy -c:s copy -c:a aac
    -strict experimental output.mkv
    ffmpeg version 2.0.2 Copyright (c) 2000-2013 the FFmpeg developers
     built on Jun  3 2015 06:25:48 with gcc 4.6.4 (Marvell GCC release
    20150204-c4af733b 64K MAXPAGESIZE ALIGN CVE-2015-0235)
     configuration: --prefix=/usr/syno --incdir='${prefix}/include/ffmpeg'
    --arch=arm --target-os=linux --cross-prefix=/usr/local/arm-marvell-linux-
    gnueabi/bin/arm-marvell-linux-gnueabi- --enable-cross-compile --enable-
    optimizations --enable-pic --enable-gpl --enable-shared --disable-static
    --enable-version3 --enable-nonfree --enable-libfaac --enable-encoders
    --enable-pthreads --disable-bzlib --disable-protocol=rtp --disable-
    muxer=image2 --disable-muxer=image2pipe --disable-swscale-alpha --disable-
    ffserver --disable-ffplay --disable-devices --disable-bzlib --disable-
    altivec --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
    libmp3lame --disable-vaapi --disable-decoder=amrnb --disable-encoder=zmbv
    --disable-encoder=dca --disable-encoder=ac3 --disable-encoder=ac3_fixed
    --disable-encoder=eac3 --disable-decoder=dca --disable-decoder=eac3
    --disable-decoder=truehd --cc=/usr/local/arm-marvell-linux-gnueabi/bin/arm-
    marvell-linux-gnueabi-ccache-gcc

     libavutil      52. 38.100 / 52. 38.100
     libavcodec     55. 18.102 / 55. 18.102
     libavformat    55. 12.100 / 55. 12.100
     libavdevice    55.  3.100 / 55.  3.100
     libavfilter     3. 79.101 /  3. 79.101
     libswscale      2.  3.100 /  2.  3.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  3.100 / 52.  3.100
    Guessed Channel Layout for  Input Stream #0.1 : 5.1
    Guessed Channel Layout for  Input Stream #0.2 : 5.1
    Input #0, matroska,webm, from 'encodertest.mkv':
     Metadata:
       title           : encodingtest
       creation_time   : 2012-09-23 09:38:19
     Duration: 00:01:00.94, start: 0.000000, bitrate: 9624 kb/s
       Chapter #0.0: start 0.000000, end 55.347000
       Metadata:
         title           : 00:00:00.000
       Chapter #0.1: start 55.347000, end 60.936000
       Metadata:
         title           : 00:04:56.171
       Stream #0:0: Video: h264 (High), yuv420p, 1920x816 [SAR 1:1 DAR 40:17], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
       Metadata:
         title           : encodingtest
       Stream #0:1(ger): Audio: dts, 48000 Hz, 5.1 (default)
       Metadata:
         title           : DTS
       Stream #0:2(eng): Audio: dts, 48000 Hz, 5.1
       Metadata:
         title           : DTS
       Stream #0:3(ger): Subtitle: subrip (default)
       Metadata:
         title           : Forced Subs
    Output #0, matroska, to 'output.mkv':
     Metadata:
       title           : encodingtest
       encoder         : Lavf55.12.100
       Chapter #0.0: start 0.000000, end 55.347000
       Metadata:
         title           : 00:00:00.000
       Chapter #0.1: start 55.347000, end 60.936000
       Metadata:
         title           : 00:04:56.171
       Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1920x816 [SAR 1:1 DAR 40:17], q=2-31, 23.98 fps, 1k tbn, 1k tbc (default)
       Metadata:
         title           : encodingtest
       Stream #0:1(ger): Subtitle: subrip (default)
       Metadata:
         title           : Forced Subs
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:3 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    frame= 1461 fps=528 q=-1.0 Lsize=   54636kB time=00:01:00.81 bitrate=7360.1kbits/s    
    video:54624kB audio:0kB subtitle:0 global headers:0kB muxing overhead
    0.023249%encodingtest

    When I additionally set the bitrate, the output says

    Codec AVOption b (set bitrate (in bits/s)) specified for output file #0
    (output.mkv) has not been used for any stream. The most likely reason is
    either wrong type (e.g. a video option with no video streams) or that it is
    a private option of some encoder which was not actually used for any stream.

    This indicates that somehow the 5.1, 48kHz DTS stream isn’t considered as an input. Why ?

    EDIT : Is it possible that DTS decoding is turned off somewhere here ? I reckoned maybe that’s why I get no errors. But I didn’t see any obvious option for that in the output.

  • Remove Unwanted Rotation of video when merge audio With Video Using FFMPEG

    2 octobre 2015, par bhavesh kaila

    Actually I want to overwrite Audio Using Recorder Audio file into Recorded Video File.For That I am Using FFMPEG Library Project from this Link

    Issue :
    When I capture video in Portrait mode and then merge video with recorded audio merging is working fine but the problem is Video is rotate 90 Degree and then merging is work.I don’t Want to rotate video I want to do merge Only.

    if I capture video in Landscape Mode Then Merging audio is Working Fine.

    Below Currently FFMPEG Command is Used for merging Audio with Video File

    ffmpeg -y -i Video.mp4 -i Audio.mp4 -c:v copy -c:a copy -strict experimental -map 0:v:0 -map 1:a:0 OutputFile.mp4

    And I Have Tried Using Below Commands also but it’s Not working

    ffmpeg -y -i Video.mp4 -i Audio.mp4 -c:v copy -c:a copy -strict experimental -map 0:v:0 -map 1:a:0  -vf -metadata:s:v:0 rotate=0 OutputFile.mp4

    And

    ffmpeg -y -i Video.mp4 -i Audio.mp4 -c:v copy -c:a copy -strict experimental -map 0:v:0 -map 1:a:0  -vf -metadata:s:v:0 translate=1 OutputFile.mp4

    And I have Trying othe possibility also but its not work for me.

    Any Help Would be Acceptable.

    Thanks In Advance

    Log cat is displaying below

    WARNING: linker: /data/data/com.informer.favoraid/app_bin/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
    ffmpeg version 0.11.1
    built on Feb  7 2015 21:39:25 with gcc 4.6 20120106 (prerelease)
    configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --prefix=/data/data/info.guardianproject.ffmpeg/app_opt --enable-pic --disable-shared --enable-static --cross-prefix=/home/josh/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --sysroot=/home/josh/android-ndk/platforms/android-16/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon -fPIE -pie' --extra-ldflags='-L../x264 -fPIE -pie' --enable-version3 --enable-gpl --disable-doc --enable-yasm --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --enable-parsers --enable-protocols --enable-filters --enable-avresample --enable-libfreetype --disable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --enable-zlib --enable-muxer=md5
    libavutil      51. 54.100 / 51. 54.100
    libavcodec     54. 23.100 / 54. 23.100
    libavformat    54.  6.100 / 54.  6.100
    libavdevice    54.  0.100 / 54.  0.100
    libavfilter     2. 77.100 /  2. 77.100
    libswscale      2.  1.100 /  2.  1.100
    libswresample   0. 15.100 /  0. 15.100
    libpostproc    52.  0.100 / 52.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.informer.favoraid/files/MP4_FAV20151002_105039_1099425693.mp4':



    10-01 17:15:20.056: I/System.out(6526): sxCon> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
       '/storage/emulated/0/Android/data/com.informer.favoraid/files/MP4_FAV20151001_171355_-1450037636.mp4':

     Metadata:
        major_brand     : mp42
        minor_version   : 0
        compatible_brands: isommp42
        creation_time   : 2015-10-01 11:44:06
      Duration: 00:00:04.80, start: 0.000000, bitrate: 15488 kb/s
        Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 16004 kb/s, 29.97 fps, 30 tbr, 90k tbn, 180k tbc
        Metadata:
          rotate          : 90
          creation_time   : 2015-10-01 11:44:06
          handler_name    : VideoHandle
        Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 128 kb/s
       Metadata:
          creation_time   : 2015-10-01 11:44:06
         handler_name    : SoundHandle
    Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.informer.favoraid/Audio_Recording.mp4':
      Metadata:
        major_brand     : mp42
        minor_version   : 0
        compatible_brands: isommp42
       creation_time   : 2015-10-01 11:45:13
     Duration: 00:00:05.24, start: 0.000000, bitrate: 18 kb/s
        Stream #1:0(eng): Audio: aac (mp4a / 0x6134706D), 8000 Hz, mono, s16, 12 kb/s
        Metadata:
          creation_time   : 2015-10-01 11:45:13
          handler_name    : SoundHandle
    Output #0, mp4, to '/storage/emulated/0/Android/data/com.informer.favoraid/OutputFile.mp4':
      Metadata:
      :     major_brand     : mp42
        minor_version   : 0
       compatible_brands: isommp42
       creation_time   : 2015-10-01 11:44:06
        encoder         : Lavf54.6.100
        Stream #0:0(eng): Video: h264 (![0][0][0] / 0x0021), yuv420p, 1920x1080, q=2-31, 16004 kb/s, 29.97 fps, 90k tbn, 90k tbc
        Metadata:
         rotate          : 90
        creation_time   : 2015-10-01 11:44:06
         handler_name    : VideoHandle
        Stream #0:1(eng): Audio: aac (@[0][0][0] / 0x0040), 8000 Hz, mono, 12 kb/s
        Metadata:
          creation_time   : 2015-10-01 11:45:13
          handler_name    : SoundHandle
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
      Stream #1:0 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    frame=  138 fps=0.0 q=-1.0 Lsize=    9008kB time=00:00:04.57 bitrate=16141.8kbits/s    
  • How to stop os.system() in Python ?

    30 septembre 2015, par 吴雨羲

    I want to stop the cmd command after 12 seconds. How to stop it ? My program doesn’t work.

    import multiprocessing
    import os
    import time


    def process():
       os.system('ffmpeg -i rtsp://218.204.223.237:554/live/1/66251FC11353191F/e7ooqwcfbqjoo80j.sdp -c copy dump.mp4')


    def stop():
       time.sleep(12)


    if __name__ == '__main__':
       p = multiprocessing.Process(target=process, args=())
       s = multiprocessing.Process(target=stop, args=())
       p.start()
       s.start()
       s.join()
       p.terminate()

    I change my program follow Pedro’s suggusetion @Pedro Lobito ,but it still doesn`t work.

    import shlex

    import subprocess
    import time

    command_line = 'ffmpeg -i rtsp://218.204.223.237:554/live/1/66251FC11353191F/e7ooqwcfbqjoo80j.sdp -c copy dump.mp4'

    proc = subprocess.Popen(shlex.split(command_line), shell=True)
    print '1' * 50
    time.sleep(2)  # <-- sleep for 12''
    print '2' * 50
    proc.terminate()  # <-- terminate the process
    print '3' * 50

    And the result in CMD is

    D:\wyx\workspace\python\ffrstp>python test1.py
    11111111111111111111111111111111111111111111111111
    ffmpeg version N-75563-g235381e Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.9.3 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
    enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
    ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
    le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
    able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
    ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
    --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
    e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --ena
    ble-decklink --enable-zlib
     libavutil      55.  2.100 / 55.  2.100
     libavcodec     57.  3.100 / 57.  3.100
     libavformat    57.  2.100 / 57.  2.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6.  8.100 /  6.  8.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.100 /  2.  0.100
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, rtsp, from 'rtsp://218.204.223.237:554/live/1/66251FC11353191F/e7ooqwc
    fbqjoo80j.sdp':
     Metadata:
       title           : RTSP Session
       comment         : Jabsco Stream(JCO-jy9757acx1eve7nm-a104aea23c1e17bbc776656
    f5069bbf7)
     Duration: N/A, start: 0.000000, bitrate: N/A
       Stream #0:0: Video: mpeg4 (Simple Profile), yuv420p, 352x288 [SAR 1:1 DAR 11
    :9], 10k tbr, 90k tbn, 10k tbc
    [mp4 @ 00bad520] Codec for stream 0 does not use global headers but container fo
    rmat requires global headers
    Output #0, mp4, to 'dump.mp4':
     Metadata:
       title           : RTSP Session
       comment         : Jabsco Stream(JCO-jy9757acx1eve7nm-a104aea23c1e17bbc776656
    f5069bbf7)
       encoder         : Lavf57.2.100
       Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 352x288 [SAR 1:1 D
    AR 11:9], q=2-31, 10k tbr, 90k tbn, 90k tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    [mp4 @ 00bad520] pts has no value
    [mp4 @ 00bad520] Non-monotonous DTS in output stream 0:0; previous: 0, current:
    0; changing to 1. This may result in incorrect timestamps in the output file.
    [mp4 @ 00bad520] Non-monotonous DTS in output stream 0:0; previous: 1, current:
    0; changing to 2. This may result in incorrect timestamps in the output file.
    frame=   30 fps=0.0 q=-1.0 size=      63kB time=00:00:02.33 bitrate= 220.4kbits/
    frame=   36 fps= 31 q=-1.0 size=      68kB time=00:00:02.95 bitrate= 187.9kbits/
    frame=   42 fps= 24 q=-1.0 size=      73kB time=00:00:03.52 bitrate= 169.6kbits/
    frame=   47 fps= 20 q=-1.0 size=      90kB time=00:00:04.10 bitrate= 178.9kbits/
    frame=   53 fps= 19 q=-1.0 size=      95kB time=00:00:04.63 bitrate= 167.2kbits/
    22222222222222222222222222222222222222222222222222
    33333333333333333333333333333333333333333333333333

    D:\wyx\workspace\python\ffrstp>frame=   58 fps= 17 q=-1.0 size=      99kB time=0
    frame=   64 fps= 16 q=-1.0 size=     104kB time=00:00:05.72 bitrate= 149.0kbits/
    frame=   70 fps= 15 q=-1.0 size=     122kB time=00:00:06.36 bitrate= 156.7kbits/
    frame=   76 fps= 15 q=-1.0 size=     127kB time=00:00:06.92 bitrate= 150.2kbits/
    frame=   82 fps= 14 q=-1.0 size=     132kB time=00:00:07.55 bitrate= 143.2kbits/
    [rtsp @ 00adb3e0] max delay reached. need to consume packet
    [NULL @ 00add8c0] RTP: missed 7 packets
    frame=   86 fps= 13 q=-1.0 size=     135kB time=00:00:07.95 bitrate= 139.5kbits/
    [rtsp @ 00adb3e0] max delay reached. need to consume packet
    [NULL @ 00add8c0] RTP: missed 3 packets

    Maybe ffmpeg can reconnection. Can I stop it like ’Ctrl + C’ ?
    When I press ’Ctrl+C’,the result is

    22222222222222222222222222222222222222222222222222
    33333333333333333333333333333333333333333333333333

    D:\wyx\workspace\python\ffrstp>frame=   58 fps= 17 q=-1.0 size=      99kB time=0
    frame=   64 fps= 16 q=-1.0 size=     104kB time=00:00:05.72 bitrate= 149.0kbits/
    frame=   70 fps= 15 q=-1.0 size=     122kB time=00:00:06.36 bitrate= 156.7kbits/
    frame=   76 fps= 15 q=-1.0 size=     127kB time=00:00:06.92 bitrate= 150.2kbits/
    frame=   82 fps= 14 q=-1.0 size=     132kB time=00:00:07.55 bitrate= 143.2kbits/
    [rtsp @ 00adb3e0] max delay reached. need to consume packet
    [NULL @ 00add8c0] RTP: missed 7 packets
    frame=   86 fps= 13 q=-1.0 size=     135kB time=00:00:07.95 bitrate= 139.5kbits/
    [rtsp @ 00adb3e0] max delay reached. need to consume packet
    [NULL @ 00add8c0] RTP: missed 3 packets
    [rtsp @ 00adb3e0] max delay reached. need to consume packet
    [NULL @ 00add8c0] RTP: missed 1 packets
    frame=   89 fps= 13 q=-1.0 size=     138kB time=00:00:08.35 bitrate= 135.3kbits/
    [rtsp @ 00adb3e0] max delay reached. need to consume packet
    [NULL @ 00add8c0] RTP: missed 1 packets
    [rtsp @ 00adb3e0] max delay reached. need to consume packet
    [NULL @ 00add8c0] RTP: missed 3 packets
    [rtsp @ 00adb3e0] max delay reached. need to consume packet
    [NULL @ 00add8c0] RTP: missed 5 packets
    [rtsp @ 00adb3e0] max delay reached. need to consume packet
    [NULL @ 00add8c0] RTP: missed 3 packets
    [rtsp @ 00adb3e0] max delay reached. need to consume packet
    [NULL @ 00add8c0] RTP: missed 1 packets
    frame=   92 fps= 12 q=-1.0 size=     144kB time=00:00:09.15 bitrate= 128.7kbits/
    frame=   93 fps= 11 q=-1.0 size=     145kB time=00:00:09.58 bitrate= 123.8kbits/
    [rtsp @ 00adb3e0] max delay reached. need to consume packet
    [NULL @ 00add8c0] RTP: missed 1 packets
    [rtsp @ 00adb3e0] max delay reached. need to consume packet
    [NULL @ 00add8c0] RTP: missed 2 packets


    D:\wyx\workspace\python\ffrstp>[rtsp @ 00adb3e0] max delay reached. need to cons
    ume packet
    [NULL @ 00add8c0] RTP: missed 12 packets
    frame=   96 fps= 11 q=-1.0 size=     148kB time=00:00:10.43 bitrate= 116.2kbits/
    frame=   96 fps=9.2 q=-1.0 Lsize=     151kB time=00:00:10.43 bitrate= 118.3kbits
    /s
    video:148kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing o
    verhead: 1.913398%
    Exiting normally, received signal 2.