
Recherche avancée
Autres articles (36)
-
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 -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...)
Sur d’autres sites (8368)
-
Can not get frames from youtube video using FFmpegMediaMetadataRetriever
27 juin 2019, par Ahasan RatulI have been trying to extract a frame from a youtube video using FFmpegMediaMetadataRetriever in my android studio project. whenever I use the youtube url inside setDataSource, the app crashes. I am totally new in android studio and haven’t worked with FFmpeg before. I would appreciate if anyone can help me out. Also, I am sorry if I have asked a really silly/easy question.
import wseemann.media.FFmpegMediaMetadataRetriever;
.....
private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) {
@Override
public void onManagerConnected(int status) {
switch (status) {
case LoaderCallbackInterface.SUCCESS: {
Log.i(TAG, "OpenCV loaded successfully");
mOpenCvCameraView.enableView();
try {
initializeOpenCVDependencies();
} catch (IOException e) {
e.printStackTrace();
}
}
break;
default: {
super.onManagerConnected(status);
}
break;
}
}
};
private void initializeOpenCVDependencies() throws IOException {
tick =0;
//extract frame at 2 second using FFmpegMediaMetadataRetriever
FFmpegMediaMetadataRetriever mmr = new FFmpegMediaMetadataRetriever();
mmr.setDataSource("https://youtu.be/f-ehTcWC6dc");
Bitmap b = mmr.getFrameAtTime(2000000, FFmpegMediaMetadataRetriever.OPTION_CLOSEST);
mmr.release();
objMat = new MatOfPoint2f();
sceneMat = new MatOfPoint2f();
obj_corners = new Mat(4, 1, CvType.CV_32FC2);
img = new Mat();
img2 = new Mat();
}in the build.gradle, I have added the following dependencies
dependencies {
//FFmpegMediaMetadataRetriever dependencies
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever:1.0.14'
implementation project(path: ':openCVLibrary340dev')
}error that I get is :
E/AndroidRuntime : FATAL EXCEPTION : main
Process : com.example.jeverfun, PID : 8877
java.lang.RuntimeException : Unable to resume activity com.example.jeverfun/com.example.jeverfun.jevercamera : java.lang.IllegalArgumentException : setDataSource failed : status = 0xFFFFFFFF
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3581)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2862)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by : java.lang.IllegalArgumentException : setDataSource failed : status = 0xFFFFFFFF
at wseemann.media.FFmpegMediaMetadataRetriever.setDataSource(Native Method)
at com.example.jeverfun.jevercamera.initializeOpenCVDependencies(jevercamera.java:373)
at com.example.jeverfun.jevercamera.access$100(jevercamera.java:59)
at com.example.jeverfun.jevercamera$1.onManagerConnected(jevercamera.java:347)
at com.example.jeverfun.jevercamera.onResume(jevercamera.java:469)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1355)
at android.app.Activity.performResume(Activity.java:7117)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3556)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2862)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
I/MediaMetadataRetrieverJNI : release
Application terminated. -
Can I use a config file within an embedded youtube-dl code ?
10 mai 2017, par Stack JohanRight now, I’m having issues with ffmpeg not being recognized. I have the ffmpeg files stored in a folder, and I normally call ffmpeg using —ffmpeg-location.
I don’t know how to do that within Python code, and I would prefer to use config files to call all the options.
This is what I have right now :
from __future__ import unicode_literals
import youtube_dl
ydl_opts = {
'format': 'bestaudio/best',
'outtmpl': u'%(id)s.%(ext)s',
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}]
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download(['https://youtu.be/Y_n0UwQMz5o']) -
FFMPEG : Youtube streaming issues
23 février 2019, par Alex ParamonovI am trying to make a reliable stream from my Icecast/Shoutcast servers to Youtube live.
The command that I use is :/usr/bin/ffmpeg -re -loop 1 -framerate 1 -i /var/users/youtube_stream/DJ-philadelphia_jO46wsH.jpg -i http://127.0.0.1:4700/radio -c:v libx264 -preset ultrafast -maxrate 2048k -bufsize 2048k -c:a copy -ab 128k -s 1920x1080 -rtmp_live live -f flv rtmp://a.rtmp.youtube.com/live2/k123 -nostats
The stream starts running but suddenly stops at random times with the output similar to this :
av_interleaved_write_frame(): Broken pipe
[flv @ 0x5641e04db260] Failed to update header with correct duration.
[flv @ 0x5641e04db260] Failed to update header with correct filesize.
Error writing trailer of rtmp://a.rtmp.youtube.com/live2/123: Broken pipe
frame= 4771 fps=1.0 q=2.0 Lsize= 106465kB time=01:19:30.00 bitrate= 182.8kbits/s speed= 1x
video:29022kB audio:74516kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.825971%
Conversion failed!
99%
Exiting normally, received signal 15.I can’t say exactly why is this happening and maybe there is a way to fix it, but to mee it looks like ffmpeg can not send or convert some frame and it breaks the entire process, so I started digging the docs and found a
fifo
format that hasreconnection
options in case of failure.
So my new command is :/usr/bin/ffmpeg -re -loop 1 -framerate 1 -i /var/users/youtube_stream/DJ-philadelphia_jO46wsH.jpg -i http://127.0.0.1:4700/radio -c:v libx264 -preset ultrafast -maxrate 2048k -bufsize 2048k -c:a copy -ab 128k -s 1920x1080 -rtmp_live live -f fifo -fifo_format flv -map 0:v -map 1:a -drop_pkts_on_overflow 1 -attempt_recovery 1 -recovery_wait_time 1 rtmp://a.rtmp.youtube.com/live2/123 -nostats
With this command Youtube starts complaining about video resolution saying that
65535x65535
is not supported, value65535
looks like something is not initialized properly. Please note that I have explicitly set the resolution with-s 1920x1080
.The output from
FLV
andFIFO
formats looks quite similar.FLV
Input #0, image2, from '/var/users/youtube_stream/DJ-philadelphia_jO46wsH.jpg':
Duration: 00:00:01.00, start: 0.000000, bitrate: 597 kb/s
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 1 fps, 1 tbr, 1 tbn, 1 tbc
Input #1, mp3, from 'http://127.0.0.1:4700/radio':
Metadata:
icy-br : 128
icy-description : test
icy-genre : test
icy-name : Test
icy-pub : 1
StreamTitle : silence
Duration: N/A, start: 0.000000, bitrate: 128 kb/s
Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[libx264 @ 0x563bdde386a0] using SAR=1/1
[libx264 @ 0x563bdde386a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x563bdde386a0] profile Constrained Baseline, level 4.0
[libx264 @ 0x563bdde386a0] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=1 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=2048 vbv_bufsize=2048 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=0
Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/k478-1xpz-v2de-5e79':
Metadata:
encoder : Lavf57.83.100
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 1 fps, 1k tbn, 1 tbc
Metadata:
encoder : Lavc57.107.100 libx264
Side data:
cpb: bitrate max/min/avg: 2048000/0/0 buffer size: 2048000 vbv_delay: -1
Stream #0:1: Audio: mp3 ([2][0][0][0] / 0x0002), 44100 Hz, stereo, s16p, 128 kb/sFIFO
Input #0, image2, from '/var/users/youtube_stream/DJ-philadelphia_jO46wsH.jpg':
Duration: 00:00:01.00, start: 0.000000, bitrate: 597 kb/s
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 1 fps, 1 tbr, 1 tbn, 1 tbc
Input #1, mp3, from 'http://127.0.0.1:4700/radio':
Metadata:
icy-br : 128
icy-description : test
icy-genre : test
icy-name : Test
icy-pub : 1
StreamTitle : silence
Duration: N/A, start: 0.000000, bitrate: 128 kb/s
Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[libx264 @ 0x560fb2209ae0] using SAR=1/1
[libx264 @ 0x560fb2209ae0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x560fb2209ae0] profile Constrained Baseline, level 4.0
Output #0, fifo, to 'rtmp://a.rtmp.youtube.com/live2/k478-1xpz-v2de-5e79':
Metadata:
encoder : Lavf57.83.100
Stream #0:0: Video: h264 (libx264), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 1 fps, 1 tbn, 1 tbc
Metadata:
encoder : Lavc57.107.100 libx264
Side data:
cpb: bitrate max/min/avg: 2048000/0/0 buffer size: 2048000 vbv_delay: -1
Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/syou can see the input streams, output, mapping - all fine except one line that is missing with
fifo
format :[libx264 @ 0x563bdde386a0] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html ...
Seems like video codec is not completely initialized and does not start with when using
fifo
format.So my questions are :
- is there a way to create a reliable stream with
ffmpeg
w/o using
fifo
format ? - if
fifo
format is mandatory in this case, what’s wrong with my
video codec ?
- is there a way to create a reliable stream with