9 changed files with 138 additions and 78 deletions
@ -1,48 +1,22 @@
|
||||
FROM registry.sindominio.net/debian as builder |
||||
FROM registry.sindominio.net/debian |
||||
|
||||
RUN apt-get update && apt-get install -y nginx libnginx-mod-rtmp |
||||
RUN apt-get update && apt-get install -y nginx libnginx-mod-rtmp && apt get clean |
||||
|
||||
COPY mirar-release-key.asc /key.asc |
||||
RUN rm -rf /var/www/html/* |
||||
|
||||
# config nginx with rtmp app points |
||||
COPY nginx.conf /etc/nginx/ |
||||
|
||||
RUN mkdir -P /var/www/mirar.sindominio.net/hls |
||||
|
||||
RUN nginx -t |
||||
RUN nginx -s reload |
||||
|
||||
WORKDIR /tmp/ |
||||
|
||||
# get video.min.js and video-js.min.css |
||||
RUN wget https://github.com/videojs/video.js/releases/download/v7.10.2/video-js-7.10.2.zip |
||||
RUN unzip video-js-7.10.2.zip -d video-js-7.10.2 |
||||
RUN cp video-js-7.10.2/video-js.min.css video-js-7.10.2/video.min.js /var/www/mirar.sindominio.net/ |
||||
|
||||
WORKDIR /tmp/ |
||||
COPY nginx.conf /tmp/ |
||||
RUN cat /tmp/nginx-rtmp.conf >> /etc/nginx/nginx.conf |
||||
|
||||
#get jquery |
||||
RUN wget https://code.jquery.com/jquery-3.5.1.slim.min.js |
||||
RUN cp /tmp/jquery-3.5.1.slim.min.js /var/www/html/live.example.com/jquery-slim.min.js |
||||
|
||||
--- |
||||
# App |
||||
FROM registry.sindominio.net/debian |
||||
|
||||
RUN apt-get update && apt-get install -y nginx && apt-get clean |
||||
|
||||
COPY --from=builder /src/webapp /app |
||||
|
||||
# set up nginx configuration |
||||
RUN sed -i '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types && \ |
||||
sed -i 's/80/8888/g' /etc/nginx/sites-enabled/default && \ |
||||
sed -i 's/_log \/var\/.*;/_log \/dev\/stdout;/g' /etc/nginx/nginx.conf && \ |
||||
touch /var/log/nginx/error.log && chmod 666 /var/log/nginx/error.log && \ |
||||
chmod 777 /var/lib/nginx && \ |
||||
chmod 777 /run |
||||
RUN mkdir -P /var/www/html/hls && \ |
||||
chmod 777 /var/www/html/hls |
||||
|
||||
RUN rm -rf /var/www/html \ |
||||
&& ln -s /app /var/www/html |
||||
# poner el index.html css y js |
||||
COPY index.html /var/www/html/ |
||||
|
||||
ENTRYPOINT ["/usr/sbin/nginx"] |
||||
CMD ["-g", "daemon off;"] |
||||
RUN mkdir -P /var/www/assets/ |
||||
COPY assets/styles-mirar.css /var/www/html/assets/ |
||||
COPY assets/video-js-7.10.2.min.css /var/www/html/assets/video-js.min.css |
||||
COPY assets/video-js-7.10.2.min.js /var/www/html/assets/video-js.min.js |
||||
COPY assets/jquery-3.5.1.slim.min.js /var/www/html/assets/jquery-slim.min.js |
||||
|
@ -1,25 +1,25 @@
|
||||
# howto create a live stream |
||||
# crear el stream de directos |
||||
|
||||
Seguimos los pasos documentados en la trastienda |
||||
https://sindominio.net/trastienda/tecnica/servicios/streamingdirecto/ |
||||
|
||||
include index.html,video-js.css, video.js and jquery-slim.min.js and you are done. |
||||
Incluir index.html,video-js.css, video.js and jquery-slim.min.js y ya lo tienes. |
||||
|
||||
# howto add support on jitsi to stream |
||||
# Como hacer que jitsi haga stream en sintoniza |
||||
|
||||
### solucion 1: hackeando jitsi |
||||
## solucion 1: hackeando jitsi |
||||
estable y funciona desde hace un tiempo según su autor: |
||||
https://github.com/jitsi/jitsi-meet/issues/2829#issuecomment-509712706 |
||||
|
||||
### solución 2: con un script ffmpeg |
||||
## solución 2: con un script ffmpeg |
||||
solucion no intusiva con jitis y permite striming de cualquier fuents. |
||||
|
||||
https://community.jitsi.org/t/how-do-i-change-youtube-live-stream-to-another-rtmp-server-url/24817/7?u=lodopidolo |
||||
|
||||
### solución 3: simulcast a cualquier otra págia |
||||
## solución 3: simulcast a cualquier otra págia |
||||
|
||||
permite enviar simultáneamente a muchos streamers |
||||
https://community.jitsi.org/t/stream-to-any-or-multiple-rtmp-destinations-record-simultaneously/51943 |
||||
|
||||
### solución 4: rtmp nginix video por exo/guifipedro |
||||
## solución 4: rtmp nginix video por exo/guifipedro |
||||
https://gitlab.com/guifi-exo/wiki/-/blob/master/howto/rtmp_streamer.md |
||||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,23 @@
|
||||
/*only for video-js and live streaming*/ |
||||
@media screen { |
||||
.contain{ |
||||
width:100vw; |
||||
padding: 1rem; |
||||
} |
||||
.live-streaming .video-js, .live-streaming .video-dimensions { |
||||
width: calc(30vw * 3); |
||||
height: calc(15vw * 3); |
||||
} |
||||
} |
||||
@media screen and (min-width:768px) { |
||||
.contain{ |
||||
max-width:970px; |
||||
} |
||||
.live-streaming .video-js, .live-streaming .video-dimensions { |
||||
width: calc(30vw * 2); |
||||
max-width:970px; |
||||
height: calc(15vw * 2); |
||||
max-height:calc(970px / 2); |
||||
} |
||||
} |
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,20 @@
|
||||
rtmp { |
||||
# abre nginx para escuchar por el puerto |
||||
server { |
||||
listen 1935; |
||||
chunk_size 4096; |
||||
# dale un nombre a tu aplicacion |
||||
application entrada { |
||||
live on; |
||||
# enciende HLS |
||||
hls on; |
||||
hls_path /var/www/html/canal/; |
||||
# ajustes de hls |
||||
hls_fragment 3; |
||||
hls_playlist_length 60; |
||||
# para bloquear el directo |
||||
# quita el comentario de la línea siguiente |
||||
# deny play all; |
||||
} |
||||
} |
||||
} |
@ -1,21 +1,35 @@
|
||||
rtmp { |
||||
access_log /var/log/nginx/rtmp-access.log; |
||||
# abre nginx para escuchar por el puerto |
||||
server { |
||||
listen 1935; |
||||
chunk_size 4096; |
||||
# dale un nombre a tu aplicacion |
||||
application entrada { |
||||
live on; |
||||
# enciende HLS |
||||
hls on; |
||||
hls_path /var/www/mirar.sindominio.net/hls/; |
||||
# ajustes de hls |
||||
hls_fragment 3; |
||||
hls_playlist_length 60; |
||||
# para bloquear el directo a VLC o web |
||||
# quita el comentario de la línea siguiente |
||||
# deny play all; |
||||
} |
||||
} |
||||
server { |
||||
listen 8080 default_server; |
||||
|
||||
root /var/www/html/; |
||||
|
||||
index index.html; |
||||
|
||||
server_name _; |
||||
|
||||
location / { |
||||
try_files $uri $uri/ =404; |
||||
} |
||||
location /canal { |
||||
# Disable cache |
||||
add_header Cache-Control no-cache; |
||||
|
||||
# CORS setup |
||||
add_header 'Access-Control-Allow-Origin' '*' always; |
||||
add_header 'Access-Control-Expose-Headers' 'Content-Length'; |
||||
|
||||
# allow CORS preflight requests |
||||
if ($request_method = 'OPTIONS') { |
||||
add_header 'Access-Control-Allow-Origin' '*'; |
||||
add_header 'Access-Control-Max-Age' 1728000; |
||||
add_header 'Content-Type' 'text/plain charset=UTF-8'; |
||||
add_header 'Content-Length' 0; |
||||
return 204; |
||||
} |
||||
|
||||
types { |
||||
application/vnd.apple.mpegurl m3u8; |
||||
video/mp2t ts; |
||||
} |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue