what is the codec for mp4 videos in python OpenCV


Question fourcc = cv2.cv.CV_FOURCC(*'XVID') The above line is used for avi video. In the same fashion, which codec do we use for mp4 videos in Ubuntu? Answer You can also use mp4v fourcc = cv2.VideoWriter_fourcc(*'mp4v') where the videowriter should look like this: out = cv2.VideoWriter('output.mp4',fourcc, 15, size) But there are more codecs available for mp4. You can see the list of them by setting fourcc = -1, it will show a list like this:…
Read more ⟶

How to allow permission to access CSV file using postgres in Ubuntu


Question I am using the following command : copy (select so.name, so.date_order, sol.name, sol.product_Id, sol.product_uom_qty , ai.number, ai.date_invoice , so.amount_total , so.amount_tax from sale_order so , sale_order_line sol , account_invoice ai where so.id = sol.order_id and so.name = ai.origin and ai.state='open') to ‘/home/ekodev/Documents/test1.csv’ delimiter ‘,’ csv header; However, it gives the following error : ********** Error ********** ERROR: must be superuser to COPY to or from a file SQL state: 42501 Hint: Anyone can COPY to stdout or from stdin.…
Read more ⟶

How to install git on a docker ubuntu image?


Question I have a simple docker file of FROM ubuntu:18.04 COPY . /usr/src/app/ COPY docker_files/.bash_aliases /root/ $ docker build -t dock . Sending build context to Docker daemon 146.9kB Step 1/3 : FROM ubuntu:18.04 —> 94e814e2efa8 Step 2/3 : COPY . /usr/src/app/ —> bf79eb6c42c1 Step 3/3 : COPY docker_files/.bash_aliases /root/ —> aedc97d5ee8b Successfully built aedc97d5ee8b Successfully tagged dock:latest I can use it: $ docker run -it dock bash: git: command not found root@6a6bec871690:/# ls usr/src/app/ Dockerfile Gemfile Gemfile.…
Read more ⟶

Where is Ubuntu storing installed programs?


Question I am using Ubuntu and when I click on a program to download Firefox asks me "What should firefox do with this file?" And in the "Open with" I would like to find a program "Package installer". The problem is - I don't know where to look for. Where is the program stored (I installed it using Ubuntu Software Center) Answer They are usually stored in the following folders:…
Read more ⟶

apache2 on ubuntu - php files downloading


Question On my new Ubuntu system, I've managed to get Apache2 up and running for developing my ZendFramework Web Applications... I've got my available-sites config working correctly because I am able to request localhost and it servers up the correct index.html from my specified directory. Problem : if I request index.php, firefox attempts to download the file instead of running the script. Any Ideas why this would happen? I've added the following to httpd.…
Read more ⟶

Can you recommend a free light-weight MySQL GUI for Linux? [closed]


Question Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. </div> Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it. Closed 10 years ago. Improve this question I'm setting up my first development Linux box - a netbook actually.…
Read more ⟶

Auto yes to the License Agreement on sudo apt-get -y install oracle-java7-installer [closed]


Question Closed. This question is not about programming or software development. It is not currently accepting answers. </div> This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered. Closed 3 months ago.…
Read more ⟶