
Recherche avancée
Médias (91)
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Echoplex
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Discipline
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Letting You
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (77)
-
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 -
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 (...) -
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)
Sur d’autres sites (7002)
-
Bad file descriptor decoding mp3 to pipe with ffmpeg
1er février 2017, par Pete BleackleyCan any FFMpeg gurus help me with the following ?
I’m trying to convert a podcast to PCM and downsample it to 16KHz mono before feeding it to a speech recognition system for transcription. The command line
ffmpeg -i http://media.blubrry.com/conlangery/content.blubrry.com/conlangery/Conlangery01.mp3 -f s16le -ac 1 -ar 16000 pipe:0
fails with
av_interleaved_write_frame() : Bad file descriptor
What is the problem here and how do I fix it ?
EDIT
Full error message is
ffmpeg version N-83189-gd5d474aea5-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-4) 20161202
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
libavutil 55. 44.100 / 55. 44.100
libavcodec 57. 75.100 / 57. 75.100
libavformat 57. 62.100 / 57. 62.100
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 69.100 / 6. 69.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Input #0, mp3, from 'http://media.blubrry.com/conlangery/content.blubrry.com/conlangery/Conlangery01.mp3':
Metadata:
track : 1
album : Conlangery Podcast
title : Conlangery 01
artist : George Corley
date : 2011
Duration: 00:44:58.08, start: 0.025057, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
Metadata:
encoder : LAME3.98r
Output #0, s16le, to 'pipe:0':
Metadata:
track : 1
album : Conlangery Podcast
title : Conlangery 01
artist : George Corley
date : 2011
encoder : Lavf57.62.100
Stream #0:0: Audio: pcm_s16le, 16000 Hz, mono, s16, 256 kb/s
Metadata:
encoder : Lavc57.75.100 pcm_s16le
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Bad file descriptor
Error writing trailer of pipe:0: Bad file descriptorsize= 1kB time=00:00:00.02 bitrate= 256.0kbits/s speed=95.2x
video:0kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
Conversion failed!
Traceback (most recent call last):
File "./PodcastTranscriber.py", line 206, in <module>
PodcastTranscriber('http://conlangery.com/feed/',upload)()
File "./PodcastTranscriber.py", line 101, in __call__
self.process(item)
File "./PodcastTranscriber.py", line 136, in process
(audio,errors)=mp3.run(stdout=subprocess.PIPE)
File "/usr/local/lib/python2.7/site-packages/ffmpy.py", line 105, in run
raise FFRuntimeError(self.cmd, self.process.returncode, out[0], out[1])
ffmpy.FFRuntimeError: `ffmpeg -i http://media.blubrry.com/conlangery/content.blubrry.com/conlangery/Conlangery01.mp3 -f s16le -ac 1 -ar 16000 pipe:0` exited with status 1
</module>The invoking code is
def process(self,item):
"""Downloads the audio and transcribes it"""
audio_url=None
print item['title']
for link in item.links:
if link['rel']=='enclosure':
audio_url=link['href']
if audio_url is not None:
pubDate=to_date(item.published_parsed)
if self.lastUploadDate is None or pubDate>self.lastUploadDate:
self.lastUploadDate=pubDate
mp3=ffmpy.FFmpeg(inputs={audio_url:None},
outputs={'pipe:0':['-f','s16le','-ac','1','-ar','16000']})
(audio,errors)=mp3.run(stdout=subprocess.PIPE)
sphinx=subprocess.Popen(['java','-jar','transcriber.jar'],
stdin=audio,
stdout=subprocess.PIPE)
wiki=threading.Thread(target=self.callback,args=(item,sphinx.stdout))
wiki.start()
#mp3.start()
#mp3.join()
sphinx.stdin.close()
wiki.join()
sphinx.wait() -
How to correctly calculate which segments are ready to be downloaded using MPEG-DASH
24 avril 2019, par igal kWhat i’m trying to do ?
Write a simple MPEG-DASH client using the
SegmentTemplate
pattern to calculate which segments are ready to be downloaded for a live source.A picture taken using
chrome
’s debugging tools at a momentX
showing anmpd
request(8af651fd747.....mpd
) and the actual segments fetched respectfully to that request.Given the following
MPD
<mpd availabilitystarttime="2019-04-24T06:43:32Z" maxsegmentduration="PT4.096S" minbuffertime="PT4.096S" minimumupdateperiod="PT15.835S" profiles="urn:mpeg:dash:profile:isoff-live:2011" publishtime="2019-04-24T11:14:01Z" suggestedpresentationdelay="PT11.878S" timeshiftbufferdepth="PT65.536S" type="dynamic" xmlns="urn:mpeg:dash:schema:mpd:2011">
<location>https://content-aaps1.uplynk.com/channel/8af651fd7473474f86a05ffb0a1c8972.mpd?rmt=wv&amp;cid=8af651fd7473474f86a05ffb0a1c8972&amp;oid=600e5c27541344a1bf3818617ad712ce&amp;prettydash=1&amp;exp=1556091088&amp;rn=4138683939&amp;tc=1&amp;ct=c&amp;sig=5fb7f0c18f3f1d2ad4fdee53c02c1e1ed904bc5e8474f4ebf886d209ff7f21c9&amp;pbs=05b6594bcf4b4728ac1094976a80194d</location>
<period start="PT2826.240S">
<adaptationset maxframerate="30" maxheight="720" maxwidth="1280" mimetype="video/mp4" segmentalignment="true" startwithsap="1">
<representation bandwidth="2604473" codecs="avc1.64001e" framerate="30" height="360" scantype="progressive" width="640">
<baseurl>https://x-default-stgec.uplynk.com/aapm/slices/8c1/600e5c27541344a1bf3818617ad712ce/8c1027496a964b049f1bd5895f8f0412/</baseurl>
<segmenttemplate duration="368640" initialization="https://x-default-stgec.uplynk.com/aapm/slices/8c1/600e5c27541344a1bf3818617ad712ce/8c1027496a964b049f1bd5895f8f0412/$RepresentationID$_init.mp4?pbs=05b6594bcf4b4728ac1094976a80194d&amp;_jt=l&amp;chid=8af651fd7473474f86a05ffb0a1c8972" media="$RepresentationID$$Number%08d$.m4f?pbs=05b6594bcf4b4728ac1094976a80194d&amp;_jt=l&amp;chid=8af651fd7473474f86a05ffb0a1c8972" presentationtimeoffset="254361599" startnumber="690" timescale="90000"></segmenttemplate>
</representation>
</adaptationset>
</period>
<utctiming schemeiduri="urn:mpeg:dash:utc:http-iso:2014" value="https://content-aaps1.uplynk.com/misc/utcservertime"></utctiming>
</mpd>I see that the next segment request should be #3955
What i have tried so far
period.end = 1556104456;
period.start = 2826;
availability_start_time = 1556088212;
max_segment_duration = 4;
time_shift_buffer_depth = 65So, first of all, i read DASH-IF-IOP 4.3 section
4.3.4.2
page #82 and implemented the following code :int k1 = 1;
int period_duration = period.end - (period.start + data_.availability_start_time);
int k2 = ceil((float)period_duration / (float)data_.max_segment_duration);
double duration = ((float)representation.duration / (float)representation.timeScale);
size_t live_edge = std::min(
(int)floor((float)((data_.publish_time - data_.availability_start_time - period.start) / duration)), k2);
size_t oldest = std::max(k1, (int)floor((float)((data_.publish_time - data_.availability_start_time - period.start -
data_.time_shift_buffer_depth) /
duration)));after calculating everything :
k1=1
, k2=3355
,live_edge=3272
andoldest=3256
Also tried using
ffmpeg
’sdashdec.c
for min_segment :
if (c->is_live && pls->fragment_duration)
{
num = pls->first_seq_no + (((get_current_time_in_sec() - c->availability_start_time) - c->time_shift_buffer_depth) * pls->fragment_timescale) / pls->fragment_duration;
}for max_segment :
num = pls->first_seq_no + (((get_current_time_in_sec() - c->availability_start_time)) * pls->fragment_timescale) / pls->fragment_duration;
after a small modification :
size_t pmax = (((data_.publish_time - data_.availability_start_time))) / duration;
size_t pmin = ((data_.publish_time - data_.availability_start_time) - data_.time_shift_buffer_depth) / duration;pmin=3946
pmax=3961
in the ffmpeg example, i had to manually remove the
first_seq_no
variable because it looked like i doubled added theSegmentTemplate@StartNumber
.even after succeeding in this task, how do i exactly build the request list of
Segment(NOW)
---->Segment(LIVE_EDGE)
-
lavu : Drop old deprecated AVOption API
5 septembre 2015, par Hendrik Leppkes