
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (25)
-
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (4428)
-
Revision 37406 : Le cron toute les minutes Amélioration de pleins de petites choses ...
18 avril 2010, par kent1@… — LogLe cron toute les minutes
Amélioration de pleins de petites choses
Incrément mineur de la version -
Live streaming Channel Multiview used ffmpeg X11grab and shaka packager
18 août 2020, par jgkim0518I have been trying to live stream channel multiview used xvfb, firefox, vlc, ffmpeg and shaka packager.
1). Making virtual display used Xvfb.
2). Popping up a web page used fireforx on 1).
3). Drawing nine video(each channel) used vlc plugin on 2).
4). Capturing 2) used ffmpeg library, x11grab.
5). Transcoding 4) to FHD(HEVC)+10 Audio(each channel sound + dummy), FHD(H.264)+no sound, HD(H.264)+no sound, SD(H.264)+no sound, nHD(H.264)+no sound
6). packaging 5) used Shaka Packager


This is my command. shell script


function exec-xvfb () {
$XVFB :$display_port -br -noreset -nolisten tcp -screen 0 1920x1080x24 &}

function exec-firefox () {
 AUDIO_CTRL_PATH="$audio_ctrl_port:/TEST/vlcenv/.sync.dat" VLC_INFO_PATH=/TEST/vlcenv/vlc_info.dat AUDIO_SHARE_KEY="$AUDIO_SHARE_KEY" AUDIO_SHARE_PATH=/TEST/vlcenv/.share.shm MOSAIC_META_PATH=/TEST/meta_bin.dat DISPLAY=":$display_port" $FIREFOX --display=:$display_port --no remote --profile /TEST/browser -width 1920 -height 1080 http://127.0.0.1:8021/template/best_channel_9_1/page/index.html &
}

function transcoder () {
 AUDIO_CTRL_PATH="$audio_ctrl_port:/TEST/vlcenv/.sync.dat" VLC_INFO_PATH=/TEST/vlcenv/vlc_info.dat 
AUDIO_SHARE_KEY="$AUDIO_SHARE_KEY" AUDIO_SHARE_PATH=/TEST/vlcenv/.share.shm 
MOSAIC_META_PATH=/TEST/meta_bin.dat DISPLAY=":$display_port" 
LD_LIBRARY_PATH=/transcoder/lib:/transcoder/lib/cuda /transcoder/gpu/transcoder -y -re \
 -analyzeduration 0 -f s16le -ar 48000 -ac 2 -pkt_size 128000 -i syc://@:$trc_sync_port?dummy=1 \
 -analyzeduration 0 -f s16le -ar 48000 -ac 2 -pkt_size 128000 -i syc://@:$(($trc_sync_port+1)) \
 -analyzeduration 0 -f s16le -ar 48000 -ac 2 -pkt_size 128000 -i syc://@:$(($trc_sync_port+2)) \
 -analyzeduration 0 -f s16le -ar 48000 -ac 2 -pkt_size 128000 -i syc://@:$(($trc_sync_port+3)) \
 -analyzeduration 0 -f s16le -ar 48000 -ac 2 -pkt_size 128000 -i syc://@:$(($trc_sync_port+4)) \
 -analyzeduration 0 -f s16le -ar 48000 -ac 2 -pkt_size 128000 -i syc://@:$(($trc_sync_port+5)) \
 -analyzeduration 0 -f s16le -ar 48000 -ac 2 -pkt_size 128000 -i syc://@:$(($trc_sync_port+6)) \
 -analyzeduration 0 -f s16le -ar 48000 -ac 2 -pkt_size 128000 -i syc://@:$(($trc_sync_port+7)) \
 -analyzeduration 0 -f s16le -ar 48000 -ac 2 -pkt_size 128000 -i syc://@:$(($trc_sync_port+8)) \
 -analyzeduration 0 -f s16le -ar 48000 -ac 2 -pkt_size 128000 -i syc://@:$(($trc_sync_port+9)) \
 -analyzeduration 0 -f x11grab -draw_mouse 0 -video_size 1920x1080 -framerate 29.97 -i :$display_port.0+0,0,nomouse \
 -c:a libfdk_aac -ar:a 48000 -ac:a 2 -b:a 128000 -vf hwupload_cuda=device=$gpu_no,scale_npp=1920:1080:format=yuv420p -gpu $gpu_no -c:v hevc_nvenc -preset:v fast -profile:v main -r 29.97 -g 15 -b:v 6000000 -bufsize 14000000 -maxrate 7000000 \
 -map 0:a -map 1:a -map 2:a -map 3:a -map 4:a -map 5:a -map 6:a -map 7:a -map 8:a -map 9:a -map 10:v -f mpegts udp://127.0.0.1:$trc_output_port?pkt_size=1316 \
 -an -vf hwupload_cuda=device=$gpu_no,scale_npp=1920:1080:format=yuv420p -gpu $gpu_no -c:v h264_nvenc -preset:v fast -profile:v main -r 29.97 -g 15 -b:v 4000000 -bufsize 8000000 -maxrate 4000000 -f mpegts udp://127.0.0.1:$(($trc_output_port+1))?pkt_size=1316 \
 -an -vf hwupload_cuda=device=$gpu_no,scale_npp=1280:720:format=yuv420p -gpu $gpu_no -c:v h264_nvenc -preset:v fast -profile:v main -r 29.97 -g 15 -b:v 2000000 -bufsize 4000000 -maxrate 2000000 -f mpegts udp://127.0.0.1:$(($trc_output_port+2))?pkt_size=1316 \
 -an -vf hwupload_cuda=device=$gpu_no,scale_npp=720:480:format=yuv420p -gpu $gpu_no -c:v h264_nvenc -preset:v fast -profile:v main -r 29.97 -g 15 -b:v 1500000 -bufsize 3000000 -maxrate 1500000 -f mpegts udp://127.0.0.1:$(($trc_output_port+3))?pkt_size=1316 \
 -an -vf hwupload_cuda=device=$gpu_no,scale_npp=640:360:format=yuv420p -gpu $gpu_no -c:v h264_nvenc -preset:v fast -profile:v main -r 29.97 -g 15 -b:v 800000 -bufsize 1600000 -maxrate 800000 -f mpegts udp://127.0.0.1:$(($trc_output_port+4))?pkt_size=1316 \main &
}

