Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Avconv file not saved while recording video stream
14 novembre 2013, par narutov6I'm trying to record a video from an external RCA camera and a usb webcam.
/dev/video0 -> logitech webcam
/dev/video1 -> external camera plugged in through a RCA-to-Usb adapter.
when I use the following avconv command using the video from the webcam
avconv -f video4linux2 -r 24 -s 640x480 -i /dev/video0 video.avi
or using the external camera
avconv -f video4linux2 -s 720x480 -i /dev/video1 video.avi
the program starts correctly without errors. Then I press Ctrl+C to stop recording. But there is no video.avi file in the current directory.
Do you have any advice?
Note: I'm able to visualize the video stream coming from both the webcam and the external camera with vlc using:
vlc v4l2:///dev/video1 and vlc v4l2:///dev/video0
-
ffmpeg : playing udp stream
14 novembre 2013, par deimusI'm playing udp stream on iDevice using ffmpeg. It does play the video and audio successfully.
The only issue I've got here that the following function call does take a long time
avformat_find_stream_info
It takes about 10 secs to complete the execution of this function. The media that I'm playing has following properties :
MPEG-4 VIDEO v3 (DIV3) RESOLUTION : 640x480 Frame rate : 25
Any ideas how to workaround this delay ?
-
Why low qmax value improve video quality ?
14 novembre 2013, par theateistMaybe my questions doesn't make sense due to not understanding but please explain me what I miss because I did read posts and wiki and still it's not clear to me.
As I understand setting low value for qmax will improve the quality by increasing the bitrate. Maybe I didn't understood something but isn't lowing the Q(quantization) will decrease the quantization levels and thus the bitrate which means degradation in quality? Or in ffmpeg lowing Q means increasing the quantization levels? If the last is true so it make sense that lower qmax improves the quality.
If the above is true, so increasing qmax will decrease the quantization levels which means less bits for coding a quantization level. So, if number of bits for a level is lower, so total bits per frame will be lower, so how the encoder manage to get to the desired bitrate?
-
OpenCV libopencv_core.so.2.4.1 File Not Found
14 novembre 2013, par benrules2I am trying to setup OpenCV v2.4.1 with FFMPEG v0.11 support on Scientific Linux SL release 5.0 (Boron), and I am running into a problem with a missing file that seems completely undocumented. The error I am getting is as follows:
-- Install configuration: "Release" -- Up-to-date: /home/s18/s1138832/OpenCV/include/opencv/cv.h -- Up-to-date: /home/s18/s1138832/OpenCV/include/opencv/cxmisc.h -- Up-to-date: /home/s18/s1138832/OpenCV/include/opencv/cvwimage.h -- Up-to-date: /home/s18/s1138832/OpenCV/include/opencv2/opencv.hpp CMake Error at modules/core/cmake_install.cmake:63 (FILE): file INSTALL cannot find file "/home/s18/s1138832/OpenCV/lib/libopencv_core.so.2.4.1" to install. Call Stack (most recent call first): modules/cmake_install.cmake:57 (INCLUDE) cmake_install.cmake:56 (INCLUDE)
I honestly don't know where to begin troubleshooting this at this point. I successfully installed without ffmpeg a few days ago, but now I can't even install with ffmpeg support set to off.
The files that link to the missing library are:
lrwxrwxrwx 1 s1138832 s18 21 Jun 17 18:26 libopencv_core.so -> libopencv_core.so.2.4 lrwxrwxrwx 1 s1138832 s18 23 Jun 17 18:26 libopencv_core.so.2.4 -> libopencv_core.so.2.4.1
Any advice or prods in the right direction would be much appreciated. I would also be happy to provide more info on whatever interesting details I may have omitted.
UPDATES: This website seems to have the same error, but I can't read it and translations patchy - http://www.opencv.org.cn/forum/viewtopic.php?f=1&t=15664 ( http://translate.google.com/translate?sl=auto&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fwww.opencv.org.cn%2Fforum%2Fviewtopic.php%3Ff%3D1%26t%3D15664&act=url )
libopencv_core.so.2.4.1 exists after "make", but "make install" deletes it somehow. I copied it and added it again, but it didn't change anything
-
Opening file with unknown extension (Mjpeg ?) in OpenCV python
14 novembre 2013, par bw4szI am trying to open a third party video file into OpenCV with python. My camera (plotwatcher camera trap) shoots in a silly proprietary format. The extension is unique (.tlv) but i can play the file in VLC, and using ffmpeg i can see the following encoding:
C:\Users\Ben>ffmpeg -i C:/Users/Ben/Documents/OpenCV_HummingbirdsMotion/PlotwatcherTest.tlv ffmpeg version N-58037-g355cea8 Copyright (c) 2000-2013 the FFmpeg developers built on Nov 11 2013 18:01:42 with gcc 4.8.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aa cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavp ack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib libavutil 52. 52.100 / 52. 52.100 libavcodec 55. 41.100 / 55. 41.100 libavformat 55. 21.100 / 55. 21.100 libavdevice 55. 5.100 / 55. 5.100 libavfilter 3. 90.102 / 3. 90.102 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 'C:/Users/Ben/Documents/OpenCV_HummingbirdsMotion/Plotwatche rTest.tlv': Duration: 00:00:05.00, start: 0.000000, bitrate: 14608 kb/s Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj420p(pc), 1280x720, 10 tb r, 10 tbn, 10 tbc
From this i can see file is encoded into mjpeg format.
How can i open this file in open cv?
import cv2 #import cv2.cv as cv import numpy as np cap = cv2.VideoCapture("C:/Users/Ben/Documents/OpenCV_HummingbirdsMotion/PlotwatcherTest.mjpg") ret, frame = cap.read() #show first image cv2.imshow('my window',frame) cv2.waitKey(0) cv2.destroyWindow('my window')
I can see nothing has been loaded. When i try to view the first frame i get the error:
File "C:\Users\Ben\Documents\OpenCV_HummingbirdsMotion\Test.py", line 21, in
cv2.imshow('my window',frame) error: ..\..\..\..\opencv\modules\highgui\src\window.cpp:261: error: (-215) size.width>0 && size.height>0 I've tried leaving the native .tlv, mjpeg and mjpg, and .MJPG endings following the conceptual idea found here: MJPEG stream fails to open in OpenCV 2.4
i appreciate all help!