
Recherche avancée
Autres articles (38)
-
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 (...) -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (5964)
-
Mix 2 mp3 files with FFmpeg for Android
24 mai 2017, par Thankgod RichardI am developing something similar to a karaoke app. I have a sound file(beat) and a recorded file(voice) from android mediarecorder. I am trying to mix the two files to become one file that plays the same time. I have set up ffmpeg provided by writingminds and everything is working fine. I am not familiar with ffmpeg commands so searched for and got few commands that can achieve the task for me. This is the code i got :
String files = "-i " + currentFile + " -i " + someFile.getAbsolutePath();
String output = mFileName + "/recorded/test.mp3";
String cmd = "ffmpeg "+files+
" -filter_complex \"aevalsrc=0:d=10[s1];[s1][1:a]concat=n=2:v=0:a=1[ac1];[0:a][ac1]amix[aout]\" -map [aout] -c:a libmp3lame " + output;But it not working. this is the error i got :
04-01 12:09:26.598 21300-21300/com.shixels.thankgodrichard.mixer I/fpeg: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (GCC)
configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Output #0, mp3, to 'ffmpeg -i /storage/emulated/0/MyStudio/temps/1491044929409.mp3 -i /storage/emulated/0/temp.mp3 -filter_complex "aevalsrc=0:d=10[s1];[s1][1:a]concat=n=2:v=0:a=1[ac1];[0:a][ac1]amix[aout]" -map [aout] -c:a libmp3lame /storage/emulated/0/recorded/test.mp3':
Output file #0 does not contain any stream
04-01 12:09:26.599 21300-21300/com.shixels.thankgodrichard.mixer I/fpeg: finishedI read some answers here saying it depends on the version of the ffmpeg your using. I am using the latest ffmpeg for android by writingminds.
-
Nginx Live transcoding with ffmpeg
9 juillet 2017, par Stian TofteI’m live streaming video to my server(It’s external somewhere in the world).
And what I’m trying to do here, is that my server will transcode the input to a lower bitrate before it pushes it to the video site like twitch and so on.And I’m doing this on windows. I have tried to google around watched youtube videos. and so on.. But couldn’t find any solution for it. So here is what I have at this moment(not working).
In my nginx.conf :
rtmp {
server {
listen 1935;
chunk_size 8192;
application code {
live on;
}
application twitch {
push rtmp://live-ams.twitch.tv/app/live_xxxxxxxxxxxxxxxxx;
}
}So here the application code is receving the stream from my computer at home. I’m using ffmpeg to transcode it.
And here is my batch file(That I have to start manualy. Can’t start it within the config of nginx on windows.)
ffmpeg -i rtmp://localhost/code -vcodec flv -acodec copy -s 1280x720 -f flv rtmp://localhost/twitch
pauseRight now It’s just downscaling but that is okay. So this is supposed to send the stream back to the "twitch" application in my nginx config. And then nginx will stream it to twitch.
But when I launch my ffmpeg bat file.. I get this :
So it’s here my road ends. Anyone knows how to do this ?
Thanks in advance :) Stian
-
Recording usb cam on raspberry pi with ffmpeg - usb troubleshooting
18 septembre 2017, par Hwy2HellI want to save video from an external usb cam on the raspberry pi 3. In order to avoid voltage drop issues, I use the offical raspberry power supply (2.5 Amp) and connected all usb devices by a separetely powered usb hub :
pi@raspi:~/appdev/ffmpeg $ lsusb
Bus 001 Device 037: ID 046d:09a1 Logitech, Inc. QuickCam Communicate MP/S5500
Bus 001 Device 036: ID 046d:c03f Logitech, Inc. M-BT85 [UltraX Optical Mouse]
Bus 001 Device 035: ID 04d9:1503 Holtek Semiconductor, Inc. Shortboard Lefty
Bus 001 Device 012: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubWhen I try to test the functionality by running the following bash script (snippet) :
function capture
{
capfile=$(date +%F_%Hh%Mm%Ss)
echo saving to $wdir/$capfile.mp4
echo $PATH
ffmpeg -video_size 320x240 -i /dev/video0 \
-vf drawtext="fontsize=18:x=10:y=220:fontcolor=red:\
fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf:\
text=%{localtime}" -t 10 $wdir/$capfile.mp4
# change -t to 3600 = 1h
}
for i in $(seq 1 10)
do
echo
echo Pass $i ...
capture
doneAfter a few loop-runs I always see device errors :
Pass 5 ...
saving to /home/pi/appdev/ffmpeg/2017-09-16_13h31m00s.mp4
/usr/local/bin:/usr/bin/ffmpeg:/usr/bin:/bin:/sbin
ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration: --arch=armhf --target-os=linux --enable-gpl --enable-libfreetype --enable-mmal --enable-nonfree --enable-omx --enable-omx-rpi
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
/dev/video0: Input/output errorThe kernel message log shows that the usb cam has been resetted :
pi@raspi:~/appdev/ffmpeg $ dmesg | grep usb
[ 4497.358195] usb 1-1.2.4: new high-speed USB device number 37 using dwc_otg
[ 4497.573440] usb 1-1.2.4: New USB device found, idVendor=046d, idProduct=09a1
[ 4497.573466] usb 1-1.2.4: New USB device strings: Mfr=0, Product=0, SerialNumber=2
[ 4497.573481] usb 1-1.2.4: SerialNumber: A032D310
[ 4497.605698] input: UVC Camera (046d:09a1) as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4:1.0/input/input15
[ 4497.625582] usb 1-1.2.4: Warning! Unlikely big volume range (=3072), cval->res is probably wrong.
[ 4497.625606] usb 1-1.2.4: [5] FU [Mic Capture Volume] ch = 1, val = 4608/7680/1
[ 5268.123764] usb 1-1.2.4: reset high-speed USB device number 37 using dwc_otgNext time I start the script, the usb cam gets disconnected and /dev/viedo0 disappears :
pi@raspi:~/appdev/ffmpeg $ dmesg | grep usb
[ 5621.216896] usb 1-1.2.4: USB disconnect, device number 37
[ 5621.586804] usb 1-1.2.4: new full-speed USB device number 38 using dwc_otg
[ 5621.686694] usb 1-1.2.4: device descriptor read/64, error -32
[ 5621.896583] usb 1-1.2.4: device descriptor read/64, error -32
[ 5622.106572] usb 1-1.2.4: new full-speed USB device number 39 using dwc_otg
[ 5622.206574] usb 1-1.2.4: device descriptor read/64, error -32
[ 5622.416577] usb 1-1.2.4: device descriptor read/64, error -32
[ 5622.626586] usb 1-1.2.4: new full-speed USB device number 40 using dwc_otg
[ 5623.046583] usb 1-1.2.4: device not accepting address 40, error -32
[ 5623.146583] usb 1-1.2.4: new full-speed USB device number 41 using dwc_otg
[ 5623.566603] usb 1-1.2.4: device not accepting address 41, error -32
[ 5623.566670] usb 1-1.2-port4: unable to enumerate USB deviceHas anybody experienced similar problems and can provide a fix for it ?
What tools can I use to troubleshoot the usb communication on the pi ?