
Recherche avancée
Autres articles (100)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)
Sur d’autres sites (7221)
-
ffmpeg fastest way to convert videos avi to mp4 [migrated]
5 novembre 2013, par user2938660I have server which has :
- 8x3,4 (sandy bridge cpu)
- 10gb ram
i tried different combinations to convert vvideos i mean avi to mp4 but it takes so long :
- 20mins= 200mbmaybe there is some ffmpeg command which does this much faster ?
EDIT WITH ULTRAFAST :
root@1tb:~/test# ffmpeg -i video.avi -c:v libx264 -preset ultrafast out.mp4
ffmpeg version git-2013-10-28-f1f0b01 Copyright (c) 2000-2013 the FFmpeg developers
built on Oct 29 2013 02:05:45 with gcc 4.4.5 (Debian 4.4.5-8)
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
libavutil 52. 48.100 / 52. 48.100
libavcodec 55. 39.100 / 55. 39.100
libavformat 55. 19.104 / 55. 19.104
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 90.100 / 3. 90.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Input #0, avi, from 'video.avi':
Duration: 00:29:00.28, start: 0.000000, bitrate: 1120 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 23.98 tbr, 23.98 tbn, 23.98 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s
Metadata:
title : Hello.Ladies.S01E06.HDTV.XviD-AFG_360p.audio
[libx264 @ 0x2e08e40] using SAR=1/1
[libx264 @ 0x2e08e40] using cpu capabilities: none!
[libx264 @ 0x2e08e40] profile Constrained Baseline, level 3.0
[libx264 @ 0x2e08e40] 264 - core 138 r2358 9e941d1 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=23 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to 'out.mp4':
Metadata:
encoder : Lavf55.19.104
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 10000k tbn, 23.98 tbc
Stream #0:1: Audio: aac (libfaac) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s
Metadata:
title : Hello.Ladies.S01E06.HDTV.XviD-AFG_360p.audio
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> libx264)
Stream #0:1 -> #0:1 (mp3 -> libfaac)
Press [q] to stop, [?] for help
frame=41726 fps=326 q=-1.0 Lsize= 312916kB time=00:29:00.32 bitrate=1473.0kbits/s dup=1 drop=0
video:284876kB audio:27186kB subtitle:0 global headers:0kB muxing overhead 0.273494%
[libx264 @ 0x2e08e40] frame I:167 Avg QP:18.69 size: 30492
[libx264 @ 0x2e08e40] frame P:41559 Avg QP:21.68 size: 6897
[libx264 @ 0x2e08e40] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x2e08e40] mb P I16..4: 6.3% 0.0% 0.0% P16..4: 51.2% 0.0% 0.0% 0.0% 0.0% skip:42.5%
[libx264 @ 0x2e08e40] coded y,uvDC,uvAC intra: 44.9% 54.5% 19.0% inter: 28.1% 20.3% 2.2%
[libx264 @ 0x2e08e40] i16 v,h,dc,p: 43% 23% 21% 13%
[libx264 @ 0x2e08e40] i8c dc,h,v,p: 36% 22% 32% 11%
[libx264 @ 0x2e08e40] kb/s:1340.96
root@1tb:~/test# qt-faststart out.mp4 labas1.mp4
ftyp 0 32
free 32 8
mdat 40 319552104
moov 319552144 873943
patching stco atom...
patching stco atom...
writing ftyp atom...
writing moov atom...
copying rest of file...
root@1tb:~/test# -
Why I became a HTML5 co-editor
15 août 2012, par silviaA few weeks ago, I had the honor to be appointed as part of the editorial team of the W3C HTML5 specification.
Since Ian Hickson had recently decided to focus solely on editing the WHATWG HTML living standard specification, the W3C started looking for other editors to take the existing HTML5 specification to REC level. REC level is what other standards organizations call a “ratified standard”.
But what does REC level really mean for HTML ?
In my probably somewhat subjective view, recommendation level means that a snapshot is taken of the continuously evolving HTML spec, which has a comprehensive feature set, that is implemented in a cross-browser interoperable way, has a complete test set for the features, and has received wide review. The latter implies that other groups in the W3C have had a chance to look at the specification and make sure it satisfies their basic requirements, which include e.g. applicability to all users (accessibility, internationalization), platforms, and devices (mobile, TV).
Basically it means that we stop for a “moment”, take a deep breath, polish the feature set that we’ve been working on this far, and make sure we all agree on it, before we get back to changing the world with cool new stuff. In a software project we would call it a release branch with feature freeze.
Now, as productive as that may sound for software – it’s not actually that exciting for a specification. Firstly, the most exciting things happen when writing new features. Secondly, development of browsers doesn’t just magically stop to get the release (REC) happening. And lastly, if we’ve done our specification work well, there should be only little work to do. Basically, it’s the unthankful work of tidying up that we’re looking at here.
So, why am I doing it ? I am not doing this for money – I’m currently part-time contracting to Google’s accessibility team working on video accessibility and this editor work is not covered by my contract. It wasn’t possible to reconcile polishing work on a specification with the goals of my contract, which include pushing new accessibility features forward. Therefore, when invited, I decided to offer my spare time to the W3C.
I’m giving this time under the condition that I’d only be looking at accessibility and video related sections. This is where my interest and expertise lie, and where I’m passionate to get things right. I want to make sure that we create accessibility features that will be implemented and that we polish existing video features. I want to make sure we don’t digress from implementations which continue to get updated and may follow the WHATWG spec or HTML.next or other needs.
I am not yet completely sure what the editorship will entail. Will we look at tests, too ? Will we get involved in HTML.next ? This far we’ve been preparing for our work by setting up adequate version control repositories, building a spec creation process, discussing how to bridge to the WHATWG commits, and analysing the long list of bugs to see how to cope with them. There’s plenty of actual text editing work ahead and the team is shaping up well ! I look forward to the new experiences.
-
Unable to retrieve video stream from RTSP URL inside Docker container
6 février, par birdalugurI have a FastAPI application running inside a Docker container that is trying to stream video from an RTSP camera URL using OpenCV. The setup works fine locally, but when running inside Docker, the
/video
endpoint does not return a stream and times out. Below are the details of the issue.

