
Recherche avancée
Autres articles (42)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (6703)
-
find in bash to convert files with ffmpeg - paths being changed
20 avril 2017, par J VTrying to convert a bunch of files with ffmpeg and find.
find -name "*.mkv" | while read f
do ffmpeg -i "$f" -c copy -y "${f%.*}.mp4"
doneThis should work right ? It results in :
+ read f
+ ffmpeg -i '/file.mkv' -c copy -y '/file.mp4'
ffmpeg version N-61155-g61ff043 Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 7 2014 19:17:59 with gcc 4.8 (Debian 4.8.2-16)
/file.mkv: No such file or directorySo I naturally try sticking the missing dot in front of the variable :
find -name "*.mkv" | while read f
do ffmpeg -i ".$f" -c copy -y ".${f%.*}.mp4"
doneThe result :
+ read f
+ ffmpeg -i '../file.mkv' -c copy -y '../file.mp4'
ffmpeg version N-61155-g61ff043 Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 7 2014 19:17:59 with gcc 4.8 (Debian 4.8.2-16)
../file.mkv: No such file or directoryIt’s specifically removing the dot at the worst possible time. Any idea what’s causing this and how to fix it ?
PS :
-print0
in find has the same problem, and none of the files have newlines etc.Edit : As requested, the echo. The echo works as expected :
find -name "*.mkv" | while read f
do echo ffmpeg -i "$f" -c copy -y "${f%.*}.mp4"
done
+ read f
+ echo ffmpeg -i './file.mkv' -c copy -y './file.mp4'
ffmpeg -i ./file.mkv -c copy -y ./file.mp4Edit2 : With a file with a space and one without, the filename without is changed. If I
rm
the one with a space the one without works fine.$ ls
+ ls
file.mkv file two.mkv
$ find -name "*.mkv" | while read f; do ffmpeg -i "$f" -c copy -y "${f%.*}.mp4"; done
+ find -name '*.mkv'
+ read f
+ ffmpeg -i './file two.mkv' -c copy -y './file two.mp4'
ffmpeg version N-61155-g61ff043 Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 7 2014 19:17:59 with gcc 4.8 (Debian 4.8.2-16)
configuration: --arch=amd64 --enable-pthreads --enable-libopencv --enable-librtmp --enable-libopenjpeg --enable-libopus --enable-libspeex --enable-libtheora --enable-vaapi --enable-runtime-cpudetect --enable-libvorbis --enable-zlib --enable-swscale --enable-libcdio --enable-bzlib --enable-libdc1394 --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-libpulse --enable-vdpau --enable-libvpx --enable-gpl --enable-x11grab --enable-libx264 --enable-filters
libavutil 52. 66.101 / 52. 66.101
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.101 / 55. 33.101
libavdevice 55. 11.100 / 55. 11.100
libavfilter 4. 3.100 / 4. 3.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, matroska,webm, from './file two.mkv':
Metadata:
COMPATIBLE_BRANDS: isommp42
MAJOR_BRAND : mp42
MINOR_VERSION : 0
ENCODER : Lavf55.33.101
Duration: 00:08:15.54, start: 0.000000, bitrate: 194 kb/s
Stream #0:0(und): Audio: aac, 44100 Hz, stereo, fltp (default)
Metadata:
CREATION_TIME : 2014-03-07 04:33:17
LANGUAGE : und
HANDLER_NAME : IsoMedia File Produced by Google, 5-11-2011
Output #0, mp4, to './file two.mp4':
Metadata:
COMPATIBLE_BRANDS: isommp42
MAJOR_BRAND : mp42
MINOR_VERSION : 0
encoder : Lavf55.33.101
Stream #0:0(und): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo (default)
Metadata:
CREATION_TIME : 2014-03-07 04:33:17
LANGUAGE : und
HANDLER_NAME : IsoMedia File Produced by Google, 5-11-2011
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 11698kB time=00:08:15.53 bitrate= 193.4kbits/s
video:0kB audio:11614kB subtitle:0 data:0 global headers:0kB muxing overhead 0.724668%
+ read f
+ ffmpeg -i /file.mkv -c copy -y /file.mp4
ffmpeg version N-61155-g61ff043 Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 7 2014 19:17:59 with gcc 4.8 (Debian 4.8.2-16)
configuration: --arch=amd64 --enable-pthreads --enable-libopencv --enable-librtmp --enable-libopenjpeg --enable-libopus --enable-libspeex --enable-libtheora --enable-vaapi --enable-runtime-cpudetect --enable-libvorbis --enable-zlib --enable-swscale --enable-libcdio --enable-bzlib --enable-libdc1394 --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-libpulse --enable-vdpau --enable-libvpx --enable-gpl --enable-x11grab --enable-libx264 --enable-filters
libavutil 52. 66.101 / 52. 66.101
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.101 / 55. 33.101
libavdevice 55. 11.100 / 55. 11.100
libavfilter 4. 3.100 / 4. 3.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
/file.mkv: No such file or directory
+ read f -
change wav sample rate from 22khz to 44khz with ffmpeg [on hold]
17 mars 2014, par Marc MaxsonI have wav files that the web browser has recorded using recorder.js at 22.05khz (in order to limit filesize). On the server, I'm using ffmpeg to convert them to 44.1khz MP3 files.
ffmpeg has pretty good documentation, and I think this ought to do what I want :
ffmpeg -i ~/webapps/s/audiostory/absquatulate-ko6vc-2014-03-14.wav -ar 44100 test.mp3
but the file still sounds slow. I probed :
> ffprobe /home/djotjog/webapps/s/audiostory/absquatulate-ko6vc-2014-03-14.wav
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 2 channels, s16, 705 kb/s
> ffprobe test.mp3
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/sWhat am I doing wrong ? I've tried a bunch of other tricks, including :
ffmpeg -i /webapps/s/audiostory/absquatulate-ko6vc-2014-03-14.wav -ar 44100 -filter:a "aresample=44100" test2.wav
(should resample the file)and
ffmpeg -i /webapps/s/audiostory/absquatulate-ko6vc-2014-03-14.wav -ar 44100 -filter:a "atempo=2.0" aresample=44100 test2.wav
(should double the tempo of the file)but they had no effect either.
-
FFmpeg/Libav audio decode example
19 mai 2015, par Walid BaccariI am trying to get the same output as that of ffmpeg/avconv from converting an MP2 file to raw PCM using code. I used the audio_decode_example function from the tutorial included in the FFmpeg/Libav documentation but the outputs were different.
What steps does the ffmpeg/avconv command perform that I need to add to my program to get the same output ?
Edit :
This is the output fromavconv -v debug -i test.mp2 test.sw
:avconv version v10_beta1-302-g606cc8a, Copyright (c) 2000-2014 the Libav developers
built on Mar 20 2014 20:28:32 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
configuration:
libavutil 53. 6. 0 / 53. 6. 0
libavcodec 55. 34. 1 / 55. 34. 1
libavformat 55. 12. 0 / 55. 12. 0
libavdevice 54. 0. 0 / 54. 0. 0
libavfilter 4. 3. 0 / 4. 3. 0
libavresample 1. 2. 0 / 1. 2. 0
libswscale 2. 1. 2 / 2. 1. 2
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set libav* logging level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument 'test.mp2'.
Reading option 'test1.sw' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set libav* logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file test.mp2.
Successfully parsed a group of options.
Opening an input file: test.mp2.
[mp3 @ 0x27e5060] Probed with size=2048 and score=51
[mp3 @ 0x27e5060] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, mp3, from 'test.mp2':
Duration: 00:00:04.80, start: 0.000000, bitrate: 64 kb/s
Stream #0.0, 200, 1/14112000: Audio: mp2, 48000 Hz, stereo, s16p, 64 kb/s
Successfully opened the file.
Parsing a group of options: output file test1.sw.
Successfully parsed a group of options.
Opening an output file: test1.sw.
Successfully opened the file.
Detected 2 logical cores.
[abuffer @ 0x27e5860] tb:1/48000 samplefmt:s16p samplerate: 48000 ch layout:0x3
[abuffersink @ 0x2807040] auto-inserting filter 'auto-inserted fifo 0' between the filter 'audio format for output stream 0:0' and the filter 'output stream 0:0'
[aformat @ 0x2806bc0] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed filter 0 anull' and the filter 'audio format for output stream 0:0'
[AVAudioResampleContext @ 0x28092a0] audio_convert: found function: s16p to s16 (C)
[AVAudioResampleContext @ 0x28092a0] audio_convert: found function: s16p to s16 (SSE2)
[resample @ 0x2808560] fmt:s16p srate:48000 cl:stereo -> fmt:s16 srate:48000 cl:stereo
Output #0, s16le, to 'test1.sw':
Metadata:
encoder : Lavf55.12.0
Stream #0.0, 0, 1/90000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mp2 -> pcm_s16le)
Press ctrl-c to stop encoding
Input stream #0:0 frame changed from rate:48000 fmt:s16p ch:2 chl:stereo to rate:48000 fmt:s16 ch:2 chl:stereo
Detected 2 logical cores.
[abuffer @ 0x2806e40] tb:1/48000 samplefmt:s16 samplerate: 48000 ch layout:0x3
[abuffersink @ 0x2806fa0] auto-inserting filter 'auto-inserted fifo 0' between the filter 'audio format for output stream 0:0' and the filter 'output stream 0:0'
No more output streams to write to, finishing.
size= 900kB time=4.80 bitrate=1536.0kbits/s
video:0kB audio:0kB global headers:0kB muxing overhead 0.000000%