
Recherche avancée
Autres articles (64)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
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 -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.
Sur d’autres sites (6075)
-
avconv on debian jessie throws error when trying to convert raw video to mp4
20 août 2017, par Vinay DivakarI am trying to convert a raw video captured using a Logitech USB Cam(YUYV) to mp4 using avconv. I have tried the below to do so :
avconv -i out.raw -c copy output.mp4
avconv -i out.raw -vcodec copy -acodec copy output.mp4but I get an error as shown below.
root@beaglebone:~/BBB_CV/boneCV# avconv -i out.raw -c copy output.mp4
avconv version 11.9-6:11.9-1~deb8u1, Copyright (c) 2000-2017 the Libav developersbuilt on Apr 23 2017 23:00:54 with gcc 4.9.2 (Debian 4.9.2-10)
out.raw: Invalid data found when processing inputI have checked here, but did not find any relevant examples for the above purpose.
Edit : Added more details—
I tried doing the below by adding the infile options as suggested :
root@beaglebone:~/BBB_CV/boneCV# avconv -s 640x480 -framerate 30 -pix_fmt yuyv422 -f rawvideo -i out.raw -c copy output.mp4
This got me rid of the previous error and some new ones popped up as shown below.
root@beaglebone:~/BBB_CV/boneCV# avconv -s 640x480 -framerate 30 -pix_fmt yuyv422 -f rawvideo -i out.raw -c copy output.mp4
avconv version 11.9-6:11.9-1~deb8u1, Copyright (c) 2000-2017 the Libav
developers built on Apr 23 2017 23:00:54 with gcc 4.9.2 (Debian 4.9.2-10)
[rawvideo @ 0x17e21c0] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'out.raw':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0.0: Video: rawvideo, yuyv422, 640x480, 30 tbn
[mp4 @ 0x17eb840] Codec for stream 0 does not use global headers but
container format requires global headers
[mp4 @ 0x17eb840] track 0: could not find tag, codec not currently
supported in container
Output #0, mp4, to 'output.mp4':
Metadata:
encoder : Lavf56.1.0
Stream #0.0: Video: rawvideo, yuyv422, 640x480, q=2-31, 30 tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Could not write header for output file #0 (incorrect codec parameters ?):
Operation not permittedThe output.mp4 is being generated but when tried to open it throws an error.
Edit : I ran a "sudo apt-get install libav-tools" an then tried. This is what I got.
root@beaglebone:~/BBB_CV/boneCV# avconv -s 640x480 -framerate 30 -pix_fmt
yuyv422 -f rawvideo -i out.raw -c copy output.mp4
ffmpeg version 2.6.9 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Debian 4.9.2-10)
configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-
strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro'
-cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-
nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-
libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-
libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-
libvpx --enable-libschroedinger --disable-encoder=libschroedinger --
enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter -
enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-
libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/arm-linux-gnueabihf -
-disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-
frei0r --enable-openssl --enable-libass --enable-libopus --enable-
fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --
disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample
--disable-htmlpages --disable-podpages --enable-libutvideo --enable-
libfdk-aac --enable-libx265 --enable-libiec61883 --enable-libdc1394 --
disable-altivec --shlibdir=/usr/lib/arm-linux-gnueabihf
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[rawvideo @ 0x18465e0] Estimating duration from bitrate, this may be
inaccurate
Input #0, rawvideo, from 'out.raw':
Duration: 00:00:00.10, start: 0.000000, bitrate: 146626 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456
kb/s, 30 tbr, 30 tbn, 30 tbc
[mp4 @ 0x184f790] Could not find tag for codec rawvideo in stream #0,
codec not currently supported in container
Output #0, mp4, to 'output.mp4':
Metadata:
encoder : Lavf56.25.101
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, q=2-
31, 147456 kb/s, 30 tbr, 30 tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Could not write header for output file #0 (incorrect codec parameters ?):
Invalid argumentI ran "ffmpeg -s 640x480 -framerate 30 -pix_fmt yuv420p -f rawvideo -i out.raw output.mp4" and below is what I got.
root@beaglebone:~/BBB_CV/boneCV# ffmpeg -s 640x480 -framerate 30 -pix_fmt yuv420p -f rawvideo -i out.raw output.mp4
ffmpeg version 2.6.9 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Debian 4.9.2-10)
configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/arm-linux-gnueabihf --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample --disable-htmlpages --disable-podpages --enable-libutvideo --enable-libfdk-aac --enable-libx265 --enable-libiec61883 --enable-libdc1394 --disable-altivec --shlibdir=/usr/lib/arm-linux-gnueabihf
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[rawvideo @ 0x1d55e0] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'out.raw':
Duration: 00:00:00.13, start: 0.000000, bitrate: 109969 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 110592 kb/s, 30 tbr, 30 tbn, 30 tbc
[libx264 @ 0x1df6c0] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x1df6c0] profile High, level 3.0
[libx264 @ 0x1df6c0] 264 - core 146 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - 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=-2 threads=1 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 'output.mp4':
Metadata:
encoder : Lavf56.25.101
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x480, q=-1--1, 30 fps, 15360 tbn, 30 tbc
Metadata:
encoder : Lavc56.26.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[rawvideo @ 0x1de3a0] Invalid buffer size, packet size 450428 < expected frame_size 460800
Error while decoding stream #0:0: Invalid argument
frame= 3 fps=1.7 q=29.0 Lsize= 263kB time=00:00:00.03 bitrate=64692.6kbits/s
video:262kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.318205%
[libx264 @ 0x1df6c0] frame I:1 Avg QP:33.09 size:100676
[libx264 @ 0x1df6c0] frame P:2 Avg QP:32.99 size: 83672
[libx264 @ 0x1df6c0] mb I I16..4: 0.0% 95.4% 4.6%
[libx264 @ 0x1df6c0] mb P I16..4: 0.0% 45.7% 3.0% P16..4: 35.9% 10.7% 4.8% 0.0% 0.0% skip: 0.0%
[libx264 @ 0x1df6c0] 8x8 transform intra:94.6% inter:86.1%
[libx264 @ 0x1df6c0] coded y,uvDC,uvAC intra: 100.0% 100.0% 100.0% inter: 53.6% 100.0% 100.0%
[libx264 @ 0x1df6c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 56% 12% 24% 2% 0% 1% 1% 2% 3%
[libx264 @ 0x1df6c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 82% 11% 4% 0% 0% 0% 1% 0% 1%
[libx264 @ 0x1df6c0] i8c dc,h,v,p: 48% 30% 14% 7%
[libx264 @ 0x1df6c0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x1df6c0] ref P L0: 83.5% 7.9% 8.6%
[libx264 @ 0x1df6c0] kb/s:21441.60 -
How to obtain time markers for video splitting using python/OpenCV
30 mars 2016, par Bleddyn Raw-ReesHi I’m new to the world of programming and computer vision so please bare with me.
I’m working on my MSc project which is researching automated deletion of low value content in digital file stores. I’m specifically looking at the sort of long shots that often occur in natural history filming whereby a static camera is left rolling in order to capture the rare snow leopard or whatever. These shots may only have some 60s of useful content with perhaps several hours of worthless content either side.
As a first step I have a simple motion detection program from Adrian Rosebrock’s tutorial [http://www.pyimagesearch.com/2015/05/25/basic-motion-detection-and-tracking-with-python-and-opencv/#comment-393376]. Next I intend to use FFMPEG to split the video.
What I would like help with is how to get in and out points based on the first and last points that motion is detected in the video.
Here is the code should you wish to see it...
# import the necessary packages
import argparse
import datetime
import imutils
import time
import cv2
# construct the argument parser and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-v", "--video", help="path to the video file")
ap.add_argument("-a", "--min-area", type=int, default=500, help="minimum area size")
args = vars(ap.parse_args())
# if the video argument is None, then we are reading from webcam
if args.get("video", None) is None:
camera = cv2.VideoCapture(0)
time.sleep(0.25)
# otherwise, we are reading from a video file
else:
camera = cv2.VideoCapture(args["video"])
# initialize the first frame in the video stream
firstFrame = None
# loop over the frames of the video
while True:
# grab the current frame and initialize the occupied/unoccupied
# text
(grabbed, frame) = camera.read()
text = "Unoccupied"
# if the frame could not be grabbed, then we have reached the end
# of the video
if not grabbed:
break
# resize the frame, convert it to grayscale, and blur it
frame = imutils.resize(frame, width=500)
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
gray = cv2.GaussianBlur(gray, (21, 21), 0)
# if the first frame is None, initialize it
if firstFrame is None:
firstFrame = gray
continue
# compute the absolute difference between the current frame and
# first frame
frameDelta = cv2.absdiff(firstFrame, gray)
thresh = cv2.threshold(frameDelta, 25, 255, cv2.THRESH_BINARY)[1]
# dilate the thresholded image to fill in holes, then find contours
# on thresholded image
thresh = cv2.dilate(thresh, None, iterations=2)
(_, cnts, _) = cv2.findContours(thresh.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
# loop over the contours
for c in cnts:
# if the contour is too small, ignore it
if cv2.contourArea(c) < args["min_area"]:
continue
# compute the bounding box for the contour, draw it on the frame,
# and update the text
(x, y, w, h) = cv2.boundingRect(c)
cv2.rectangle(frame, (x, y), (x + w, y + h), (0, 255, 0), 2)
text = "Occupied"
# draw the text and timestamp on the frame
cv2.putText(frame, "Room Status: {}".format(text), (10, 20),
cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 0, 255), 2)
cv2.putText(frame, datetime.datetime.now().strftime("%A %d %B %Y %I:%M:%S%p"),
(10, frame.shape[0] - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.35, (0, 0, 255), 1)
# show the frame and record if the user presses a key
cv2.imshow("Security Feed", frame)
cv2.imshow("Thresh", thresh)
cv2.imshow("Frame Delta", frameDelta)
key = cv2.waitKey(1) & 0xFF
# if the `q` key is pressed, break from the lop
if key == ord("q"):
break
# cleanup the camera and close any open windows
camera.release()
cv2.destroyAllWindows()Thanks !
-
On2 VP7 decoder
1er avril 2014, par Peter RossOn2 VP7 decoder
Further performance improvements and security fixes by
Vittorio Giovara, Luca Barbato and Diego Biurrun.Signed-off-by : Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by : Luca Barbato <lu_zero@gentoo.org>
Signed-off-by : Diego Biurrun <diego@biurrun.de>- [DH] Changelog
- [DH] configure
- [DH] doc/general.texi
- [DH] libavcodec/Makefile
- [DH] libavcodec/allcodecs.c
- [DH] libavcodec/arm/Makefile
- [DH] libavcodec/arm/h264pred_init_arm.c
- [DH] libavcodec/arm/vp8dsp.h
- [DH] libavcodec/arm/vp8dsp_init_arm.c
- [DH] libavcodec/arm/vp8dsp_init_armv6.c
- [DH] libavcodec/arm/vp8dsp_init_neon.c
- [DH] libavcodec/avcodec.h
- [DH] libavcodec/codec_desc.c
- [DH] libavcodec/h264pred.c
- [DH] libavcodec/h264pred.h
- [DH] libavcodec/ppc/Makefile
- [DH] libavcodec/ppc/vp8dsp_altivec.c
- [DH] libavcodec/version.h
- [DH] libavcodec/vp8.c
- [DH] libavcodec/vp8.h
- [DH] libavcodec/vp8data.h
- [DH] libavcodec/vp8dsp.c
- [DH] libavcodec/vp8dsp.h
- [DH] libavcodec/x86/Makefile
- [DH] libavcodec/x86/h264_intrapred_init.c
- [DH] libavcodec/x86/vp8dsp_init.c
- [DH] libavformat/riff.c