
Recherche avancée
Médias (2)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (61)
-
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 (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
Sur d’autres sites (8515)
-
SOX got nothing from SoundFlower
12 septembre 2016, par xiaoseFor some reason on some comps SoundFlower does not catch audio.
I.e. there are SoundFlower but when I switch input\output to the SoundFlower I cannot get any sound. I have got only not empty file without any sound.Okay, how I try to get the sound...
Just FYI :
$ system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: OS X 10.10.5 (14F1912)
Kernel Version: Darwin 14.5.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: Craig Computer
User Name: Craig (craigm)
Secure Virtual Memory: Enabled
Time since boot: 1 day22:12Gonna check is AVFoundation works :
$ ./ffmpeg -h demuxer=avfoundation
Demuxer avfoundation [AVFoundation input device]:
AVFoundation input device AVOptions:
-list_devices <int> .D...... list available devices (from 0 to 1) (default false)
true .D......
false .D......
-video_device_index <int> .D...... select video device by index for devices with same name (starts at 0) (from -1 to INT_MAX) (default -1)
-audio_device_index <int> .D...... select audio device by index for devices with same name (starts at 0) (from -1 to INT_MAX) (default -1)
-pixel_format .D...... set pixel format (default yuv420p)
-framerate .D...... set frame rate (default "ntsc")
-video_size .D...... set video size
-capture_cursor <int> .D...... capture the screen cursor (from 0 to 1) (default 0)
-capture_mouse_clicks <int> .D...... capture the screen mouse clicks (from 0 to 1) (default 0)
</int></int></int></int></int>Gonna get list of AVFoundation audio devices :
$ ./ffmpeg -f avfoundation -list_devices true -i ’’
ffmpeg version 3.1.1-tessus Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --as=yasm --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
[AVFoundation input device @ 0x7fda40421000] AVFoundation video devices:
[AVFoundation input device @ 0x7fda40421000] [0] Built-in iSight
[AVFoundation input device @ 0x7fda40421000] [1] Capture screen 0
[AVFoundation input device @ 0x7fda40421000] AVFoundation audio devices:
[AVFoundation input device @ 0x7fda40421000] [0] Soundflower (64ch)
[AVFoundation input device @ 0x7fda40421000] [1] Built-in Microphone
[AVFoundation input device @ 0x7fda40421000] [2] Soundflower (2ch)
[AVFoundation input device @ 0x7fda40421000] [3] Built-in Input
: Input/output errorOkay, we have SoundFlower in devices :
[AVFoundation input device @ 0x7fda40421000] [2] Soundflower (2ch)
Then I run AppleScript which gonna switch to the "SoundFlower (2ch)" :
enableSF("input")
enableSF("output")
Where enableSF(stdname) is :
on enableSF(stdname)
tell application "System Preferences"
-- activate
tell anchor stdname of pane "com.apple.preference.sound" to reveal
tell application "System Events"
tell application process "System Preferences"
tell tab group 1 of window 1
delay 2
set rowslist to selected of row of table 1 of scroll area 1
set counter to 0
repeat with id in rowslist
set counter to counter + 1
set rowName to (value of text field 1 of row counter of table 1 of scroll area 1)
set output to stdname & " " & rowName
set scrpt to "echo \"" & output & "\" >> ~/Desktop/ds.log"
do shell script scrpt
if (rowName is equal to "Soundflower (2ch)") then
set selected of row counter of table 1 of scroll area 1 to true
set output to "
!!! FOUND SF for " & stdname & " " & rowName
set scrpt to "echo \"" & output & "\" >> ~/Desktop/ds.log"
log output
do shell script scrpt
exit repeat
end if
end repeat
end tell
end tell
end tell
end tell
end enableSFIn result I have got this :
input Internal Microphone
input Line In
input Digi CoreAudio Device
input Soundflower (2ch)
!!! FOUND SF for input Soundflower (2ch)
output Headphones
output Digi CoreAudio Device
output Soundflower (2ch)
!!! FOUND SF for output Soundflower (2ch)It means that we switch to the SoundFlower. Actually the same can be done by hands, but the script is more reliable as for me.
Okay, next we can try to save some audio via SOX :
$ /Applications/sox-14.3.2/sox -d /Desktop/out.wav
Input File : 'default' (coreaudio)
Channels : 2
Sample Rate : 44100
Precision : 32-bit
Sample Encoding: 32-bit Signed Integer PCM
In:0.00% 00:00:00.00 [00:00:00.00] Out:0 [ | ] Clip:0
...
...
...
In:0.00% 00:00:02.51 [00:00:00.00] Out:106k [ | ] Clip:0
...
...
...
In:0.00% 00:00:11.80 [00:00:00.00] Out:516k [ | ] Clip:0 /Applications/sox-14.3.2/sox WARN coreaudio: coreaudio: unhandled buffer overrun. Data discarded.
...
...
...
In:0.00% 00:00:12.35 [00:00:00.00] Out:545k [ | ] Clip:0 /Applications/sox-14.3.2/sox WARN coreaudio: coreaudio: unhandled buffer overrun. Data discarded.
...
...
...
In:0.00% 00:00:13.28 [00:00:00.00] Out:582k [ | ] Clip:0
Aborted.And, as you can see, the SOX gives me an empty file. Rather, it gives the data, but there is no sound.
This happens on all OS from 10.10 to 10.11.6. Normal output should be this type :
In:0.00% 00:00:00.28 [00:00:00.00] Out:8.19k [======|======] Clip:0
...
...
...
In:0.00% 00:00:04.37 [00:00:00.00] Out:188k [ -====|===== ] Hd:1.1 Clip:0
...
...
...
In:0.00% 00:00:08.82 [00:00:00.00] Out:385k [======|=====-] Hd:1.1 Clip:0
In:0.00% 00:00:09.01 [00:00:00.00] Out:393k [-=====|=====-] Hd:1.1 Clip:0
In:0.00% 00:00:09.20 [00:00:00.00] Out:401k [======|======] Hd:1.1 Clip:0 -
Desktop recording with ffmpeg won't play in anything but VLC
12 mai 2022, par AlexI'm creating a desktop application for fun/education. Its primary function is to record my PCs screen and have a pretty UI to play this back. I am recording with ffmpeg like so :


ffmpeg -thread_queue_size 1024 -f gdigrab -framerate 50 -video_size 1920x1080 -i desktop -f dshow -i audio="virtual-audio-capturer" -r 50 -preset fast -c:v h264_nvenc -qp 23 "D:/vid.mp4"



At first glance this seems fine, a file is created and playing it back in VLC media player also works fine.


The problem is that I can't play this back in anything else. Windows apps (videos + media player) just freeze up/provide no clue as to the problem. My end goal is to embed this into a HTML5 player to fit with the electron/react framework I'm writing my application in. This also doesn't play in a similar fashion.


I ran mediainfo on the file in WSL and got the following :


General
Complete name : vid.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 544 MiB
Duration : 1 min 15 s
Overall bit rate mode : Variable
Overall bit rate : 60.4 Mb/s
Writing application : Lavf59.10.100

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 4:4:4 Predictive@L4.2
Format settings : 1 Ref Frames
Format settings, CABAC : No
Format settings, Reference frames : 1 frame
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1 min 15 s
Bit rate mode : Variable
Bit rate : 60.3 Mb/s
Maximum bit rate : 2 000 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 50.000 FPS
Color space : RGB
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.581
Stream size : 543 MiB (100%)
Color range : Full
Matrix coefficients : Identity
Codec configuration box : avcC

Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 1 min 15 s
Source duration : 1 min 15 s
Bit rate mode : Constant
Bit rate : 132 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz



I also saw this thread (ffmpeg created timelapse won’t play on other players than VLC) suggesting the bit rate may be the problem but having tried the suggestions there had no luck.


At a glance I suspected the "Codec ID" field as with comparison to other MP4 files that windows does play it is slightly different, i.e. :


isom (isom/iso2/avc1/mp41)
vsmp42 (mp42/mp41/isom/avc1)


However fiddling with the ffmpeg encoder settings I managed to vary this and still could not play the video back.


Also including the ffprobe output :


ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
 configuration: --prefix=/usr --extra-version=1ubuntu0.1 --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-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'vid.mp4:
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf59.10.100
 Duration: 00:01:15.50, start: 0.000000, bitrate: 60414 kb/s
 Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), gbrp(pc, gbr/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 60277 kb/s, 50 fps, 50 tbr, 12800 tbn, 100 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 132 kb/s (default)
 Metadata:
 handler_name : SoundHandler



-
javacv FFMPEG decode memory leak ?
25 mars 2015, par Liquan NieI’m new to JAVACV and I am using FFMPEG to play some video file as follows
My enviroument is windows 8 with jdk7 and javacv0.10.String file_path ="D:\\1.mp4";
// regist all format and codec
avformat.av_register_all();
avcodec.avcodec_register_all();
// open file
avformat.AVFormatContext avFormatCtx = avformat.avformat_alloc_context();
if (avformat.avformat_open_input(avFormatCtx, file_path, null, null) != 0)
{
System.out.println("cann't open file\r\n");
return;
}
// find stream info
if (avformat.avformat_find_stream_info(avFormatCtx, (AVDictionary)null) < 0)
{
System.out.println("can't find stream info\r\n");
return;
}
int videoIndex = -1;
for(int i=0; i< avFormatCtx.nb_streams();i++)
{
if(avFormatCtx.streams(i).codec().codec_type() == avutil.AVMEDIA_TYPE_VIDEO)
{
videoIndex = i;
}
}
// determ codec
avcodec.AVCodecContext avCodecCtx = avFormatCtx.streams(videoIndex).codec();
avcodec.AVCodec codec = avcodec.avcodec_find_decoder(avCodecCtx.codec_id());
if (codec == null)
{
System.out.println("codec not found");
return;
}
if(avcodec.avcodec_open2(avCodecCtx, codec, (AVDictionary)null) < 0)
{
System.out.println("cann't open avcodec\r\n");
}
avutil.AVFrame frame = avcodec.avcodec_alloc_frame();
avutil.AVFrame frameRGB = avcodec.avcodec_alloc_frame();
int numByte = avcodec.avpicture_get_size(avutil.AV_PIX_FMT_RGB24, avCodecCtx.width(), avCodecCtx.height());
Pointer outBuffer = avutil.av_malloc(numByte);
avcodec.avpicture_fill(new AVPicture(frameRGB), outBuffer.asByteBuffer(), avutil.AV_PIX_FMT_RGB24, avCodecCtx.width(), avCodecCtx.height());
avformat.av_dump_format(avFormatCtx, 0, file_path, 0);
System.out.println(avFormatCtx.duration());
SwsContext img_convert_ctx = swscale.sws_getContext(avCodecCtx.width(), avCodecCtx.height(), avCodecCtx.pix_fmt(), avCodecCtx.width(), avCodecCtx.height(), avutil.AV_PIX_FMT_RGB24, swscale.SWS_BICUBIC, null, null, (double[])null);
AVPacket pkt = new AVPacket();
int y_size = avCodecCtx.width()*avCodecCtx.height();
avcodec.av_new_packet(pkt, y_size);
opencv_highgui.cvNamedWindow(WINDOW_NAME);
IplImage showImage = opencv_core.cvCreateImage(opencv_core.cvSize(avCodecCtx.width(), avCodecCtx.height()), opencv_core.IPL_DEPTH_8U, 3);
// read frames loop
int frameNumbers = avformat.av_read_frame(avFormatCtx, pkt);
System.out.println("frame number is "+frameNumbers);
while (avformat.av_read_frame(avFormatCtx, pkt) >= 0)
{
//System.out.println(pkt.asByteBuffer());
if (pkt.stream_index() == videoIndex)
{
IntPointer ip = new IntPointer();
int ret = avcodec.avcodec_decode_video2(avCodecCtx, frame, ip, pkt);
if (ret < 0)
{
System.out.println("codec error\r\n");
return;
}
if (ip.get()!= 0)
{
swscale.sws_scale(img_convert_ctx, frame.data(), frame.linesize(), 0, avCodecCtx.height(), frameRGB.data(), frameRGB.linesize());
showImage.imageData(frameRGB.data(0));
showImage.widthStep(frameRGB.linesize().get(0));
opencv_highgui.cvShowImage(WINDOW_NAME, showImage);
opencv_highgui.cvWaitKey(25);
}
}
}
showImage.release();
opencv_highgui.cvDestroyWindow(WINDOW_NAME);
avutil.av_free(frameRGB);
avcodec.avcodec_close(avCodecCtx);
avformat.avformat_close_input(avFormatCtx);but i run into get this error
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000767c35ed, pid=11884, tid=3960
#
# JRE version: 7.0_13-b20
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.7-b01 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [avcodec-56.dll+0x4835ed] avcodec_decode_video2+0xbd
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# E:\code\android\TestJAVACV\hs_err_pid11884.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf53.29.100
Duration: 00:08:30.27, start: 0.000000, bitrate: 160 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 28 kb/s, 15 fps, 15 tbr, 15 tbn, 30 tbc (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandlerand in the log file i found that the enden space heap in jvm has been used 98%. but I don’t know where is the issue, since the document of ffmpeg is not that enough, I feel difficult to know more about how to use it well ,any suggestions ??
Heap
PSYoungGen total 23872K, used 20250K [0x00000000e5600000, 0x00000000e70a0000, 0x0000000100000000)
eden space 20480K, 98% used [0x00000000e5600000,0x00000000e69c69f8,0x00000000e6a00000)