Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (33)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

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

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

Sur d’autres sites (5174)

  • correct way to download a mp4 [Audio only] file as a mp3 file via php

    3 février 2018, par Kapil

    I am asking this question because i found it impossible as far my knowledge stands. However i believe here on stackoverflow a lot of genius persons visits so maybe someone can give a good advice / trick.

    My problem is, I am downloading a audio/mp4 file of youtube hosted on googlevideo.com’s server.

    My PHP code for this purpose :
    $mp3path is url of video

    header('Content-Description: File Transfer');
    if(strpos($mp3path, "https://") === false) {
       header('Content-length: ' . size($mp3path)); //size is custom function
    }
       header("Content-Type: audio/MP4A-LATM, audio/MP4A, audio/m4a, audio/mp4, audio/mp4a, audio/mp4-audio, audio/mpeg");
       header('Content-Type: application/force-download');
       header("Accept-Ranges: bytes");
       header('Content-Transfer-Encoding: binary');
       header('Content-disposition: attachment; filename="'.$title.'.mp3"');
       header('Connection: Keep-Alive');
       header('Expires: 0');
       header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
       header('Last-Modified: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
       header("Cache-Control: private", false);
       header('Pragma: no-cache');
       readfile($mp3path);
       exit;

    I can download this audio file but few mp3 players are not able to play it when i did some research on by using mp3val [mp3val.sourceforge.net]. I found this file do not contain sample-rate, bit-rate or some other required codecs inside the file.
    Error received from mp3val : Unknown file format

    I know one possible way of doing this which is ffmpeg but i am looking for a less time consuming option of doing this because first ffmpeg download the whole file and then convert it to mp3 and save it on server. It takes a lot of time.

    I am looking for a easiest solution in which, i dont want to save the whole file on my server. I want to call this file from remote server and want to add sample rate, bit-rate in the file and then just somehow with php i want to start download on browser.

    All i mean to say i need a faster solution. I have seen 2 yt to mp3 converter, They are doing the same thing, giving instant download. i dont know how ?

    Please if you think its a stupid question or not possible then dont report to stackoverflow. I am trying to figure it out that’s why i am asking this question here. I hope you’ll understand my curiosity.

    Thanks,

  • Clion is configured with FFMPEG under MAC. Missing LC_ID_DYLIB load command file

    1er juin 2022, par QingGisHan
    cmake_minimum_required(VERSION 3.21)
project(DemoExample)

set(CMAKE_CXX_STANDARD 14)

include_directories(/Users/windy/devlop/ffmpeg/mac_ffmpeg_lib/include)
link_directories(/Users/windy/devlop/ffmpeg/mac_ffmpeg_lib/lib)

add_executable(DemoExample main.cpp)


target_link_libraries(
        DemoExample
        swscale swresample avcodec avutil avdevice avfilter avformat
)


    


    ====================[ Build | DemoExample | Debug ]=============================
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/windy/devlop/code/CLionProjects/DemoExample/cmake-build-debug --target DemoExample
[1/1] Linking CXX executable DemoExample
FAILED: DemoExample 
: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -mmacosx-version-min=10.15 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/DemoExample.dir/main.cpp.o -o DemoExample -L/Users/windy/devlop/ffmpeg/mac_ffmpeg_lib/lib -Wl,-rpath,/Users/windy/devlop/ffmpeg/mac_ffmpeg_lib/lib  -lswscale  -lswresample  -lavcodec  -lavutil  -lavdevice  -lavfilter  -lavformat && :
ld: dylib /Users/windy/devlop/ffmpeg/mac_ffmpeg_lib/lib/libswscale.dylib missing LC_ID_DYLIB load command file '/Users/windy/devlop/ffmpeg/mac_ffmpeg_lib/lib/libswscale.dylib' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.


    


  • FFMPEG decode from RTP dump file into mp3 file

    5 février 2021, par pingvincible

    I'm trying to save RTP stream into mp3 file. I use this command :

    


    ffmpeg -loglevel debug -protocol_whitelist file -f rtp -i microphone.rtpdump -f mp3 microphone.mp3


    


    I get this result :

    


    user@pc:~/$ ffmpeg-amrnb -loglevel debug -protocol_whitelist file -f rtp -i microphone.rtpdump -f mp3 microphone.mp3
ffmpeg version N-100958-g4f3d8cb554 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --enable-gpl --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-nonfree --enable-version3
  libavutil      56. 64.100 / 56. 64.100
  libavcodec     58.120.100 / 58.120.100
  libavformat    58. 65.101 / 58. 65.101
  libavdevice    58. 11.103 / 58. 11.103
  libavfilter     7.102.100 /  7.102.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-protocol_whitelist' ... matched as AVOption 'protocol_whitelist' with argument 'file'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'rtp'.
Reading option '-i' ... matched as input url with argument 'microphone.rtpdump'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'mp3'.
Reading option 'microphone.mp3' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url microphone.rtpdump.
Applying option f (force format) with argument rtp.
Successfully parsed a group of options.
Opening an input file: microphone.rtpdump.
[rtp @ 0x556947200580] Unable to receive RTP payload type 97 without an SDP file describing it
microphone.rtpdump: Invalid data found when processing input


    


    It looks like that microphone.rtpdump file format is correct as ffmpeg can find RTP payload type 97. The problem is that I don't understand how to use SDP file in this situation.

    


    I have an SDP file for this payload type which I use, when I send data over network. It looks like this :

    


    v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 58.65.101
m=audio 1234 RTP/AVP 97
b=AS:12
a=rtpmap:97 AMR/8000/1
a=fmtp:97 octet-align=1


    


    And now I want to decode RTP stream from file, not by receiving it from network.

    


    How to adapt my SDP file to read RTP stream from file ?

    


    UPDATE : My rtpdump file is not a real rtpdump file format. It is just payloads from UDP packets written into file without any additional headers.