
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (78)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (7677)
-
Inputting Audio Stream to FFMPEG
5 avril 2018, par WijayaI’m building a real time chat application with C# and ffmpeg.exe. My requirement is to get a memory stream from Microsoft Speech API and feed it to ffmpeg process in real time. I can take a memory stream from Microsoft Speech API. I’m using following code to create the memory stream.
using (MemoryStream stream = new MemoryStream())
{
MemoryStream streamAudio = new MemoryStream();
System.Media.SoundPlayer m_SoundPlayer = new System.Media.SoundPlayer();
_speechSynthesizerVisemesSender.SetOutputToWaveStream(streamAudio);
_speechSynthesizerVisemesSender.SetOutputToNull();
stream.WriteTo(proc.StandardInput.BaseStream);
}I’m already using another datapipe with another command to feed video content to ffmpeg. But I couldn’t find a stable solution to feed audio through a datapipe. This article briefly explains about audio datapipe. I’m using following command to stream audio.
"ffmpeg -re -f s16le -i pipe:wav -f mpegts udp://127.0.0.1:1234"
But it is not working with the datapipe. If I try the command with mp3 or wav file, it works.
-
python - subprocess.Popen fails to correctly pipe urllib3 Response
11 février 2018, par user2963567I want to open a file over a network and pipe it directly to ffmpeg using subprocess.Popen. The goal is to stream the audio file data directly into ffmpeg. Here is the code :
# test.py
import subprocess, sys, urllib3, time
http = urllib3.PoolManager()
r = http.urlopen('GET', sys.argv[1], preload_content=False)
args = 'ffmpeg -i - -y audio.mp3'.split(' ')
subprocess.Popen(args, stdin=r)
r.close()If I run a local HTTP server and give the program the url, it works successfully, and ffmpeg processes it.
$ python3 test.py http://192.168.1.200/original.webm
However if I try to retrieve from a remote server, such as that below, ffmpeg fails.
$ python3 test.py https://cdn.discordapp.com/attachments/304959901376053248/412003156638040084/original.webm
with the following output
pipe:: Invalid data found when processing input
I expected this code to produce the same results as running this terminal command. This command succeeds for both the discord cdn URL and a local HTTP server url.
$ curl [file url] | ffmpeg -i - -y audio.mp3
I’m using python 3.5 on Linux, and ffmpeg 3.4.1.
edit 1
I’m now leaning towards thinking it’s not ffmpeg’s fault, and more about how Popen is reading/writing the urllib response to a process’ stdin. By running a local netcat server and sending the output to a file (
$ nc -l 1234 > nc_output.webm
) and adjusting the script like so :import subprocess, sys, urllib3, time
http = urllib3.PoolManager()
r = http.urlopen('GET', sys.argv[1], preload_content=False)
args = 'nc 192.168.1.200 1234'.split(' ')
subprocess.run(args, stdin=r)
r.close()Then running as
$ python3 test.py https://cdn.discordapp.com/attachments/304959901376053248/412003156638040084/original.webm
By comparing nc_output.webm with the original.webm file, I can immediately see that nc_output.webm is slightly larger (4017585 bytes, vs 4008589 bytes). Attempting to play nc_output.webm (mpv, vlc, ffprobe) also fails, which explains why ffmpeg was complaining. Whatever Popen is doing to the stream’s bytes is sufficient to make the output file useless.
However, the problem still ceases to occur if the URL points to a local HTTP server, such as one run from
python -m SimpleHTTPServer
which leads me to think that this is related to the latency associated with reading from a remote origin. -
Does not work -hls_playlist in ffmpeg in the -dash section
18 mars 2019, par jidckiiI will use this assembly ffmpeg
https://hub.docker.com/r/jrottenberg/ffmpeg/ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.2.1 (Alpine 6.2.1) 20160822I’m trying to do dash and hls at the same time.
In the documentation from here http://ffmpeg.org/ffmpeg-all.html#dash-2
the key is :
-hls_playlist hls_playlist
Generate HLS playlist files as well. The master playlist is generated
with the filename master.m3u8. One media playlist file is generated for
each stream with filenames media_0.m3u8, media_1.m3u8, etc.those. mpd and m3u8 must be created at the same time.
Running :
ffmpeg -re \
-analyzeduration 20000000 \
-i udp: //239.0.0.1: 1234? overrun_nonfatal = 1 \
-map 0 \
-c copy \
-f dash \
-min_seg_duration 5000000 \
-window_size 10 \
-extra_window_size 10 \
-remove_at_exit 1 \
-hls_playlist 1 \
-use_timeline 1 \
-use_template 1 \
-vtag avc1 \
-atag mp4a \
cam01.mpdand get an error :
Unrecognized option 'hls_playlist'.
Error splitting the argument list: Option not found`without the
-hls_playlist
everything works correctly ...What could be the problem ?