Advanced search

Medias (91)

Other articles (5)

  • Installation en mode ferme

    4 February 2011, by

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Emballe médias : à quoi cela sert?

    4 February 2011, by

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

  • Configuration spécifique d’Apache

    4 February 2011, by

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

On other websites (2976)

  • FFmpeg -bash: ffmpeg: command not found

    12 February 2015, by Daniel Khajehpour

    OK, so I have gone up and down the internet trying to figure out what it is I am doing wrong ... and yet I’m in the middle of nowhere.
    I am basically trying to install the FFmpeg on my CENTOS 6.6 dedicated server by following the instructions here: https://trac.ffmpeg.org/wiki/CompilationGuide/Centos

    Everything seems to go just fine throughout the process. When it’s all done, I type in "ffmpeg" hit the enter and keep on getting this extremely ugly error:

    -bash: -bash:: command not found

    I’m not much of a shell guy, but working with it all day today, I can say that this means that it’s not installed correctly. So, I tried re-installing it, and it tells me all the packages already exist now ... . Here is a copy if what I am doing and what I am getting:

    root@server1 [~]# ffmpeg -version
    -bash: ffmpeg: command not found

    root@server1 [~]# yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
    Loaded plugins: fastestmirror, priorities, security
    Setting up Install Process
    Loading mirror speeds from cached hostfile
    * base: centos.mirror.ndchost.com
    * extras: centos-distro.cavecreek.net
    * updates: mirrors.easynews.com
    Package autoconf-2.63-5.1.el6.noarch already installed and latest version
    Package automake-1.11.1-4.el6.noarch already installed and latest version
    Package gcc-4.4.7-11.el6.x86_64 already installed and latest version
    Package gcc-c++-4.4.7-11.el6.x86_64 already installed and latest version
    Package git-1.7.1-3.el6_4.1.x86_64 already installed and latest version
    Package libtool-2.2.6-15.5.el6.x86_64 already installed and latest version
    Package 1:make-3.81-20.el6.x86_64 already installed and latest version
    Package nasm-2.07-7.el6.x86_64 already installed and latest version
    Package 1:pkgconfig-0.23-9.1.el6.x86_64 already installed and latest version
    Package zlib-devel-1.2.3-29.el6.x86_64 already installed and latest version
    Nothing to do

    Any ideas or help is greatly appreciated!

  • How to copy data streams with ffmpeg?

    27 December 2020, by Gabor Posz

    I'm trying to direct stream copy video files with ffmpeg. (Remark: I'm using ffmpeg from C# via FFmpeg.AutoGen library, but it's irrelevant from the problem.)

    


    Here are some simplified code (e.g. error handling is elided):

    


    // Open input file:
fixed (AVFormatContext** formatContextPtrPtr = &inputFormatContextPtr)
{
    ffmpeg.avformat_open_input(formatContextPtrPtr, inputFileName, null, null);
}
ffmpeg.avformat_find_stream_info(this.inputFormatContextPtr, null);

// Open output file
AVIOContext* outputIOContextPtr;
ffmpeg.avio_open(&outputIOContextPtr, outputFileName, ffmpeg.AVIO_FLAG_WRITE);

// Create output context
AVFormatContext* outputFormatContextPtr;
ffmpeg.avformat_alloc_output_context2(&outputFormatContextPtr, null, null, outputFileName);
outputFormatContextPtr->pb = outputIOContextPtr;

// Create the same streams in the output context as in the input context
AVStream** streamsPointer = formatContext.streams;
for (int i = 0; i < streams.Length; i++)
{
    AVStream inputStream = **streamsPointer;
    
    AVStream* newStream = ffmpeg.avformat_new_stream(outputFormatContextPtr, null);
    ffmpeg.avcodec_parameters_copy(newStream->codecpar, inputStream.codecpar);

    streamsPointer++;
}

// Write header
ffmpeg.avformat_write_header(outputFormatContextPtr, null);

// Copy all streams packet by packet
do
{
    AVPacket* packetPtr = ffmpeg.av_packet_alloc();
    ffmpeg.av_read_frame(inputFormatContextPtr, packetPtr);

    ffmpeg.av_write_frame(outputFormatContextPtr, packetPtr);
    
    ffmpeg.av_packet_unref(packetPtr);
    ffmpeg.av_free(packetPtr);
}