function packager () { 
 rm -rf $OUTPUT/*
 /packager/packager \ 

 "in=udp://127.0.0.1:$trc_output_port,stream=0,init_segment=$OUTPUT/audio/0/audio_4.mp4,segment_template=$OUTPUT/audio/0/\$Time\$.m4s" \ "in=udp://127.0.0.1:$trc_output_port,stream=1,init_segment=$OUTPUT/audio/1/audio_4.mp4,segment_template=$OUTPUT/audio/1/\$Time\$.m4s" \
 "in=udp://127.0.0.1:$trc_output_port,stream=2,init_segment=$OUTPUT/audio/2/audio_4.mp4,segment_template=$OUTPUT/audio/2/\$Time\$.m4s" \
 "in=udp://127.0.0.1:$trc_output_port,stream=3,init_segment=$OUTPUT/audio/3/audio_4.mp4,segment_template=$OUTPUT/audio/3/\$Time\$.m4s" \
 "in=udp://127.0.0.1:$trc_output_port,stream=4,init_segment=$OUTPUT/audio/4/audio_4.mp4,segment_template=$OUTPUT/audio/4/\$Time\$.m4s" \
 "in=udp://127.0.0.1:$trc_output_port,stream=5,init_segment=$OUTPUT/audio/5/audio_4.mp4,segment_template=$OUTPUT/audio/5/\$Time\$.m4s" \
 "in=udp://127.0.0.1:$trc_output_port,stream=6,init_segment=$OUTPUT/audio/6/audio_4.mp4,segment_template=$OUTPUT/audio/6/\$Time\$.m4s" \
 "in=udp://127.0.0.1:$trc_output_port,stream=7,init_segment=$OUTPUT/audio/7/audio_4.mp4,segment_template=$OUTPUT/audio/7/\$Time\$.m4s" \
 "in=udp://127.0.0.1:$trc_output_port,stream=8,init_segment=$OUTPUT/audio/8/audio_4.mp4,segment_template=$OUTPUT/audio/8/\$Time\$.m4s" \
 "in=udp://127.0.0.1:$trc_output_port,stream=9,init_segment=$OUTPUT/audio/9/audio_4.mp4,segment_template=$OUTPUT/audio/9/\$Time\$.m4s" \
 "in=udp://127.0.0.1:$trc_output_port,stream=video,init_segment=$OUTPUT/video/0/video_4.mp4,segment_template=$OUTPUT/video/0/\$Time\$.m4s" \
 "in=udp://127.0.0.1:$(($trc_output_port+1)),stream=video,init_segment=$OUTPUT/video/1/video_4.mp4,segment_template=$OUTPUT/video/1/\$Time\$.m4s" \
 "in=udp://127.0.0.1:$(($trc_output_port+2)),stream=video,init_segment=$OUTPUT/video/2/video_4.mp4,segment_template=$OUTPUT/video/2/\$Time\$.m4s" \
 "in=udp://127.0.0.1:$(($trc_output_port+3)),stream=video,init_segment=$OUTPUT/video/3/video_4.mp4,segment_template=$OUTPUT/video/3/\$Time\$.m4s" \
 "in=udp://127.0.0.1:$(($trc_output_port+4)),stream=video,init_segment=$OUTPUT/video/4/video_4.mp4,segment_template=$OUTPUT/video/4/\$Time\$.m4s" \
 --segment_duration 10 --fragment_duration 10 --minimum_update_period 10 --allow_codec_switching --preserved_segments_outside_live_window 24 --time_shift_buffer_depth 40 \
 --mpd_output $OUTPUT/$output_mpd.mpd
}



vlc warning and error messages when duration 7


...
adaptive debug: Timeline
adaptive debug: Element #1 d=669670 r=0 @t=6321195
adaptive debug: Element #2 d=576576 r=0 @t=6990865
adaptive debug: Element #3 d=669670 r=0 @t=7567441
adaptive debug: Element #4 d=672673 r=0 @t=8237111
adaptive debug: Element #5 d=561561 r=0 @t=8909784
adaptive debug: Element #6 d=654655 r=0 @t=9471345
adaptive debug: Element #7 d=630631 r=0 @t=10126000
adaptive debug: Updated MPD, next update in 7s
main warning: picture is too late to be displayed (missing 223 ms)
main warning: picture is too late to be displayed (missing 157 ms)
main warning: picture is too late to be displayed (missing 91 ms)
main warning: picture is too late to be displayed (missing 24 ms)
adaptive debug: Retrieving http://192.168.0.181:81/300/audio/5/9451440.m4s @0
adaptive debug: Retrieving http://192.168.0.181:81/300/video/0/9475185.m4s @0
adaptive debug: Retrieving http://192.168.0.181:81/300/300.mpd @0
main debug: creating access: http://192.168.0.181:81/300/300.mpd
main debug: (path: \\192.168.0.181:81\300\300.mpd)
main debug: looking for access module matching "http": 26 candidates
http debug: resolving 192.168.0.181 ...
http debug: outgoing request: GET /300/300.mpd HTTP/1.1 Host:192.168.0.181:81 Accept: */* Accept-Language: en_US User-Agent: VLC/3.0.11 LibVLC/3.0.11 Range: bytes=0- 
http debug: incoming response: HTTP/1.1 206 Partial Content Server: nginx Date: Mon, 17 Aug 2020 09:10:08 GMT Content-Type: application/octet-stream Content-Length: 10406 Last-Modified: Mon, 17 Aug 2020 09:10:08 GMT Connection: keep-alive ETag: "5f3a4970-28a6" Content-Range: bytes 0-10405/10406 
main debug: using access module "access"
main debug: looking for stream_filter module matching "prefetch,cache_block": 24 candidates
prefetch debug: using 10406 bytes buffer, 10406 bytes read
main debug: using stream_filter module "prefetch"
main debug: looking for stream_filter module matching "any": 24 candidates
main debug: no stream_filter modules matched
main debug: looking for stream_filter module matching "inflate": 24 candidates
main debug: no stream_filter modules matched
prefetch debug: end of stream
main debug: removing module "prefetch"
main debug: removing module "access"
main debug: looking for xml reader module matching "any": 1 candidates
main debug: using xml reader module "xml"
adaptive debug: MPD profile=urn:mpeg:dash:profile:isoff-live:2011 mediaPresentationDuration=0 minBufferTime=2
adaptive debug: BaseUrl=http://192.168.0.181:81/300/
adaptive debug: Period
adaptive debug: BaseAdaptationSet 0
adaptive debug: Representation 0 [mp4a]
adaptive debug: InitSegmentTemplate #0 url=http://192.168.0.181:81/300/audio/0/audio_4.mp4 duration 0
adaptive debug: SegmentTemplate #12 url=http://192.168.0.181:81/300/audio/0/$Time$.m4s duration 0
adaptive debug: Timeline
adaptive debug: Element #1 d=629760 r=1 @t=6930480
adaptive debug: Element #3 d=631680 r=0 @t=8190000
adaptive debug: Element #4 d=629760 r=3 @t=8821680
adaptive debug: Representation 1 [mp4a]
adaptive debug: InitSegmentTemplate #0 url=http://192.168.0.181:81/300/audio/1/audio_4.mp4 duration 0
adaptive debug: SegmentTemplate #12 url=http://192.168.0.181:81/300/audio/1/$Time$.m4s duration 0
...
adaptive debug: Timeline
adaptive debug: Element #1 d=576576 r=0 @t=6990865
adaptive debug: Element #2 d=669670 r=0 @t=7567441
adaptive debug: Element #3 d=672673 r=0 @t=8237111
adaptive debug: Element #4 d=561561 r=0 @t=8909784
adaptive debug: Element #5 d=654655 r=0 @t=9471345
adaptive debug: Element #6 d=630631 r=0 @t=10126000
adaptive debug: Element #7 d=666666 r=0 @t=10756631
adaptive debug: Updated MPD, next update in 7s
main error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 2168 ms)
main debug: ES_OUT_RESET_PCR called
main debug: Buffering 0%
main debug: Buffering 1%
main debug: Buffering 2%
main debug: Received first picture
mmdevice debug: state changed: 0
main debug: Buffering 4%
...
main debug: Buffering 15%
wasapi debug: reset
main debug: Buffering 17%
...
main debug: Buffering 98%
main debug: Stream buffering done (2176 ms in 16 ms)
main debug: Decoder wait done in 0 ms
main warning: playback too early (-110003): down-sampling
mmdevice debug: state changed: 1
adaptive debug: Retrieving http://192.168.0.181:81/300/video/0/10129840.m4s @0
adaptive debug: Retrieving http://192.168.0.181:81/300/audio/5/10081200.m4s @0
adaptive debug: Retrieving http://192.168.0.181:81/300/300.mpd @0
main debug: creating access: http://192.168.0.181:81/300/300.mpd
main debug: (path: \\192.168.0.181:81\300\300.mpd)
main debug: looking for access module matching "http": 26 candidates
http debug: resolving 192.168.0.181 ...
http debug: outgoing request: GET /300/300.mpd HTTP/1.1 Host: 192.168.0.181:81 Accept: */* Accept-Language: en_US User-Agent: VLC/3.0.11 LibVLC/3.0.11 Range: bytes=0- 
http debug: incoming response: HTTP/1.1 206 Partial Content Server: nginx Date: Mon, 17 Aug 2020 09:10:15 GMT Content-Type: application/octet-stream Content-Length: 10387 Last-Modified: Mon, 17 Aug 2020 09:10:15 GMT Connection: keep-alive ETag: "5f3a4977-2893" Content-Range: bytes 0-10386/10387 
main debug: using access module "access"
main debug: looking for stream_filter module matching "prefetch,cache_block": 24 candidates
prefetch debug: using 10387 bytes buffer, 10387 bytes read
main debug: using stream_filter module "prefetch"
main debug: looking for stream_filter module matching "any": 24 candidates
main debug: no stream_filter modules matched
main debug: looking for stream_filter module matching "inflate": 24 candidates
main debug: no stream_filter modules matched
prefetch debug: end of stream
main debug: removing module "prefetch"
main debug: removing module "access"
main debug: looking for xml reader module matching "any": 1 candidates
main debug: using xml reader module "xml"
adaptive debug: MPD profile=urn:mpeg:dash:profile:isoff-live:2011 mediaPresentationDuration=0 minBufferTime=2
adaptive debug: BaseUrl=http://192.168.0.181:81/300/
adaptive debug: Period
adaptive debug: BaseAdaptationSet 0
adaptive debug: Representation 0 [mp4a]
adaptive debug: InitSegmentTemplate #0 url=http://192.168.0.181:81/300/audio/0/audio_4.mp4 duration 0
adaptive debug: SegmentTemplate #13 url=http://192.168.0.181:81/300/audio/0/$Time$.m4s duration 0
...



keep getting a similar message


vlc warning and error messages when duration 5


adaptive debug: Timeline
adaptive debug: Element #1 d=456457 r=0 @t=9501375
adaptive debug: Element #2 d=453453 r=0 @t=9957832
adaptive debug: Element #3 d=471472 r=0 @t=10411285
adaptive debug: Element #4 d=381381 r=0 @t=10882757
adaptive debug: Element #5 d=477478 r=0 @t=11264138
adaptive debug: Element #6 d=468468 r=0 @t=11741616
adaptive debug: Element #7 d=474475 r=0 @t=12210084
adaptive debug: Element #8 d=378378 r=0 @t=12684559
adaptive debug: Element #9 d=468468 r=0 @t=13062937
adaptive debug: Element #10 d=474475 r=0 @t=13531405
adaptive debug: Updated MPD, next update in 5s
adaptive debug: Retrieving http://192.168.0.181:81/300/audio/5/8101680.m4s @0
main error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 4794 ms)
main warning: buffer too late (-588333 us): dropped
main debug: ES_OUT_RESET_PCR called
main debug: Buffering 0%
main debug: Buffering 1%
main debug: Buffering 2%
main debug: Buffering 3%
...
main debug: Buffering 15%
main debug: Received first picture
main debug: Buffering 16%
...
main debug: Buffering 99%
main debug: Stream buffering done (4804 ms in 122 ms)
main debug: Decoder wait done in 0 ms
main debug: inserting 3246 zeroes
mmdevice debug: state changed: 0
wasapi debug: reset
main warning: playback too early (-85958): down-sampling
mmdevice debug: state changed: 1
adaptive debug: Retrieving http://192.168.0.181:81/300/video/0/8114825.m4s @0
adaptive debug: Retrieving http://192.168.0.181:81/300/300.mpd @0
main debug: creating access: http://192.168.0.181:81/300/300.mpd
main debug: (path: \\192.168.0.181:81\300\300.mpd)
main debug: looking for access module matching "http": 26 candidates
http debug: resolving 192.168.0.181 ...
http debug: outgoing request: GET /300/300.mpd HTTP/1.1 Host: 192.168.0.181:81 Accept: */* Accept-Language: en_US User-Agent: VLC/3.0.11 LibVLC/3.0.11 Range: bytes=0- 
http debug: incoming response: HTTP/1.1 206 Partial Content Server: nginx Date: Mon, 17 Aug 2020 09:18:28 GMT Content-Type: application/octet-stream Content-Length: 12632 Last-Modified: Mon, 17 Aug 2020 09:18:28 GMT Connection: keep-alive ETag: "5f3a4b64-3158" Content-Range: bytes 0-12631/12632 
main debug: using access module "access"
main debug: looking for stream_filter module matching "prefetch,cache_block": 24 candidates
prefetch debug: using 12632 bytes buffer, 12632 bytes read
main debug: using stream_filter module "prefetch"
main debug: looking for stream_filter module matching "any": 24 candidates
main debug: no stream_filter modules matched
main debug: looking for stream_filter module matching "inflate": 24 candidates
main debug: no stream_filter modules matched
prefetch debug: end of stream
main debug: removing module "prefetch"
main debug: removing module "access"
main debug: looking for xml reader module matching "any": 1 candidates
main debug: using xml reader module "xml"
adaptive debug: MPD profile=urn:mpeg:dash:profile:isoff-live:2011 mediaPresentationDuration=0 minBufferTime=2
adaptive debug: BaseUrl=http://192.168.0.181:81/300/
adaptive debug: Period
adaptive debug: BaseAdaptationSet 0
adaptive debug: Representation 0 [mp4a]
adaptive debug: InitSegmentTemplate #0 url=http://192.168.0.181:81/300/audio/0/audio_4.mp4 duration 0
adaptive debug: SegmentTemplate #12 url=http://192.168.0.181:81/300/audio/0/$Time$.m4s duration 0
...
adaptive debug: Timeline
adaptive debug: Element #1 d=453453 r=0 @t=9957832
adaptive debug: Element #2 d=471472 r=0 @t=10411285
adaptive debug: Element #3 d=381381 r=0 @t=10882757
adaptive debug: Element #4 d=477478 r=0 @t=11264138
adaptive debug: Element #5 d=468468 r=0 @t=11741616
adaptive debug: Element #6 d=474475 r=0 @t=12210084
adaptive debug: Element #7 d=378378 r=0 @t=12684559
adaptive debug: Element #8 d=468468 r=0 @t=13062937
adaptive debug: Element #9 d=474475 r=0 @t=13531405
adaptive debug: Element #10 d=459459 r=0 @t=14005880
adaptive debug: Updated MPD, next update in 5s
adaptive debug: Retrieving http://192.168.0.181:81/300/audio/5/8550960.m4s @0
main warning: picture is too late to be displayed (missing 383 ms)
main warning: picture is too late to be displayed (missing 317 ms)
main warning: picture is too late to be displayed (missing 251 ms)
main warning: picture is too late to be displayed (missing 184 ms)
main warning: picture is too late to be displayed (missing 117 ms)
adaptive debug: Retrieving http://192.168.0.181:81/300/300.mpd @0
main debug: creating access: http://192.168.0.181:81/300/300.mpd
main debug: (path: \\192.168.0.181:81\300\300.mpd)
main debug: looking for access module matching "http": 26 candidates
http debug: resolving 192.168.0.181 ...
http debug: outgoing request: GET /300/300.mpd HTTP/1.1 Host: 192.168.0.181:81 Accept: */* Accept-Language: en_US User-Agent: VLC/3.0.11 LibVLC/3.0.11 Range: bytes=0- 
http debug: incoming response: HTTP/1.1 206 Partial Content Server: nginx Date: Mon, 17 Aug 2020 09:18:33 GMT Content-Type: application/octet-stream Content-Length: 12596 Last-Modified: Mon, 17 Aug 2020 09:18:33 GMT Connection: keep-alive ETag: "5f3a4b69-3134" Content-Range: bytes 0-12595/12596 
main debug: using access module "access"
main debug: looking for stream_filter module matching "prefetch,cache_block": 24 candidates
prefetch debug: using 12596 bytes buffer, 12596 bytes read
main debug: using stream_filter module "prefetch"
main debug: looking for stream_filter module matching "any": 24 candidates
main debug: no stream_filter modules matched
main debug: looking for stream_filter module matching "inflate": 24 candidates
main debug: no stream_filter modules matched
prefetch debug: end of stream
main debug: removing module "prefetch"
main debug: removing module "access"
main debug: looking for xml reader module matching "any": 1 candidates
main debug: using xml reader module "xml"
adaptive debug: MPD profile=urn:mpeg:dash:profile:isoff-live:2011 mediaPresentationDuration=0 minBufferTime=2
adaptive debug: BaseUrl=http://192.168.0.181:81/300/
adaptive debug: Period
adaptive debug: BaseAdaptationSet 0
adaptive debug: Representation 0 [mp4a]
adaptive debug: InitSegmentTemplate #0 url=http://192.168.0.181:81/300/audio/0/audio_4.mp4 duration 0
adaptive debug: SegmentTemplate #13 url=http://192.168.0.181:81/300/audio/0/$Time$.m4s duration 0
...



keep getting a similar message


This is played on vlc. this is duration 10 sec. but I want to live streaming duration 5 under.
cuda, framerate, GOP size and bitrate are fixed.


I know that is inefficient. but now, I have to live stream channel multiview duration 5 under. How can I achieve ? please help me.


-
Using FFmpeg to stitch together H.264 videos and variably-spaced JPEG pictures ; dealing with ffmpeg warnings
19 octobre 2022, par LB2Context


I have a process flow that may output either H.264 Annex B streams, variably-spaced JPEGs, or a mixture of two. By variably-spaced I mean where elapsed time between any two adjacent JPEGs may (and likely to be) different from any other two adjacent JPEGs. So an example of possible inputs are :


- 

stream1.h264
{Set of JPEGs}
stream1.h264 + stream2.h264
stream1.h264 + {Set of JPEGs}
stream1.h264 + {Set of JPEGs} + stream2.h264
stream1.h264 + {Set of JPEGs} + stream2.h264 + {Set of JPEGs} + ...
stream1.h264 + stream2.h264 + {Set of JPEGs} + ...
















The output needs to be a single stitched (i.e. concatenated) output in MPEG-4 container.


Requirements : No re-encoding or transcoding of existing video compression (One time conversion of JPEG sets to video format is OKay).


Solution Prototype


To prototype the solution I have found that ffmpeg has
concat
demuxer that would let me specify an ordered sequence of inputs that ffmpeg would then concatenate together, but all inputs must be of the same format. So, to meet that requirement, I :

- 

- Convert every JPEG set to an .mp4 using concat (and using
delay #
directive to specify time-spacing between each JPEG) - Convert every .h264 to .mp4 using
-c copy
to avoid transcoding. - Stitch all generated interim .mp4 files into the single final .mp4 using
-f concat
and-c copy
.








Here's the bash script, in parts, that performs the above :


- 

-
Ignore the
curl
comment ; that's from originally generating a 100 jpeg images with numbers and these are simply saved locally. What the loop does is it generates concat input file withfile sequence#.jpeg
directives andduration #
directive where each successive JPEG delay is incremented by 0.1 seconds (0.1 between first and second, 0.2 b/w 2nd and 3rd, 0.3 b/w 3rd and 4th, and so on). Then it runsffmpeg
command to convert the set of JPEGs to .mp4 interim file.

echo "ffconcat version 1.0" >ffconcat-jpeg.txt
echo >>ffconcat-jpeg.txt

for i in {1..100}
do
 echo "file $i.jpeg" >>ffconcat-jpeg.txt
 d=$(echo "$i" | awk '{printf "%f", $1 / 10}')
 # d=$(echo "scale=2; $i/10" | bc)
 echo "duration $d" >>ffconcat-jpeg.txt
 echo "" >>ffconcat-jpeg.txt
 # curl -o "$i.jpeg" "https://math.tools/equation/get_equaimages?equation=$i&fontsize=256"
done

ffmpeg \
 -hide_banner \
 -vsync vfr \
 -f concat \
 -i ffconcat-jpeg.txt \
 -r 30 \
 -video_track_timescale 90000 \
 video-jpeg.mp4



-
Convert two streams from .h264 to .mp4 via copy (no transcoding).


ffmpeg \
 -hide_banner \
 -i low-motion-video.h264 \
 -c copy \
 -vsync vfr \
 -video_track_timescale 90000 \
 low-motion-video.mp4

ffmpeg \
 -hide_banner \
 -i full-video.h264 \
 -c copy \
 -video_track_timescale 90000 \
 -vsync vfr \
 full-video.mp4



-
Stitch all together by generating another concat directive file.


echo "ffconcat version 1.0" >ffconcat-h264.txt
echo >>ffconcat-h264.txt
echo "file low-motion-video.mp4" >>ffconcat-h264.txt
echo >>ffconcat-h264.txt
echo "file full-video.mp4" >>ffconcat-h264.txt
echo >>ffconcat-h264.txt
echo "file video-jpeg.mp4" >>ffconcat-h264.txt
echo >>ffconcat-h264.txt

ffmpeg \
 -hide_banner \
 -f concat \
 -i ffconcat-h264.txt \
 -pix_fmt yuv420p \
 -c copy \
 -video_track_timescale 90000 \
 -vsync vfr \
 video-out.mp4












Problem (and attempted troubleshooting)


The above does produce a reasonable output — it plays first video, then plays second video with no timing/rate issues AFAICT, then plays JPEGs with time between each JPEG "frame" growing successively, as expected.


But, the conversion process produces warnings that concern me (for compatibility with players ; or potentially other IRL streams that may result in some issue my prototyping content doesn't make obvious). Initial attempts generated 100s of warnings, but with some arguments added, I reduced it down to just a handful, but this handful is stubborn and nothing I tried would help.


The first conversion of JPEGs to .mp4 goes fine with the following output :


Input #0, concat, from 'ffconcat-jpeg.txt':
 Duration: 00:08:25.00, start: 0.000000, bitrate: 0 kb/s
 Stream #0:0: Video: png, pal8(pc), 176x341 [SAR 3780:3780 DAR 16:31], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x7fe418008e00] using SAR=1/1
[libx264 @ 0x7fe418008e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x7fe418008e00] profile High 4:4:4 Predictive, level 1.3, 4:4:4, 8-bit
[libx264 @ 0x7fe418008e00] 264 - core 163 r3060 5db6aa6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=11 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'video-jpeg.mp4':
 Metadata:
 encoder : Lavf58.76.100
 Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv444p(tv, progressive), 176x341 [SAR 1:1 DAR 16:31], q=2-31, 30 fps, 90k tbn
 Metadata:
 encoder : Lavc58.134.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 100 fps=0.0 q=-1.0 Lsize= 157kB time=00:07:55.33 bitrate= 2.7kbits/s speed=2.41e+03x 
video:155kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.800846%
[libx264 @ 0x7fe418008e00] frame I:1 Avg QP:20.88 size: 574
[libx264 @ 0x7fe418008e00] frame P:43 Avg QP:14.96 size: 2005
[libx264 @ 0x7fe418008e00] frame B:56 Avg QP:21.45 size: 1266
[libx264 @ 0x7fe418008e00] consecutive B-frames: 14.0% 24.0% 30.0% 32.0%
[libx264 @ 0x7fe418008e00] mb I I16..4: 36.4% 55.8% 7.9%
[libx264 @ 0x7fe418008e00] mb P I16..4: 5.1% 7.5% 11.2% P16..4: 5.6% 8.1% 4.5% 0.0% 0.0% skip:57.9%
[libx264 @ 0x7fe418008e00] mb B I16..4: 2.4% 0.9% 3.9% B16..8: 16.2% 8.8% 4.6% direct: 1.2% skip:62.0% L0:56.6% L1:38.7% BI: 4.7%
[libx264 @ 0x7fe418008e00] 8x8 transform intra:28.3% inter:3.7%
[libx264 @ 0x7fe418008e00] coded y,u,v intra: 26.5% 0.0% 0.0% inter: 9.8% 0.0% 0.0%
[libx264 @ 0x7fe418008e00] i16 v,h,dc,p: 82% 13% 4% 0%
[libx264 @ 0x7fe418008e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 8% 71% 1% 0% 0% 0% 0% 0%
[libx264 @ 0x7fe418008e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 41% 11% 29% 4% 2% 3% 1% 7% 1%
[libx264 @ 0x7fe418008e00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fe418008e00] ref P L0: 44.1% 4.2% 28.4% 23.3%
[libx264 @ 0x7fe418008e00] ref B L0: 56.2% 32.1% 11.6%
[libx264 @ 0x7fe418008e00] ref B L1: 92.4% 7.6%
[libx264 @ 0x7fe418008e00] kb/s:2.50



The conversion of individual streams from .h264 to .mp4 generates two types of warnings each. One is
[mp4 @ 0x7faee3040400] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
, and the other is[mp4 @ 0x7faee3040400] pts has no value
.

Some posts on SO (can't find my original finds on that now) suggested that it's safe to ignore and comes from H.264 being an elementary stream that supposedly doesn't contain timestamps. It surprises me a bit since I produce that stream using NVENC API and clearly supply timing information for each frame via
PIC_PARAMS
structure :NV_STRUCT(PIC_PARAMS, pp); ...; pp.inputTimeStamp = _frameIndex++ * (H264_CLOCK_RATE / _params.frameRate);
, where#define H264_CLOCK_RATE 9000
and_params.frameRate = 30
.

Input #0, h264, from 'low-motion-video.h264':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: h264 (High), yuv420p(progressive), 1440x3040 [SAR 1:1 DAR 9:19], 30 fps, 30 tbr, 1200k tbn, 60 tbc
Output #0, mp4, to 'low-motion-video.mp4':
 Metadata:
 encoder : Lavf58.76.100
 Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1440x3040 [SAR 1:1 DAR 9:19], q=2-31, 30 fps, 30 tbr, 90k tbn, 1200k tbc
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x7faee3040400] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 0x7faee3040400] pts has no value
[mp4 @ 0x7faee3040400] pts has no value0kB time=-00:00:00.03 bitrate=N/A speed=N/A 
 Last message repeated 17985 times
frame=17987 fps=0.0 q=-1.0 Lsize= 79332kB time=00:09:59.50 bitrate=1084.0kbits/s speed=1.59e+03x 
video:79250kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.103804%
Input #0, h264, from 'full-video.h264':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: h264 (High), yuv420p(progressive), 1440x3040 [SAR 1:1 DAR 9:19], 30 fps, 30 tbr, 1200k tbn, 60 tbc
Output #0, mp4, to 'full-video.mp4':
 Metadata:
 encoder : Lavf58.76.100
 Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1440x3040 [SAR 1:1 DAR 9:19], q=2-31, 30 fps, 30 tbr, 90k tbn, 1200k tbc
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x7f9381864600] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 0x7f9381864600] pts has no value
[mp4 @ 0x7f9381864600] pts has no value0kB time=-00:00:00.03 bitrate=N/A speed=N/A 
 Last message repeated 17981 times
frame=17983 fps=0.0 q=-1.0 Lsize= 52976kB time=00:09:59.36 bitrate= 724.1kbits/s speed=1.33e+03x 
video:52893kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.156232%



But the most worrisome error for me is from stitching together all interim .mp4 files into one :


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ff2010e00] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from 'ffconcat-h264.txt':
 Duration: N/A, bitrate: 1082 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1440x3040 [SAR 1:1 DAR 9:19], 1082 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
Output #0, mp4, to 'video-out.mp4':
 Metadata:
 encoder : Lavf58.76.100
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1440x3040 [SAR 1:1 DAR 9:19], q=2-31, 1082 kb/s, 30 fps, 30 tbr, 90k tbn, 90k tbc
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9fe1009c00] Auto-inserting h264_mp4toannexb bitstream filter
[mp4 @ 0x7f9ff2023400] Non-monotonous DTS in output stream 0:0; previous: 53954460, current: 53954460; changing to 53954461. This may result in incorrect timestamps in the output file.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9fd1008a00] Auto-inserting h264_mp4toannexb bitstream filter
[mp4 @ 0x7f9ff2023400] Non-monotonous DTS in output stream 0:0; previous: 107900521, current: 107874150; changing to 107900522. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7f9ff2023400] Non-monotonous DTS in output stream 0:0; previous: 107900522, current: 107886150; changing to 107900523. This may result in incorrect timestamps in the output file.
frame=36070 fps=0.0 q=-1.0 Lsize= 132464kB time=00:27:54.26 bitrate= 648.1kbits/s speed=6.54e+03x 
video:132296kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.126409%



I'm not sure how to deal with those non-monotonous DTS errors, and no matter what I try, nothing budges. I analyzed the interim .mp4 files using
ffprobe -show_frames
and found that the last frame of each interim .mp4 does not have DTS, while previous frames do. E.g. :

...
[FRAME]
media_type=video
stream_index=0
key_frame=0
pkt_pts=53942461
pkt_pts_time=599.360678
pkt_dts=53942461
pkt_dts_time=599.360678
best_effort_timestamp=53942461
best_effort_timestamp_time=599.360678
pkt_duration=3600
pkt_duration_time=0.040000
pkt_pos=54161377
pkt_size=1034
width=1440
height=3040
pix_fmt=yuv420p
sample_aspect_ratio=1:1
pict_type=B
coded_picture_number=17982
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=unknown
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
[/FRAME]
[FRAME]
media_type=video
stream_index=0
key_frame=0
pkt_pts=53927461
pkt_pts_time=599.194011
pkt_dts=N/A
pkt_dts_time=N/A
best_effort_timestamp=53927461
...



My guess is that as concat demuxer reads in (or elsewhere in ffmpeg's conversion pipeline), for the last frame it sees no DTS set, and produces a virtual value equal to the last seen. Then further in pipeline it consumes this input, sees that DTS value is being repeated, issues a warning and offsets it with increment by one, which might be somewhat nonsensical/unrealistic timing value.


I tried using
-fflags +genpts
as suggested in this SO answer, but that doesn't change anything.

Per yet other posts suggesting issue being with incompatible
tbn
andtbc
values and possible timebase issues, I tried adding-time_base 1:90000
and-enc_time_base 1:90000
and-copytb 1
and nothing budges. The-video_track_timescale 90000
is there b/c it helped reduce those DTS warnings from 100s down to 3, but doesn't eliminate them all.

Question


What is missing and how can I get ffmpeg to perform conversions without these warnings, to be sure it produces proper, well-formed output ?