
Recherche avancée
Autres articles (51)
-
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 Init et Diogène : types de publications de MediaSPIP
11 novembre 2010, parÀ l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...) -
Changer son thème graphique
22 février 2011, parLe thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
Modifier le thème graphique utilisé
Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
Il suffit ensuite de se rendre dans l’espace de configuration du (...)
Sur d’autres sites (5427)
-
ffmpeg libx264 non-existing PPS 0 referenced
18 août 2014, par Damen Salvatorehello i have installed ffmpeg and libx264 based in the offical tutorial on ffmpeg installation here :
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntui want to get an stream from mumudvb and pass it to ffmpeg for h264 encoding
when i useffserver -f /path/to/config -d
i get this output :
[h264 @ 0x1ab32c0] non-existing PPS 0 referenced
[mpegts @ 0x2c7cca0] Could not find codec parameters for stream 0 (Video: h264 ([27][0][0][0] / 0x001B)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[h264 @ 0x1ab32c0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x1ab32c0] non-existing PPS 0 referenced
[h264 @ 0x1ab32c0] decode_slice_header error
[h264 @ 0x1ab32c0] no frame!
[mpegts @ 0x1aadca0]
decoding for stream 0 failed
[mpegts @ 0x1aadca0] decoding for stream 1 failed
Input #0, mpegts, from 'http://127.0.0.1:9097':
Duration: N/A, start: 45508.714822, bitrate: N/A
Program 107
[mpegts @ 0x1aadca0] Stream #0:0[0x42e]: Video: h264 ([27][0][0][0] / 0x001B)[mpegts @ 0x30b0ca0] decoding for stream 1 failed
, 50 fpsitech@itech-All-Series:~$ , 50 tbr, 90k tbn, 180k tbc
[mpegts @ 0x1cd5ca0] Stream #0:1Could not find codec parameters for stream 1 (Audio: aac_latm ([17][0][0][0] / 0x0011), 0 channels, fltp): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[0x42f](per): Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz, stereo, fltp
http://127.0.0.1:8888/tv7.ffm: Input/output error
Input #0, mpegts, from 'http://127.0.0.1:9093':
Duration: N/A, start: 25560.704144, bitrate: N/A
Program 103
Stream #0:0[0x406]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 720x576 [SAR 16:11 DAR 20:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x407](per): Audio: aac_latm ([17][0][0][0] / 0x0011), 0 channels, fltp
Stream #0:2[0x40b](ara): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Received signal 2: terminating.
[mpegts @ 0x30b0ca0] Could not find codec parameters for stream 0 (Video: h264 ([27][0][0][0] / 0x001B)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
http://127.0.0.1:8888/tv3.ffm: Input/output error
[mpegts @ 0x1aadca0] Could not find codec parameters for stream 1 (Audio: aac_latm ([17][0][0][0] / 0x0011), 0 channels, fltp): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'http://127.0.0.1:9094':
Received signal 2: terminating.
Could not find codec parameters for stream 1 (Audio: aac_latm ([17][0][0][0] / 0x0011), 0 channels, fltp): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Duration: N/A, start: 43409.427056, bitrate: N/A
Program 104
Stream #0:0[0x410]Input #0, mpegts, from 'http://127.0.0.1:9098':
: Video: h264 ([27][0][0][0] / 0x001B), 50 fps, 50 tbr, 90k tbn, 180k tbc
Stream #0:1[0x411](per): Audio: aac_latm ([17][0][0][0] / 0x0011), 0 channels, fltp
Stream #0:2[0x415](ara): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
http://127.0.0.1:8888/tv4.ffm: Input/output error
Received signal 2: terminating.
Duration: N/A, start: 26351.744300, bitrate: N/A
Program 108
Stream #0:0[0x438]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x439](per): Audio: aac_latm ([17][0][0][0] / 0x0011), 0 channels, fltp
Stream #0:2[0x43d](ara): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
http://127.0.0.1:8888/tv8.ffm: Input/output error
Received signal 2: terminating.ffmpeg will gime me the output. but the prooblem is that the outputs bitrate is around 2000k to 3000k it should be 512k
this is my ffserver config :
Port 8888
BindAddress 0.0.0.0
MaxHTTPConnections 20000
MaxClients 10000
MaxBandwidth 1000000
CustomLog -
<feed>
File /tmp/ch1.ffm
FileMaxSize 100M
ACL allow 127.0.0.1
launch ffmpeg -i http://127.0.0.1:9094
</feed>
<stream ch1="ch1">
Feed ch1.ffm
Format mpegts
AudioBitRate 64
AudioChannels 2
AudioSampleRate 44100
#AVOptionAudio flags +global_header
VideoBitRate 512
VideoBufferSize 400
VideoFrameRate 25
VideoBitRateTolerance 100
VideoSize 720x576
VideoGopSize 12
AudioCodec aac
VideoCodec libx264
AVOptionVideo bsf h264_mp4toannexb
#AVOptionVideo threads 0
AVOptionVideo threads_type frame
AVOptionVideo coder 0
AVOptionVideo bf 0
AVOptionVideo flags +loop
AVOptionVideo partitions +parti8x8+parti4x4+partp8x8+partb8x8
AVOptionVideo me_method hex
AVOptionVideo subq 7
AVOptionVideo me_range 16
AVOptionVideo g 250
AVOptionVideo keyint_min 10
AVOptionVideo sc_threshold 40
AVOptionVideo i_qfactor 0.71
AVOptionVideo b_strategy 1
AVOptionVideo qcomp 0.6
AVOptionVideo qmin 10
AVOptionVideo qmax 51
AVOptionVideo qdiff 4
AVOptionVideo refs 3
AVOptionVideo directpred 1
AVOptionVideo trellis 1
AVOptionVideo wpredp 0
#AVOptionVideo flags +global_header
StartSendOnKey
</stream> -
Matomo recognised as a leading global Web Analytics Solution
-
FFMPEG/DASH-LL creates audio and video chunks at different rates ; player is confused (404 errors)
26 mai 2021, par DannyI'm trying to create a MPEG-DASH "live" stream from a static file to test various low latency modes. The DASH muxer in FFmpeg creates two AdaptationSets, one for video chunks and one for audio chunks.


However, the audio and video chunk files are not created at the same rate (should they be ?). ie, here
stream0
are the video chunks andstream1
are the audio chunks. After a few seconds of running, the webroot directory contains :

chunk-stream0-00001.m4s chunk-stream1-00001.m4s 
chunk-stream0-00002.m4s chunk-stream1-00002.m4s 
chunk-stream0-00003.m4s chunk-stream1-00003.m4s 
chunk-stream0-00004.m4s chunk-stream1-00004.m4s 
 chunk-stream1-00005.m4s 
 chunk-stream1-00006.m4s 
 chunk-stream1-00007.m4s 
 chunk-stream1-00008.m4s 
 chunk-stream1-00009.m4s 
master.mpd 
init-stream0.m4s 
init-stream1.m4s 



The stream doesn't load (or play) on either
dash.js
or shaka-player and there are lots of404 (Not Found)
errors for the video chunks. The player is requesting chunks from both stream0 and stream1 in sequence, ie, stream0-001 + stream1-001, then stream0-002 + stream1-002 and so on.

But since stream0 only goes from 001 to 004, there are lots of 404 errors as it tries to load stream0-005 through 009.


The gap gets wider after letting FFmpeg run for a while. eg, stream0 is 62 to 75 but stream1 is 174 to 187. Reloading the player page at this point fails with
dash.all.debug.js:15615 [2055][FragmentController] No video bytes to push or stream is inactive.
and shows 404 errors stream0 chunk 188 (which doesn't exist yet !)



The FFmpeg command was adopted from DASH streaming from the top-down :


ffmpeg -re -i /mnt/swdevel/TestStreams/H264/ThreeHourMovie.mp4 \
-c:v libx264 -x264-params keyint=120:scenecut=0 -b:v 1M -c:a copy \
-f dash -dash_segment_type mp4 \
 -seg_duration 2 \
 -target_latency 3 \
 -frag_type duration \
 -frag_duration 0.2 \
 -window_size 10 \
 -extra_window_size 3 \
 -streaming 1 \
 -ldash 1 \
 -use_template 1 \
 -use_timeline 0 \
 -write_prft 1 \
 -fflags +nobuffer+flush_packets \
 -format_options "movflags=+cmaf" \
 -utc_timing_url "/pelican/testPlayers/time.php" \
 master.mpd



And the
dash.js
player code is very simple :

const srcUrl = "../ottWebRoot/playerTest/master.mpd"; 

var player = dashjs.MediaPlayer().create();

let autoPlay = false;
player.initialize(document.querySelector("#videoTagId"), srcUrl, autoPlay);

player.updateSettings(
{
 streaming :
 {
 lowLatencyEnabled : true,
 liveDelay : 2,
 jumpGaps : true,
 jumpLargeGaps : true,
 smallGapLimit : 1.5,
 }
});



To provide the
UTCTiming
element in the manifest, the smalltime.php
URL returns a UTC time from the web server :

<?php
 print gmdate("Y-m-d\TH:i:s\Z");
?>



(It also shows 404 errors for the latest stream1/audio chunk, that's likely a different problem)


I'm not sure what to try next. Any and suggestions greatly appreciated.


EDIT I


The suggestion by @Anonymous Coward to change the key interval improved things a lot. The chunks for stream0 and stream1 are in lock-step and have identical sequence numbers.


However, there are still many 404 errors, both on initial page load (without pressing play) and during playback.


I ran
watch -n 1 ls -lt code> and compared side-by-side to the errors in the browser console. It's hard to compare but it <em>looks</em> like the browser is trying to fetch files "on the play edge" which haven't yet been created by FFmpeg. See the pic below.


How do I instruct the browser to wait just a bit more before fetching the edge chunks ?




EDIT II


Using
shaka-player
instead ofdash.js
plays properly without 404 errors. Configured as :

player.configure(
 {
 streaming: 
 {
 lowLatencyMode: true,
 inaccurateManifestTolerance: 0,
 rebufferingGoal: 0.1,
 }
 
 });



Client


- 

- MacOS 10.12
- dash.js latest 3.2.2
- Chrome 79, Safari 12, FireFox v ?








Server


- 

- Apache 2.4.37
- PHP 7.2.4 (for time function only)
- Centos 8








(For reference, here is the mpd file generated by FFmpeg)


<?xml version="1.0" encoding="utf-8"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="dynamic" minimumupdateperiod="PT500S" availabilitystarttime="2021-05-24T14:50:00.263Z" publishtime="2021-05-24T15:22:45.335Z" timeshiftbufferdepth="PT50.0S" maxsegmentduration="PT2.0S" minbuffertime="PT5.0S">
 <programinformation>
 </programinformation>
 <servicedescription>
 <latency target="3000" referenceid="0"></latency>
 </servicedescription>
 <period start="PT0.0S">
 <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" framerate="24/1" maxwidth="1280" maxheight="682" par="15:8" lang="und">
 <resync dt="200000" type="0"></resync>
 <representation mimetype="video/mp4" codecs="avc1.64081f" bandwidth="1000000" width="1280" height="682" sar="1023:1024">
 <producerreferencetime inband="true" type="captured" wallclocktime="2021-05-24T14:50:00.263Z" presentationtime="0">
 <utctiming schemeiduri="urn:mpeg:dash:utc:http-xsdate:2014" value="/pelican/testPlayers/time.php"></utctiming>
 </producerreferencetime>
 <resync dt="5000000" type="1"></resync>
 <segmenttemplate timescale="1000000" duration="2000000" availabilitytimeoffset="1.800" availabilitytimecomplete="false" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
 </segmenttemplate>
 </representation>
 </adaptationset>
 <adaptationset contenttype="audio" startwithsap="1" segmentalignment="true" bitstreamswitching="true" lang="und">
 <resync dt="200000" type="0"></resync>
 <representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="116317" audiosamplingrate="48000">
 <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
 <producerreferencetime inband="true" type="captured" wallclocktime="2021-05-24T14:50:00.306Z" presentationtime="0">
 <utctiming schemeiduri="urn:mpeg:dash:utc:http-xsdate:2014" value="/pelican/testPlayers/time.php"></utctiming>
 </producerreferencetime>
 <resync dt="21333" type="1"></resync>
 <segmenttemplate timescale="1000000" duration="2000000" availabilitytimeoffset="1.800" availabilitytimecomplete="false" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
 </segmenttemplate>
 </representation>
 </adaptationset>
 </period>
 <utctiming schemeiduri="urn:mpeg:dash:utc:http-xsdate:2014" value="/pelican/testPlayers/time.php"></utctiming>
</mpd>