
Recherche avancée
Autres articles (18)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
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 (7153)
-
How to use Google's Cloud Speech-to-Text API to transcribe a video using the REST API
8 juin 2018, par mrbI’d like to have the transcript of 2 people speaking in a video, but I get an empty response from the Cloud Speech-to-Text API
Approach :
I have a 56 minute video file containing a conversation between two people. I would like to have the transcript of that conversation, and I would like to use Google’s Cloud Speech-to-Text API to get that.
To save a little on my Google Cloud Storage I converted to video to audio first by using
mmpeg
.First I’d tried to figure out the audio codec by using the command below, and it looks like AAC.
ffmpeg -i video.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'videoplayback.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2015-12-30T08:17:14.000000Z
Duration: 00:56:03.99, start: 0.000000, bitrate: 362 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 490x360 [SAR 1:1 DAR 49:36], 264 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
Metadata:
creation_time : 2015-12-30T08:17:31.000000Z
handler_name : IsoMedia File Produced by Google, 5-11-2011So I took that from the video by using :
ffmpeg -i video.mp4 -vn -acodec copy myaudio.aac
Details so far :
ffmpeg -i myaudio.aac
Outputs :Input #0, aac, from 'myaudio.aac':
Duration: 00:56:47.49, bitrate: 97 kb/s
Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 97 kb/sAfter that I converted it to opus because I’m told that opus is better
ffmpeg -i myaudio.aac -acodec libopus -b:a 97k -vbr on -compression_level 10 myaudio.opus
Info so far :
opusinfo myaudio.opus
User comments section follows...
encoder=Lavc58.18.100 libopus
Opus stream 1:
Pre-skip: 312
Playback gain: 0 dB
Channels: 2
Original sample rate: 48000Hz
Packet duration: 20.0ms (max), 20.0ms (avg), 20.0ms (min)
Page duration: 1000.0ms (max), 1000.0ms (avg), 1000.0ms (min)
Total data length: 29956714 bytes (overhead: 0.872%)
Playback length: 56m:03.990s
Average bitrate: 71.24 kb/s, w/o overhead: 70.62 kb/sI this point I uploaded the
myaudio.opus
to the Google Cloud Storage.curl POST 1
I started the speech recognition by doing a POST withcurl
:curl --request POST --header "Content-Type: application/json" --url 'https://speech.googleapis.com/v1/speech:longrunningrecognize?fields=done%2Cerror%2Cmetadata%2Cname%2Cresponse&key={MY_API_KEY}' --data '{"audio": {"uri": "gs://{MY_BUCKET}/myaudio.opus"},"config": {"encoding": "OGG_OPUS", "sampleRateHertz": 48000, "languageCode": "en-US"}}'
Response :
{"name": "123456789"}
123456789 was not the actual value.curl GET 1
Now I wanted to have the results :curl --request GET --url 'https://speech.googleapis.com/v1/operations/123456789?fields=done%2Cerror%2Cmetadata%2Cname%2Cresponse&key={MY_API_KEY}'
This gave me the error :
Error : Unable to recognize speech, possible error in encoding or channel config. Please correct the config and retry the request.
So I updated the encoding configuration from
OGG_OPUS
toLINEAR16
.curl POST 2
Did the post again :curl --request POST --header "Content-Type: application/json" --url 'https://speech.googleapis.com/v1/speech:longrunningrecognize?fields=done%2Cerror%2Cmetadata%2Cname%2Cresponse&key={MY_API_KEY}' --data '{"audio": {"uri": "gs://{MY_BUCKET}/myaudio.opus"},"config": {"encoding": "LINEAR16", "sampleRateHertz": 48000, "languageCode": "en-US"}}'
Response :
{"name": "987654321"}
curl GET 2
curl --request GET --url 'https://speech.googleapis.com/v1/operations/987654321?fields=done%2Cerror%2Cmetadata%2Cname%2Cresponse&key={MY_API_KEY}'
Response :
{
"name": "987654321",
"metadata": {
"@type": "type.googleapis.com/google.cloud.speech.v1.LongRunningRecognizeMetadata",
"progressPercent": 100,
"startTime": "2018-06-08T11:01:24.596504Z",
"lastUpdateTime": "2018-06-08T11:01:51.825882Z"
},
"done": true
}The problem is that I don’t get the actual transcription. According the the documentation there should be a
response
key in the response containing the data.Since I’m kinda stuck here I’d like to know if I’m doing something completely wrong. I don’t have any technical or resource limitation so all suggestions are very welcome ! Also happy to change my approach.
Thanks in advance ! Cheers
-
FFMPEG MKV Causing Errors in DASH JS
24 juin 2018, par MikeI’m getting the following browser errors (on all browsers) using Dash JS when transcoding and MKV file :
ERROR DOMException: Failed to read the 'buffered' property from 'SourceBuffer': This SourceBuffer has been removed from the parent media source.
and...
dash.all.min.js:26 Uncaught (in promise) DOMException: Failed to load because no supported source was found.
What’s weird is I have no issues when I transcode a MP4 file. I’m using FFMPEG in conjunction with Bento4 to build MPEG DASH and HLS files for my video player.
What I did to single out FFMPEG was to transcode a video that gave me errors on my test server on my local machine (which works) and start the Bento4 process on that file. Doing that, I had no issues and everything played just fine.
I have removed FFMPEG and reinstalled it multiple times and I always get the same result. I’m sure I screwed something up on my server, but for the life of me I can’t seem to figure out where to start with fixing the issue.
FFMPEG Version
ffmpeg version N-91321-ge85c608 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
configuration:
--prefix=/root/ffmpeg_build
--pkg-config-flags=--static
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib
--extra-libs=-lpthread
--extra-libs=-lm
--bindir=/root/bin
--enable-gpl
--enable-libfdk_aac
--enable-libfreetype
--enable-libmp3lame
--enable-libopus
--enable-libvorbis
--enable-libtheora
--enable-libx264
--enable-nonfree
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 20.102 / 58. 20.102
libavformat 58. 17.100 / 58. 17.100
libavdevice 58. 4.101 / 58. 4.101
libavfilter 7. 25.100 / 7. 25.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100FFMPEG Command
ffmpeg
-i ${DIRECTORY}/${INPUT_FILE}
-progress ${DIRECTORY}/transcode.log
-s 1920x1080
-c:v libx264
-b:v 3000k
-c:a aac
-b:a 32k
-minrate 3000k
-maxrate 3000k
-bufsize 6000k
-g 96
-keyint_min 96
-sc_threshold 0
-profile:v high
-flags +cgop
-movflags faststart
-preset ultrafast
-pix_fmt yuv420p
${DIRECTORY}/ffmpeg_1920_1080_3000.mp4 &> ${DIRECTORY}/ffmpeg.logAlso, I get no errors and and if I access the output files directly, they play just fine.
I’m sure I’m not including all the information needed to troubleshoot this, so let me know if there is better information I can provide.
What would cause FFMPEG to transcode MP4 and not MKV ?
EDIT
One last thing, I converted the MKV to an MP4 then used the above command and it worked. It’s like MP4 to MP4 is fine, but MKV to MP4 is broke. -
Automatic encoder selection failed for output stream #0:1
9 juin 2018, par Rafael LimaI’m trying to use ffmpeg for edit some videos on android...
It is working fine but if I try to use drawtext i get errorthe command is :
path/ffmpeg -y -i /path/asd.mp4 -map 0 -segment_time 15 -f segment -c:v libx264 -preset veryfast -crf 30 -vf "drawtext=text='test message ':fontfile=/path/arial.ttf:box=1:boxborderw=30:boxcolor=0xE86F67@0.7:fix_bounds=true:fontcolor=0x2A363B:fontsize=32:x=0:y=h" -r 30 -force_key_frames expr:gte(t,n_forced*15) -an /path/temp%03d.mp4
and the error is :
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with Android (4691093 based on r316199) clang version 6.0.2 (https://android.googlesource.com/toolchain/clang 183abd29fc496f55536e7d904e0abae47888fc7f) (https://android.googlesource.com/toolchain/llvm 34361f192e41ed6e4e8f9aca80a4ea7e9856f327) (based on LLVM 6.0.2svn)
configuration: --prefix=/home/rafa/Desktop/m4/build --target-os=linux --arch=i686 --cpu=i686 --cross-prefix=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/i686-linux-android- --enable-cross-compile --cc=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/clang --cxx=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/clang++ --sysroot=/home/rafa/Desktop/m4/ndk/toolchain/i686/sysroot --pkg-config=/usr/bin/pkg-config --pkg-config-flags=--static --enable-pic --enable-gpl --enable-nonfree --enable-static --disable-shared --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-doc --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libx264 --enable-libfdk-aac --enable-bsf=aac_adtstoasc --enable-librtmp --enable-zlib --enable-libfreetype --enable-openssl --enable-libfontconfig --disable-asm --disable-devices --extra-cflags=-mno-stackrealign
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : 20180226 174005
artist : Rafael Lima
date : 2018
encoder : Lavf55.49.100
comment : https://www.youtube.com/watch?v=bkzc9mLyCyo
Duration: 00:03:26.94, start: 0.000000, bitrate: 4156 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 4025 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
handler_name : SoundHandler
Automatic encoder selection failed for output stream #0:1. Default encoder for format segment (codec none) is probably disabled. Please choose an encoder manually.
Error selecting an encoder for stream 0:1things to considere :
1. I’ve checked 3 times all the paths are valid
2. I’ve tested the same command on ffmpeg 4.0 on windows and it works [with the same video]
3. If I remove the drawtext filter it works fine...I tought it ffmpeg was built without drawtext or with some error so i spent 10 days in order to build it bymyself and guarantee every dependency is ok... but at end i got the same error
does anyone have any idea please
==============================
UPDATEI keep testing and if I remove the quotes from the filter and use a text without spacing it works
ex :
drawtext=text='test_message':fontfile=/path/arial.ttf:box=1:boxborderw=30:boxcolor=0xE86F67@0.7:fix_bounds=true:fontcolor=0x2A363B:fontsize=32:x=0:y=h
so I believe there is something related to how android is escapes quotes and simple quotes because i compiled ffmpeg with same parameters and it runs on ubuntu with spaces at the text (just need to use simple quotes)
does anyone know about it ?