Docker Setup :


Dockerfile :


FROM python:3.10.12

RUN apt-get update && apt-get install -y \
 libgl1-mesa-glx \
 libglib2.0-0

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

CMD ["python", "app.py"]




- 

- Docker Compose :




services:
 api:
 build: ./api
 ports:
 - "8000:8000"
 depends_on:
 - redis
 - mongo
 networks:
 - app_network
 volumes:
 - ./api:/app
 environment:
 - REDIS_HOST=redis
 - REDIS_PORT=6379
 - MONGO_URI=mongodb://mongo:27017/app_db

 frontend:
 build: ./frontend
 ports:
 - "3000:3000"
 depends_on:
 - api
 networks:
 - app_network
 volumes:
 - ./frontend:/app
 - /app/node_modules

redis:
 image: "redis:alpine"
 restart: always
 networks:
 - app_network
 volumes:
 - redis_data:/data

 mongo:
 image: "mongo:latest"
 restart: always
 networks:
 - app_network
 volumes:
 - mongo_data:/data/db

networks:
 app_network:
 driver: bridge

volumes:
 redis_data:
 mongo_data:




Issue :


When I try to access the
/video
endpoint, the following warnings appear :

[ WARN:0@46.518] global cap_ffmpeg_impl.hpp:453 _opencv_ffmpeg_interrupt_callback Stream timeout triggered after 30037.268665 ms



However, locally, the RTSP stream works fine using OpenCV with the same code.


Additional Information :


- 

- Network : The Docker container can successfully ping the camera IP (
10.100.10.94
). - Local Video : I can read frames from a local video file without issues.
- RTSP Stream : I am able to access the RTSP stream directly using OpenCV locally, but not inside the Docker container.








Code :


Here's the relevant part of the code in my
api/app.py
:

import cv2
from fastapi import FastAPI
from fastapi.responses import StreamingResponse

RTSP_URL = "rtsp://deneme:155115@10.100.10.94:554/axis-media/media.amp?adjustablelivestream=1&fps=10"

def generate_frames():
 cap = cv2.VideoCapture(RTSP_URL)
 if not cap.isOpened():
 print("Failed to connect to RTSP stream.")
 return

 while True:
 success, frame = cap.read()
 if not success:
 print("Failed to capture frame.")
 break

 _, buffer = cv2.imencode(".jpg", frame)
 frame_bytes = buffer.tobytes()

 yield (
 b"--frame\r\n" b"Content-Type: image/jpeg\r\n\r\n" + frame_bytes + b"\r\n"
 )

 cap.release()

@app.get("/video")
async def video_feed():
 """Return MJPEG stream to the browser."""
 return StreamingResponse(
 generate_frames(), media_type="multipart/x-mixed-replace; boundary=frame"
 )



Has anyone faced similar issues or have suggestions on how to resolve this ?