// Close input and output files and contexts
ffmpeg.av_write_trailer(outputFormatContextPtr);
ffmpeg.avformat_free_context(outputFormatContextPtr);
ffmpeg.avio_close(outputIOContextPtr);

fixed (AVFormatContext** formatContextPtrPtr = &inputFormatContextPtr)
{
    ffmpeg.avformat_close_input(formatContextPtrPtr);
}



    


    It works as long as the streams are video or audio streams (AVMEDIA_TYPE_VIDEO or AVMEDIA_TYPE_AUDIO), but I get errors from avformat_write_header or av_write_frame if the stream is a data stream (AVMEDIA_TYPE_DATA).

    


    For example GoPro video (.mp4) files have data streams (besides the video and audio streams) with GPS and other sensor data:

    


    Stream #0 Type: AVMEDIA_TYPE_VIDEO Codec: AV_CODEC_ID_H264 Frame rate: 29,97 fps Duration: 00:00:03.7037000 Frame number: 111
Stream #1 Type: AVMEDIA_TYPE_AUDIO Codec: AV_CODEC_ID_AAC Frame rate: NaN fps Duration: 00:00:03.7120000 Frame number: 174
Stream #2 Type: AVMEDIA_TYPE_DATA Codec: AV_CODEC_ID_NONE Frame rate: 29,00 fps Duration: 00:00:03.7037000 Frame number: 1
Stream #3 Type: AVMEDIA_TYPE_DATA Codec: AV_CODEC_ID_BIN_DATA Frame rate: NaN fps Duration: 00:00:03.7120000 Frame number: 3
Stream #4 Type: AVMEDIA_TYPE_DATA Codec: AV_CODEC_ID_NONE Frame rate: NaN fps Duration: 00:00:03.7037000 Frame number: 290


    


    For stream #2 and #4 I get 0xffffffea "Invalid argument" error code from avformat_write_header and the following text is displayed on the console output: "Could not find tag for codec none in stream #2, codec not currently supported in container"

    


    For stream #3 I get the same error code from av_write_frame and the following text is displayed on the console output: "Invalid packet stream index: 3"

    


    Any idea how to copy these data streams as well?

    


  • efficiently compressing an AVI video for PowerPoint

    3 July 2020, by brownfox
     I have a few AVI videos of very high bit-rate ( 6.0 Second video is 72 MB in size ). I want to put these videos in a Microsoft PowerPoint presentation, and since there are a few 10 such videos the size of the presentation file is getting too high. 


    


    I want to compress these videos to have a reasonable size. I used ffmpeg to compress these videos. I used the command
ffmpeg -i input.avi -vcodec msmpeg4v2 output.avi
and it gave me a compressed video of size 9.0 MB. But these new videos are not playing smoothly in Powerpoint (they are playing in other media players though).

    


    it is playing with hiccups. I assume I compressed the video with wrong parameter/encoding making it difficult to play.

    


    Can anyone suggest me the optimum parameter/arguments to use with FFmpeg in compressing these videos? The output of ffmpeg -i input.avi is given here.

    


    ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --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-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[mjpeg @ 0x23154c0] Changeing bps to 8
Input #0, avi, from '11_stte_frst_mode.avi':
  Metadata:
    encoder         : Lavf56.40.101
  Duration: 00:00:05.02, start: 0.000000, bitrate: 120249 kb/s
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 3200x2464, 120629 kb/s, 60 fps, 60 tbr, 60 tbn, 60 tbc





    


    I'm using Ubuntu 16.0, I have also a Windows machine. But it will be easier if I can fix in Ubuntu.

    


    The details of the output file is this,

    


    ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --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-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, avi, from '../11_stte_frst.avi':
  Metadata:
    encoder         : Lavf56.40.101
  Duration: 00:00:05.02, start: 0.000000, bitrate: 14859 kb/s
    Stream #0:0: Video: msmpeg4v2 (MP42 / 0x3234504D), yuv420p, 3200x2464, 14887 kb/s, 60 fps, 60 tbr, 60 tbn, 60 tbc