#StackBounty: #kernel #video #webcam #20.10 Integrated Webcam gets detected but not working on Ubuntu 20.10

Bounty: 50

So after the update to Ubuntu 20.10 from 18.04.2 LTS, My webcam stopped working. When I try cheese or uvcvideo it opens for a few times with flickering and goes blank. Now, this issues goes way back to 2011 and keeps popping up intermittently with kernel updates. I went through all the suggestions and questions marked solved pertaining to this issue but notwithstanding the solution to my problem. opening the similar question here is last hail mary attempt to address my problem. Please advice.

dmesg | grep uvc

[ 2997.130632] uvcvideo: Failed to resubmit video URB (-19).
[ 2997.134635] uvcvideo: Failed to resubmit video URB (-19).
[ 2997.138636] uvcvideo: Failed to resubmit video URB (-19).
[ 2997.142634] uvcvideo: Failed to resubmit video URB (-19).
[ 2997.146635] uvcvideo: Failed to resubmit video URB (-19).```


Get this bounty!!!

#StackBounty: #javascript #video #video-streaming #html5-video #ipfs How to stream Base64 data into a video

Bounty: 100

I am trying to get a video to load from a stream. I would like to be able to "play" the video even if the entire video has not "downloaded" yet. The base64 data is coming in as a stream of buffer chunks.

const videoTag = document.getElementById('videoTag');
const mimeCodec = 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"';
const mediaSource = new MediaSource();

videoTag.src = URL.createObjectURL(mediaSource);

await new Promise((resolve, reject) => {
    mediaSource.addEventListener('sourceopen', function (_) {
        resolve();
    });
});

const sourceBuffer = mediaSource.addSourceBuffer(mimeCodec);


for await (const chunk of ipfsNode.cat(CID)) {//Chunk is coming in as an array buffer
    sourceBuffer.appendBuffer(chunk);
}

sourceBuffer.addEventListener('updateend', async function (_) {
    mediaSource.endOfStream();
    $('#videoTag')[0].load();
});

I’ve tried using new MediaSource() and sourceBuffer.appendBuffer(chunk); to push new downloaded chunks to the video, but not only does the video not ever play, the method I am using requires that the entire video downloads before it can play.

How can I get my chunks of base64 data into a video?

EDIT (in response to comments):
Regardless of whether or not I use a String or binary steam, I am a little confused on how I get a stream into a video.


Get this bounty!!!

#StackBounty: #ios #macos #video #safari #webrtc How to record audio and video in safari browser in iOS devices and Mac OS devices?

Bounty: 200

Stuck with the implementation to Record Audio & Video in safari browsers.

What I have tried:

I tried using WebRTC to get access to the Microphone and Camera, I was able to show the permissions but I’m unable to get access to the devices. Below is my code:

navigator.mediaDevices.getUserMedia = function(constraintObj) {
                                let getUserMedia = navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.getUserMedia;

I keep getting the below error messages:

getUserMedia is not implemented in this browser

Can't find variable: MediaRecorder

I was able to record a video from iPhone using the below code, but the same code doesn’t work for audio.

<input id="recordUploadFile" style="visibility:hidden;" class="recordFile" type="file" accept="video/*" onChange='getFileNameWithExt(event, "record")' capture>

Unable to figure out below 2 cases:

  • iOS devices – Audio Recording
  • MacOS – Video and Audio Recording


Get this bounty!!!

#StackBounty: #audio #video #ffmpeg #sync #video-editing ffmpeg – video and audio out of sync

Bounty: 50

This seems to be a common problem, but the answers I found don’t seem to apply to my situation.

I’m merging 6 videos (one of them is a short background that loops) into 1 output video, and the audio and video are off by a little bit (maybe a quarter second). Here’s my command line:

ffmpeg -y
-ss 0.2 -i "One.MOV"
-ss 3.2 -i "Two.MOV"
-i "Three.mp4"
-ss 1.9 -i "Four.mp4"
-ss 1.9 -i "Five.MOV"
-stream_loop 180 -i "Background.mp4"
-filter_complex "
   nullsrc=size=1920x1080 [back];
   [5:v] scale=1920x1080 [fred];
   [back][fred] overlay=shortest=1:x=0:y=0 [base];
   [0:v] crop=1312:1080:290:0,scale=576x474 [clip0];
   [0:a]volume=1.7[aud0];
   [1:v] crop=1080:1056:0:864,scale=497x486 [clip1];
   [1:a]volume=4.8,aresample=async=1:first_pts=0[aud1];
   [2:v] scale=576x324 [clip2];
   [2:a]volume=2.0,aresample=async=1:first_pts=0[aud2];
   [3:v] crop=673:720:322:0,scale=454x486 [clip3];
   [3:a]volume=6.9,aresample=async=1:first_pts=0[aud3];
   [4:v] crop=720:921:0:359,scale=380x486 [clip4];
   [4:a]volume=4.9,aresample=async=1:first_pts=0[aud4];
   [base][clip0] overlay=shortest=1:x=32:y=83 [tmp0];
   [tmp0][clip1] overlay=shortest=1:x=711:y=27 [tmp1];
   [tmp1][clip2] overlay=shortest=1:x=1312:y=158 [tmp2];
   [tmp2][clip3] overlay=shortest=1:x=93:y=567 [tmp3];
   [tmp3][clip4] overlay=shortest=1:x=770:y=567 [tmp4];
   [aud0][aud1][aud2][aud3][aud4]amix=inputs=5[a]
" -map "[tmp4]" -map "[a]" -c:v libx264 "Output.mp4"

I’m guessing it has to do with the aresample and first_pts but I’ve been reading the documentation and can’t figure out what I need to do differently.

How can I get my audio and video to synchronize?

EDIT

Note: "Three.mp4" is the piano accompaniment; the other tracks are individual singers, adding their voices to the piano.


Get this bounty!!!

#StackBounty: #swift #video #ios14 Portrait videos no longer retain aspect ratio in iOS 14

Bounty: 300

Using version Texture 3.0.0 with XCode 12 and iOS 14, a problem that appears only on iOS 14 devices, is that portrait videos load with the wrong resolution (it may seem that they swap their width with their height).

Auto play works fine, but manual play does not.
Portrait videos are broken, but landscape videos are not.
The issue is that the gravity applied seems to stretch the video using the wrong width/height for portrait videos.

Sample app below (using a public portrait video I uploaded):

//
//  ViewController.swift
//  test video
//
//  Created by Ericos Georgiades on 22/09/2020.
//

import UIKit
import AVFoundation
import AsyncDisplayKit

class ViewController: UIViewController {

    
    @IBOutlet weak var videoView: UIView!
    private let videoNode = ASVideoNode();
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        videoNode.gravity = AVLayerVideoGravity.resizeAspectFill.rawValue;
        videoNode.muted = true;
        videoNode.shouldAutorepeat = true;
        videoNode.shouldAutoplay = false; // works if true
        videoView.addSubnode(videoNode);
        videoNode.frame = videoView.frame;
        
        let asset = AVAsset(url: URL(string: "https://storage.googleapis.com/pao-uat-6b24c.appspot.com/users/0QhK2lnaQ49BftJTRQ46/spots/7q0Q2TjiIyHyrNTBbJOO/media/WaMnS8Np5vkTcIV0rGyJ/WaMnS8Np5vkTcIV0rGyJ?alt=media&token=75542345-06cc-4e37-a422-1ff2a1cf47c2")!)
        videoNode.asset = asset

        DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
            self.videoNode.play();
        }
    }
}

I have yet to figure out if this is a bug with the library or if this is possible to resolve in Swift without a library fix (or if its needed at all).

Also posted as a bug on https://github.com/TextureGroup/Texture/issues/1918


Get this bounty!!!

#StackBounty: #css #video #background-image #gif #background-repeat Position video and make it repeat in background like images

Bounty: 50

Is there a way to position a video that I put in the background of my html page and make it repeat as I would do with an image/gif using the background-* css properties? I’m sure this isn’t possible with the current version of CSS but maybe there is a way to do it with JavaScript. The video was originally a gif, and what I am trying to do works with a gif, but I converted it to a webm and mp4 to improve load performance and save bandwidth. Below is code of what I would do if my video was a gif and then there is code of what I have currently and want to replicate the code for "Video as Gif".

Video as Gif

body {
    background: url('https://media3.giphy.com/media/KZFrf9JusXzmpnPsT6/giphy.gif?cid=ecf05e47nlo6zhk89xm58aaee38kzq5tddoko195kri6hv0e&rid=giphy.gif') center center;
  background-repeat: repeat;
  position: relative;
  background-size: auto;
  overflow: hidden;
    width: 100%;
}
<html>
<body>
</body>
</html>

Gif as Video

#video-background {
    top: 0;
    left: 0;
  position: absolute;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
    overflow: hidden;
}
  <div id="video-background">
    <video aria-hidden="true" playsinline="" autoplay="" muted="" loop=""> <source src="//starlink.ua/media/mod_starlink/car-blur.webm" type="video/webm"> <source src="//starlink.ua/media/mod_starlink/car-blur.mp4" type="video/mp4"></video>
  </div>


Get this bounty!!!

#StackBounty: #video Automatically find shot-transitions in a movie

Bounty: 50

I would like to have a piece of software which automatically finds the shot-transitions
in a video. A search on Google shows it’s an active research-area of interest, however I can’t find any software which does this.

My ideal application would:

  • be a console application which takes as input the path of a video-file.

  • gives as output a list of timestamps where in the video the shot-transitions occur.

  • work on Windows.

  • work with all common video-formats.

  • is gratis or costs no more than around €50.

However I am open to other types of programs running on different operating systems which achieve the same goal, automatically find shot-transitions in a video-file.


Get this bounty!!!

#StackBounty: #windows #android #open-source #web-apps #video Software which can find a complete video in the internet using one of its…

Bounty: 50

I have downloaded a compilation video recently and some parts of it were so interesting that I’m eager to find their complete videos.

I know they are somewhere in the internet but don’t know where.

the sequences are short (10-15 seconds each).

for Windows or Android please.

any advice will be appreciated.


Get this bounty!!!

#StackBounty: #windows #command-line #video #ffmpeg How to copy unsupported data streams with ffmpeg?

Bounty: 50

Briefing

I have some .wmv files (actually, my full batch file deals with multiple filetypes) with weird data streams that are needed for an external program to recognize them.

I’m trying to remove every stream that is not data or audio, which also needs to be reencoded.

My current command is

fmpeg -y -loglevel debug -flags global_header -err_detect ignore_err -fflags +igndts -copy_unknown -i "%%~fV" -f !ext! -c copy -map 0 -vn -sn -b:a 32k "%%~pnxV.tmpoutput"

Which works for other file types with the same type of data stream and will work with .wmv if I add -dn (even though my file is then not recognizable by the external program). The command above, as is, for .wmv files will output the error Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted.

From FFprobe (full output below), I can see the message Unsupported codec with id 0 for input stream 2, so I believe it’s beyond doubt that the cause is indeed the data stream.


Question

The thing is that I expected -copy_unknown to deal with this and it doesn’t. My question is: how do I copy this unsupported, not used anywhere else data stream? Are there other ways to approach the matter?

Thanks


Extra info

Full FFmpeg output (with -loglevel debug):

ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190807
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-flags' ... matched as AVOption 'flags' with argument 'global_header'.
Reading option '-err_detect' ...Routing option err_detect to both codec and muxer layer
 matched as AVOption 'err_detect' with argument 'ignore_err'.
Reading option '-fflags' ... matched as AVOption 'fflags' with argument '+igndts'.
Reading option '-copy_unknown' ... matched as option 'copy_unknown' (Copy unknown stream types) with argument '1'.
Reading option '-i' ... matched as input url with argument 'C:UsersFabioDesktopTestestesta.wmv'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'asf'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0'.
Reading option '-vn' ... matched as option 'vn' (disable video) with argument '1'.
Reading option '-sn' ... matched as option 'sn' (disable subtitle) with argument '1'.
Reading option '-b:a' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '32k'.
Reading option 'UsersFabioDesktopTestestesta.wmv.tmpoutput' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set logging level) with argument debug.
Applying option copy_unknown (Copy unknown stream types) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url C:UsersFabioDesktopTestestesta.wmv.
Successfully parsed a group of options.
Opening an input file: C:UsersFabioDesktopTestestesta.wmv.
[NULL @ 0000025955e7af40] Opening 'C:UsersFabioDesktopTestestesta.wmv' for reading
[file @ 0000025955e7b740] Setting default whitelist 'file,crypto'
[asf @ 0000025955e7af40] Format asf probed with size=2048 and score=100
[asf @ 0000025955e7af40] gpos mismatch our pos=24, end=244
[asf @ 0000025955e7af40] gpos mismatch our pos=24, end=26
[asf @ 0000025955e7af40] gpos mismatch our pos=24, end=3295
[asf @ 0000025955e7af40] Payload extension 50 2
[asf @ 0000025955e7af40] gpos mismatch our pos=24, end=42
[asf @ 0000025955e7af40] gpos mismatch our pos=24, end=44
[asf @ 0000025955e7af40] gpos mismatch our pos=24, end=834
[asf @ 0000025955e7af40] Before avformat_find_stream_info() pos: 5793 bytes read:32768 seeks:0 nb_streams:3
[asf @ 0000025955e7af40] parser not found for codec wmav2, packets or times may be invalid.
[wmv3 @ 0000025955eb4480] Header: 46690A01
[wmv3 @ 0000025955eb4480] Profile 1:
frmrtq_postproc=3, bitrtq_postproc=6
LoopFilter=1, MultiRes=0, FastUVMC=0, Extended MV=0
Rangered=0, VSTransform=1, Overlap=1, SyncMarker=0
DQuant=0, Quantizer mode=0, Max B-frames=0
[wmv3 @ 0000025955eb4480] Extra data: 8 bits left, value: 0
[wmv3 @ 0000025955eb4480] Format yuv420p chosen by get_format().
    Last message repeated 1 times
[asf @ 0000025955e7af40] parser not found for codec wmav2, packets or times may be invalid.
[asf @ 0000025955e7af40] All info found
[asf @ 0000025955e7af40] After avformat_find_stream_info() pos: 191671 bytes read:196608 seeks:0 frames:58
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, asf, from 'C:UsersFabioDesktopTestestesta.wmv':
  Metadata:
    copyright       : ChessBase GmbH
    WMFSDKVersion   : 12.0.9600.17415
    WMFSDKNeeded    : 0.0.0.0000
    IsVBR           : 0
    DeviceConformanceTemplate: MP@ML
  Duration: 00:00:23.08, start: 0.000000, bitrate: 526 kb/s
    Stream #0:0, 17, 1/1000: Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, stereo, fltp, 96 kb/s
    Stream #0:1, 41, 1/1000: Video: wmv3 (Main), 1 reference frame (WMV3 / 0x33564D57), yuv420p(left), 640x480, 0/1, 415 kb/s, 25 tbr, 1k tbn, 1k tbc
    Stream #0:2, 0, 1/1000: Data: none, 0/1, 10 kb/s
Successfully opened the file.
Parsing a group of options: output url UsersFabioDesktopTestestesta.wmv.tmpoutput.
Applying option f (force format) with argument asf.
Applying option c (codec name) with argument copy.
Applying option map (set input stream mapping) with argument 0.
Applying option vn (disable video) with argument 1.
Applying option sn (disable subtitle) with argument 1.
Applying option b:a (video bitrate (please use -b:v)) with argument 32k.
Successfully parsed a group of options.
Opening an output file: UsersFabioDesktopTestestesta.wmv.tmpoutput.
[file @ 0000025955eee200] Setting default whitelist 'file,crypto'
Successfully opened the file.
Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:2 -> #0:1 (copy)
    Last message repeated 1 times
[AVIOContext @ 0000025955eee2c0] Statistics: 0 seeks, 1 writeouts
[AVIOContext @ 0000025955e83980] Statistics: 196608 bytes read, 0 seeks

FFprobe on a sample file:

ffprobe version 4.3 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200621
  configuration: --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libaom --enable-libgsm --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-libopenmpt --enable-amf
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
[wmv3 @ 00000180012e1440] Extra data: 8 bits left, value: 0
Input #0, asf, from 'test/a.wmv':
  Metadata:

    WMFSDKVersion   : 12.0.9600.17415
    WMFSDKNeeded    : 0.0.0.0000
    IsVBR           : 0
    DeviceConformanceTemplate: MP@ML
  Duration: 00:00:23.08, start: 0.000000, bitrate: 526 kb/s
    Stream #0:0: Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, 2 channels, fltp, 96 kb/s
    Stream #0:1: Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 640x480, 415 kb/s, 25 tbr, 1k tbn, 1k tbc
    Stream #0:2: Data: none, 10 kb/s
[wmv3 @ 0000018001324a80] Extra data: 8 bits left, value: 0
Unsupported codec with id 0 for input stream 2

Other

I chose to specify -f and .tmpoutput to facilitate other non-related parts of my flow.


Get this bounty!!!

#StackBounty: #product #video #product-video HTML video for products

Bounty: 50

Is there a way to add HTML video instead of relying on Youtube, Vimeo, …
It’s kinda unprofessional looking and it’s not kinda hard to have a video tag that links to URL. Seems like this is supported as a Magento Commerce feature from documentation, I should be able to allow my own CDN link to do this kinda stuff. Seems like a very simple feature left out intentionally which looks bad on an open-source project


Get this bounty!!!