
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (24)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications 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, parCertains 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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (3176)
-
How to fix video in gallery from not playing (probable cause encoding from ffmpeg)
30 avril 2020, par Nathan SinclairI'm setting up a video stream by which I can download a video into the Android gallery, so that I can play it back later.
I have a problem with playing the video back from gallery. The same problem arises when trying to view the url in a videoview.



video information from ffmpeg displays this.



Input #0, mpjpeg, from '':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[swscaler @ 0x1cab5e0] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x1c6f030] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x1c6f030] profile Constrained Baseline, level 3.0, 4:2:0, 8-bit
[libx264 @ 0x1c6f030] 264 - core 157 r2969 d4099dd - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=0 ref=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=crf mbtree=1 crf=18.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'out.mp4':
 Metadata:
 encoder : Lavf58.33.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 720x406, q=-1--1, 30 fps, 15360 tbn, 30 tbc
 Metadata:
 encoder : Lavc58.59.101 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
Error opening file out.mp4: IsoMedia File is truncated28.56 bitrate= 734.1kbits/s speed=0.478x
[pid: 5138|app: 0|req: 1/1] 192.168.178.21 () {32 vars in 406 bytes} [Mon Oct 7 01:12:17 2019] GET /stop => generated 39 bytes in 152 msecs (HTTP/1.1 200) 2 headers in 79 bytes (1 switches on core 0)
frame= 899 fps= 15 q=-1.0 Lsize= 2779kB time=00:00:29.93 bitrate= 760.6kbits/s speed=0.49x
video:2775kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.157041%




I have attempted to follow this article. Android MediaPlayer error (1, -2147483648)



I'm using FFMpeg to record from a mjpeg stream into a file, which then is hosted by a uwsgi/flask server into a convenient url : http://ipaddress/video.mp4



Thus far ive been able to open the video fine using chrome in Android.



my FFMPEG command looks like this :



ffmpeg -i $1 -crf 18 -r 30 -vf "scale=720x406, setpts='1/(30*TB) * (N + 0.05 * sin(N*2*PI/25))', fps=fps=30" -profile:v baseline -pix_fmt yuv420p -f mp4 -preset fast out.mp4




I thought it may have something to do with the transmission of the file. I'm using an android library called volley to send the url so it can be downloaded as a file on the Android. Then it is subsequently put in gallery. This is when I began to experience the problems. I wanted to be thorough, so tried to find out if the file contents was the issue. This is because when displaying it on gallery, there is no width or height information, or even duration. I have come to suspect something is at issue with ffmpeg. I'm not cutting out that it could be keeping the file from opening if it can't find it's normal file properties.



The volley code for the downloaded file is as follows :



@Override
 public void onResponse(byte[] response) {
 try {
 if (response!=null) {

 File file = createVideoFile();

 FileOutputStream stream = new FileOutputStream(file);
 try {
 stream.write(response);
 } finally {
 stream.close();
 }

 addToGallery(file.getAbsolutePath());
 MediaScannerConnection.scanFile(this, new String[]{file.getAbsolutePath()}, null, (path, uri) -> {
 Intent intent = new Intent (context, VideoActivity.class);
 intent.setData(uri);
 startActivity(intent);

 });


 Toast.makeText(this, "Download complete.", Toast.LENGTH_LONG).show();
 }
 } catch (Exception e) {
 // TODO Auto-generated catch block
 Log.d("KEY_ERROR", "UNABLE TO DOWNLOAD FILE");
 e.printStackTrace();
 }
 }

private void addToGallery(String path) throws FileNotFoundException {
 MediaScannerConnection.scanFile(context, new String[]{

 path},

 null, new MediaScannerConnection.OnScanCompletedListener() {

 public void onScanCompleted(String path, Uri uri)

 {

 Log.e(TAG, "file" + path + " was scanned successfully");

 }

 });

 Uri uri = Uri.parse("file:///" + path);
 Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, uri);
 context.sendBroadcast(intent);

 }




I did have a VideoView to display it, as pertaining to a code example i found to download videos using volley.



https://github.com/coderminion/AndroidVolleyLib


-
How do I solve this problem ?? PHP-FFMpeg
12 octobre 2019, par Ahmed RashidI trying encoding video by PHP-FFMpeg library but there some errors that shown to me. The error
Fatal error: Uncaught Alchemy\BinaryDriver\Exception\ExecutionFailureException: ffmpeg failed to execute command "C:/FFmpeg/bin/ffmpeg.exe" -y -i video1.mp4 -async 1 -metadata:s:v:0 start_time=0 -threads 12 -vcodec libx264 -acodec libfaac -b:v 1000k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -vf "[in]scale=320:240 [out]" -pass 1 -passlogfile "C:\Users\DELL\AppData\Local\Temp\ffmpeg-passes5d9e35f516ce1e66b8/pass-5d9e35f517030" export-x264.mp4: Error Output: ffmpeg version N-95216-ge6625ca41f Copyright (c) 2000-2019 the FFmpeg developers built with gcc 9.2.1 (GCC) 20190918 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheor in C:\xampp\htdocs\AnimeX\s2\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Media\AbstractVideo.php on line 106`
The library PHP-FFMpeg library
-
ffmpeg take input and out put as webm on port
28 septembre 2019, par RussellHarrowerI am wondering how I can take an audio input and output it as a webm
This is what I thought would work to get it to rtp out but running into issue.
ffmpeg -i http://stream.radiomedia.com.au:8003/stream -c copy -f rtp rtp://127.0.0.1/streamID:54321
it returns
ffmpeg -i http://stream.radiomedia.com.au:8003/stream -c copy -f rtp rtp://127.0.0.1/streamID:54321 ffmpeg version 4.2.1-0york0~18.04 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
configuration: --prefix=/usr --extra-version='0york0~18.04' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-nonfree --enable-libfdk-aac --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
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
[mp3 @ 0x564cf51de940] invalid concatenated file detected - using bitrate for duration
Input #0, mp3, from 'http://stream.radiomedia.com.au:8003/stream':
Metadata:
track : 1
title : DNR1 Signal 1
comment : www.dvdvideosoft.com
date : 2019
icy-br : 128
icy-description : Radio Media PTY LTD
icy-genre : Indie
icy-name : DRN1
icy-pub : 0
icy-url : https://www.drn1.com.au
StreamTitle :
Duration: N/A, start: 0.025057, bitrate: 320 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s
Metadata:
encoder : LAME3.99r
Output #0, rtp, to 'rtp://127.0.0.1/streamID:54321':
Metadata:
track : 1
title : DNR1 Signal 1
comment : www.dvdvideosoft.com
date : 2019
icy-br : 128
icy-description : Radio Media PTY LTD
icy-genre : Indie
icy-name : DRN1
icy-pub : 0
icy-url : https://www.drn1.com.au
StreamTitle :
encoder : Lavf58.29.100
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s
Metadata:
encoder : LAME3.99r
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=DNR1 Signal 1
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 58.29.100
m=audio 0 RTP/AVP 14
b=AS:320
a=control:streamid=0
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Invalid argument Error writing trailer of rtp://127.0.0.1/streamID:54321: Invalid argument
size= 0kB time=-00:00:00.02 bitrate=N/A speed=N/A video:0kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!