
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (69)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
Sur d’autres sites (5049)
-
ffmpeg is failing to convert mov files from iPhone 4
11 octobre 2014, par skatI’m having issue with converting mov files from iPhone 4.
Running this command :
I, [2014-09-15T03:48:33.245231 #9676] INFO -- : Running transcoding...
ffmpeg -y -i /Users/lun/client/bookagoo/public/uploads/5405e9b0486f75a36c100000/video/1410727644xqxzdoxf-IMG_0040_1_.MOV -ss 5 -vframes 1 -f image2 /Users/lun/client/bookagoo/public/uploads/5405e9b0486f75a36c100000/video/1410727644xqxzdoxf-IMG_0040_1_-edited.jpg
E, [2014-09-15T03:48:33.321367 #9676] ERROR -- : Failed encoding...
ffmpeg -y -i /Users/lun/client/bookagoo/public/uploads/5405e9b0486f75a36c100000/video /1410727644xqxzdoxf-IMG_0040_1_.MOV -ss 5 -vframes 1 -f image2 /Users/lun/client/bookagoo/public/uploads/5405e9b0486f75a36c100000/video/1410727644xqxzdoxf-IMG_0040_1_-edited.jpgMy ffmpeg gives me errors like this :
FFMPEG::Error: Failed encoding.Errors: no output file created. Full output: ffmpeg version 2.3.1 Copyright (c) 2000-2014 the FFmpeg developers
built on Aug 20 2014 02:23:29 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.3.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx
libavutil 52. 92.100 / 52. 92.100
libavcodec 55. 69.100 / 55. 69.100
libavformat 55. 48.100 / 55. 48.100
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 11.100 / 4. 11.100
libavresample 1. 3. 0 / 1. 3. 0
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/lun/client/bookagoo/public/uploads/5405e9b0486f75a36c100000/video/1410641311nyv99k1j-IMG_0040_1_.MOV':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2014-07-20 09:47:08
model : iPhone 4
model-rus : iPhone 4
encoder : 7.0.4
encoder-rus : 7.0.4
date : 2014-07-20T13:47:08+0400
date-rus : 2014-07-20T13:47:08+0400
make : Apple
make-rus : Apple
Duration: 00:00:01.84, start: 0.000000, bitrate: 827 kb/s
Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 480x360, 742 kb/s, 23.98 fps, 23.98 tbr, 600 tbn, 1200 tbc (default)
Metadata:
rotate : 90
creation_time : 2014-07-20 09:47:08
handler_name : Core Media Data Handler
encoder : H.264
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s (default)
Metadata:
creation_time : 2014-07-20 09:47:08
handler_name : Core Media Data Handler
[swscaler @ 0x7fe1e9800600] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/Users/lun/client/bookagoo/public/uploads/5405e9b0486f75a36c100000/video/1410641311nyv99k1j-IMG_0040_1_-edited.jpg':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
make-rus : Apple
model : iPhone 4
model-rus : iPhone 4
make : Apple
encoder : Lavf55.48.100
date : 2014-07-20T13:47:08+0400
date-rus : 2014-07-20T13:47:08+0400
Stream #0:0(und): Video: mjpeg, yuvj420p, 480x360, q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc (default)
Metadata:
rotate : 90
creation_time : 2014-07-20 09:47:08
handler_name : Core Media Data Handler
encoder : Lavc55.69.100 mjpeg
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)It’s only happening for mov files. There are couple of tricky places it looks like it’s trying to take screenshot from a video.
Maybe anyone witnessed anything similar and can give me a tip ?
-
Announcing our latest open source project : DeviceDetector
This blog post is an announcement for our latest open source project release : DeviceDetector ! The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.
Read on to learn more about this exciting release.
Why did we create DeviceDetector ?
Our previous library UserAgentParser only had the possibility to detect operating systems and browsers. But as more and more traffic is coming from mobile devices like smartphones and tablets it is getting more and more important to know which devices are used by the websites visitors.
To ensure that the device detection within Piwik will gain the required attention, so it will be as accurate as possible, we decided to move that part of Piwik into a separate project, that we will maintain separately. As an own project we hope the DeviceDetector will gain a better visibility as well as a better support by and for the community !
DeviceDetector is hosted on GitHub at piwik/device-detector. It is also available as composer package through Packagist.
How DeviceDetector works
Every client requesting data from a webserver identifies itself by sending a so-called User-Agent within the request to the server. Those User Agents might contain several information such as :
- client name and version (clients can be browsers or other software like feed readers, media players, apps,…)
- operating system name and version
- device identifier, which can be used to detect the brand and model.
For Example :
Mozilla/5.0 (Linux; Android 4.4.2; Nexus 5 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Mobile Safari/537.36
This User Agent contains following information :
Operating system is
Android 4.4.2
, client uses the browserChrome Mobile 32.0.1700.99
and the device is a GoogleNexus 5
smartphone.What DeviceDetector currently detects
DeviceDetector is able to detect bots, like search engines, feed fetchers, site monitors and so on, five different client types, including around 100 browsers, 15 feed readers, some media players, personal information managers (like mail clients) and mobile apps using the AFNetworking framework, around 80 operating systems and nine different device types (smartphones, tablets, feature phones, consoles, tvs, car browsers, cameras, smart displays and desktop devices) from over 180 brands.
Note : Piwik itself currently does not use the full feature set of DeviceDetector. Client detection is currently not implemented in Piwik (only detected browsers are reported, other clients are marked as Unknown). Client detection will be implemented into Piwik in the future, follow #5413 to stay updated.
Performance of DeviceDetector
Our detections are currently handled by an enormous number of regexes, that are defined in several .YML Files. As parsing these .YML files is a bit slow, DeviceDetector is able to cache the parsed .YML Files. By default DeviceDetector uses a static cache, which means that everything is cached in static variables. As that only improves speed for many detections within one process, there are also adapters to cache in files or memcache for speeding up detections across requests.
How can users help contribute to DeviceDetector ?
Submit your devices that are not detected yet
If you own a device, that is currently not correctly detected by the DeviceDetector, please create a issue on GitHub
In order to check if your device is detected correctly by the DeviceDetector go to your Piwik server, click on ‘Settings’ link, then click on ‘Device Detection’ under the Diagnostic menu. If the data does not match, please copy the displayed User Agent and use that and your device data to create a ticket.Submit a list of your User Agents
In order to create new detections or improve the existing ones, it is necessary for us to have lists of User Agents. If you have a website used by mostly non desktop devices it would be useful if you send a list of the User Agents that visited your website. To do so you need access to your access logs. The following command will extract the User Agents :
zcat ~/path/to/access/logs* | awk -F'"' '{print $6}' | sort | uniq -c | sort -rn | head -n20000 > /home/piwik/top-user-agents.txt
If you want to help us with those data, please get in touch at devicedetector@piwik.org
Submit improvements on GitHub
As DeviceDetector is free/libre library, we invite you to help us improving the detections as well as the code. Please feel free to create tickets and pull requests on Github.
What’s the next big thing for DeviceDetector ?
Please check out the list of issues in device-detector issue tracker.
We hope the community will answer our call for help. Together, we can build DeviceDetector as the most powerful device detection library !
Happy Device Detection,
-
How to fix av_interleaved_write_frame() broken pipe error in php
31 mars, par Adekunle AdeyeyeI have an issue using ffmpeg to stream audio and parse to google cloud speech to text in PHP.


It returns this output.
I have tried delaying some part of the script, that did not solve it.
I have also checked for similar questions. however, they are mostly in python and none of the solutions actually work for this.


built with gcc 8 (GCC)
 cpudetect
 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
 libavresample 4. 0. 0 / 4. 0. 0
 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 'https://npr-ice.streamguys1.com/live.mp3':
 Metadata:
 icy-br : 96
 icy-description : NPR Program Stream
 icy-genre : News and Talk
 icy-name : NPR Program Stream
 icy-pub : 0
 StreamTitle :
 Duration: N/A, start: 0.000000, bitrate: 96 kb/s
 Stream #0:0: Audio: mp3, 32000 Hz, stereo, fltp, 96 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, s16le, to 'pipe:':
 Metadata:
 icy-br : 96
 icy-description : NPR Program Stream
 icy-genre : News and Talk
 icy-name : NPR Program Stream
 icy-pub : 0
 StreamTitle :
 encoder : Lavf58.29.100
 Stream #0:0: Audio: pcm_s16le, 16000 Hz, mono, s16, 256 kb/s
 Metadata:
 encoder : Lavc58.54.100 pcm_s16le
**av_interleaved_write_frame(): Broken pipe** 256.0kbits/s speed=1.02x
**Error writing trailer of pipe:: Broken pipe**
size= 54kB time=00:00:01.76 bitrate= 250.8kbits/s speed=0.465x
video:0kB audio:55kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!



this is my PHP code


require_once 'vendor/autoload.php';
 
 $projectId = "xxx-45512";
 putenv('GOOGLE_APPLICATION_CREDENTIALS=' . __DIR__ . '/xxx-45512-be3eb805f1d7.json');
 
 // Database connection
 $pdo = new PDO('mysql:host=localhost;dbname=', '', '');
 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
 
 $url = "https://npr-ice.streamguys1.com/live.mp3";
 
 $ffmpegCmd = "ffmpeg -re -i $url -acodec pcm_s16le -ac 1 -ar 16000 -f s16le -";
 
 $fp = popen($ffmpegCmd, "r");
 if (!$fp) {
 die("Failed to open FFmpeg stream.");
 }
 sleep(5);

 try {
 $client = new SpeechClient(['transport' => 'grpc', 'credentials' => json_decode(file_get_contents(getenv('GOOGLE_APPLICATION_CREDENTIALS')), true)]);
 } catch (Exception $e) {
 echo 'Error: ' . $e->getMessage(); 
 exit;
 }
 
 $recognitionConfig = new RecognitionConfig([
 'auto_decoding_config' => new AutoDetectDecodingConfig(),
 'language_codes' => ['en-US'],
 'model' => 'long',
 ]);
 
 $streamingConfig = new StreamingRecognitionConfig([
 'config' => $recognitionConfig,
 ]);
 
 $configRequest = new StreamingRecognizeRequest([
 'recognizer' => "projects/$projectId/locations/global/recognizers/_",
 'streaming_config' => $streamingConfig,
 ]);
 
 
 function streamAudio($fp)
 {
 while (!feof($fp)) {
 yield fread($fp, 4096);
 }
 }
 
 $responses = $client->streamingRecognize([
 'requests' => (function () use ($configRequest, $fp) {
 yield $configRequest; // Send initial config
 foreach (streamAudio($fp) as $audioChunk) {
 yield new StreamingRecognizeRequest(['audio' => $audioChunk]);
 }
 })()]
 );
 
 // $responses = $speechClient->streamingRecognize();
 // $responses->writeAll([$request,]);
 
 foreach ($responses as $response) {
 foreach ($response->getResults() as $result) {
 $transcript = $result->getAlternatives()[0]->getTranscript();
 // echo "Transcript: $transcript\n";
 
 // Insert into the database
 $stmt = $pdo->prepare("INSERT INTO transcriptions (transcript) VALUES (:transcript)");
 $stmt->execute(['transcript' => $transcript]);
 }
 }
 
 
 pclose($fp);
 $client->close();



I'm not sure what the issue is at this time.


UPDATE


I've done some more debugging and i have gotten the error to clear and to stream actually starts.
However, I expect the audio to transcribe and update my database but instead I get this error when i close the stream




this is my updated code


$handle = popen($ffmpegCommand, "r");

 try {
 $client = new SpeechClient(['transport' => 'grpc', 'credentials' => json_decode(file_get_contents(getenv('GOOGLE_APPLICATION_CREDENTIALS')), true)]);
 } catch (Exception $e) {
 echo 'Error: ' . $e->getMessage(); 
 exit;
 }
 
 try {
 $recognitionConfig = (new RecognitionConfig())
 ->setAutoDecodingConfig(new AutoDetectDecodingConfig())
 ->setLanguageCodes(['en-US'], ['en-UK'])
 ->setModel('long');
 } catch (Exception $e) {
 echo 'Error: ' . $e->getMessage(); 
 exit;
 }
 
 try {
 $streamConfig = (new StreamingRecognitionConfig())
 ->setConfig($recognitionConfig);
 } catch (Exception $e) {
 echo 'Error: ' . $e->getMessage();
 exit;
 }
 try {
 $configRequest = (new StreamingRecognizeRequest())
 ->setRecognizer("projects/$projectId/locations/global/recognizers/_")
 ->setStreamingConfig($streamConfig);
 } catch (Exception $e) {
 echo 'Error: ' . $e->getMessage(); 
 exit;
 }
 
 $stream = $client->streamingRecognize();
 $stream->write($configRequest);
 
 mysqli_query($conn, "INSERT INTO transcriptions (transcript) VALUES ('bef')");
 
 while (!feof($handle)) {
 $chunk = fread($handle, 25600);
 // printf('chunk: ' . $chunk);
 if ($chunk !== false) {
 try {
 $request = (new StreamingRecognizeRequest())
 ->setAudio($chunk);
 $stream->write($request);
 } catch (Exception $e) {
 printf('Errorc: ' . $e->getMessage());
 }
 }
 }
 
 
 $insr = json_encode($stream);
 mysqli_query($conn, "INSERT INTO transcriptions (transcript) VALUES ('$insr')");
 
 foreach ($stream->read() as $response) {
 mysqli_query($conn, "INSERT INTO transcriptions (transcript) VALUES ('loop1')");
 foreach ($response->getResults() as $result) {
 mysqli_query($conn, "INSERT INTO transcriptions (transcript) VALUES ('loop2')");
 foreach ($result->getAlternatives() as $alternative) {
 $trans = $alternative->getTranscript();
 mysqli_query($conn, "INSERT INTO transcriptions (transcript) VALUES ('$trans')");
 }
 }
 }
 
 pclose($handle);
 $stream->close();
 $client->close();```