[FFmpeg-user] Sending 2 camera outputs side by side to loopback device

2022-11-24 Thread Jim Ruxton
I am on Ubuntu 22.04 and trying to combine 2 cameras into one stream that
is being sent to a loopback device. The command appears to work but I can't
see the stream in any way. I've tried VLC Cheese ffplay guvcview and none
of them work. The command I am using is
:
*ffmpeg -f v4l2 -vcodec rawvideo -i /dev/video0 -f v4l2 -vcodec rawvideo -i
/dev/video2 -filter_complex hstack,"scale=iw*.5:ih*1" -f v4l2 -vcodec mjpeg
/dev/video4 *

This should give me a combined output of 1280x720 and the following output
of ffmpeg shows that it is. Any idea what I am doing wrong? Ultimately I
want to send this combined output to Zoom. Thanks .Relevant output of the
ffmpeg command follows:

Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 10914.045895, bitrate: 147456 kb/s
  Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720,
147456 kb/s, 10 fps, 10 tbr, 1000k tbn, 1000k tbc
Input #1, video4linux2,v4l2, from '/dev/video2':
  Duration: N/A, start: 10915.081944, bitrate: 147456 kb/s
  Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720,
147456 kb/s, 10 fps, 10 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 (rawvideo) -> hstack:input0
  Stream #1:0 (rawvideo) -> hstack:input1
  scale -> Stream #0:0 (mjpeg)
Press [q] to stop, [?] for help
[swscaler @ 0x55a69b913440] deprecated pixel format used, make sure you did
set range correctly
Output #0, video4linux2,v4l2, to '/dev/video4':
  Metadata:
encoder : Lavf58.76.100
  Stream #0:0: Video: mjpeg, yuvj422p(pc, progressive), 1280x720, q=2-31,
200 kb/s, 10 fps, 10 tbn (default)
Metadata:
  encoder : Lavc58.134.100 mjpeg
Side data:
  cpb: bitrate max/min/avg: 0/0/20 buffer size: 0 vbv_delay: N/A
[video4linux2,v4l2 @ 0x55a69b8fa900] Thread message queue blocking;
consider raising the thread_queue_size option (current value: 8)
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Sending 2 camera outputs side by side to loopback device

2022-11-25 Thread Jim Ruxton
Thanks for the reply. I just rebooted my computer and tried again. There
must have been some locked up process that wasn't allowing me to see the
loopback device as it now works.

On Fri, Nov 25, 2022 at 2:56 AM Michael Koch 
wrote:

> Am 25.11.2022 um 08:02 schrieb Jim Ruxton:
> > I am on Ubuntu 22.04 and trying to combine 2 cameras into one stream that
> > is being sent to a loopback device. The command appears to work but I
> can't
> > see the stream in any way. I've tried VLC Cheese ffplay guvcview and none
> > of them work. The command I am using is
> > :
> > *ffmpeg -f v4l2 -vcodec rawvideo -i /dev/video0 -f v4l2 -vcodec rawvideo
> -i
> > /dev/video2 -filter_complex hstack,"scale=iw*.5:ih*1" -f v4l2 -vcodec
> mjpeg
> > /dev/video4 *
>
> It seems you forgot to specify an output file or pipe at the end of the
> command line.
>
> Michael
>
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-user] Captured Audio Stream and Video Streams from YouTube Live are out of Sync

2020-05-09 Thread Jim Ruxton
I am trying to retrieve a YoutubeLive stream and send the video stream 
to a video loopback device and the audio to my souncard. This works 
however it appears that the audio is delayed by a second or so. Is there 
a better way to do this so they aren't out of sync or failing that is 
there a way to set a delay on the video stream to compensate? Below is 
my command. I am using the Sky News You Tube Live as a test signal. I am 
on Ubuntu 19.10 .


ffmpeg -re -i $(youtube-dl -g -f 96 
https://www.youtube.com/watch?v=9Auq9mYxFEE)  -f v4l2 /dev/video2 -f 
alsa default


Thanks,

Jim


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Captured Audio Stream and Video Streams from YouTube Live are out of Sync

2020-05-09 Thread Jim Ruxton

Thanks Carl,



Am 09.05.2020 um 09:14 schrieb Jim Ruxton :

I am trying to retrieve a YoutubeLive stream and send the video stream to a 
video loopback device and the audio to my souncard. This works however it 
appears that the audio is delayed by a second or so. Is there a better way to 
do this so they aren't out of sync or failing that is there a way to set a 
delay on the video stream to compensate? Below is my command. I am using the 
Sky News You Tube Live as a test signal. I am on Ubuntu 19.10 .

ffmpeg -re -i $(youtube-dl -g -f 96 
https://www.youtube.com/watch?v=9Auq9mYxFEE)  -f v4l2 /dev/video2 -f alsa 
default

There is no synchronisation taking place between two outputs, if the delay is 
really constant between runs (I am not convinced it is), you can try the delay 
filters.

You are correct I now see that the delay is not consistent.


ffmpeg does not completely support your use case, it should work with ffplay.


Are you saying I could use ffplay in a similar way to split the audio 
and video from the stream but keep them in sync?



Jim

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Captured Audio Stream and Video Streams from YouTube Live are out of Sync

2020-05-11 Thread Jim Ruxton

Thanks Carl,

It sounds like I will need to find another way other than ffmpeg for 
this use case then? Does anyone have any suggestions. I have tried 
gstreamer but so far haven't had any luck there either.


Jim

On 2020-05-11 5:32 p.m., Carl Eugen Hoyos wrote:

Am Sa., 9. Mai 2020 um 18:48 Uhr schrieb Jim Ruxton :


ffmpeg does not completely support your use case, it should work with ffplay.

Are you saying I could use ffplay in a similar way to split the audio
and video from the stream but keep them in sync?

No I just wanted to highlight that ffmpeg -i input -f alsa default -f
v4l2... does no
A/V sync while ffplay input does.

Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-user] Sending ffmpeg output to virtual usb uvc device in Linux

2020-05-14 Thread Jim Ruxton
I am wondering if there is a way to send ffmpeg output of a stream to a 
virtual usb device. I am using a videoloopback device now. I thought I 
could use something like this https://github.com/wlhe/uvc-gadget to be 
able to convert the dummy video device to make it look like a webcam but 
I haven't had any luck. One of the programs I'm using won't work with a 
stream and seems to need a usb device though most programs work with the 
loopback device as is. The ffmpeg command I am currently using is:


ffmpeg -re -i $(youtube-dl -g -f 95 
https://www.youtube.com/watch?v=9Auq9mYxFEE) -vcodec rawvideo -f v4l2 
/dev/video2 -f alsa default


Thanks for any tips or thoughts on this.

Jim



___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Sending ffmpeg output to virtual usb uvc device in Linux

2020-05-14 Thread Jim Ruxton
goi,sgoap,sgovp,playlist_duration,manifest_duration,vprv,playlist_type/sig/AOq0QJ8wRgIhAJeJOVD0o1VACKEk-9dc9t5yOt2uwQdWv56BNQ5mshHKAiEA4jyaMMxcUmwSlv5VZ3OkWMXobGuA44pyBNi1xX6PRzU%3D/lsparams/hls_chunk_host,initcwndbps,mh,mm,mn,ms,mv,mvi,pl/lsig/AG3C_xAwRgIhALOYPRJONE8-pqGAQYZJSVVTJgIxvUN2dR79OkCtg4leAiEAtQ5mYoipEI-DZu_4xtZ1KHepzA6ByMzhZKho-fFovSo%3D/playlist/index.m3u8/sq/3361954/goap/clen%3D81191%3Blmt%3D1589501280255004/govp/clen%3D712358%3Blmt%3D1589501280255004/dur/5.000/file/seg.ts' 
for reading
Input #0, hls,applehttp, from 
'https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1589522879/ei/X929XqTjMsi7D_O1ocgH/ip/216.154.17.10/id/9Auq9mYxFEE.1/itag/95/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/goi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D136/hls_chunk_host/r3---sn-ux3n588t-mjhl.googlevideo.com/playlist_duration/30/manifest_duration/30/vprv/1/playlist_type/DVR/initcwndbps/7530/mh/Yv/mm/44/mn/sn-ux3n588t-mjhl/ms/lva/mv/m/mvi/2/pl/17/dover/11/keepalive/yes/mt/1589499438/disable_polymer/true/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,goi,sgoap,sgovp,playlist_duration,manifest_duration,vprv,playlist_type/sig/AOq0QJ8wRgIhAJeJOVD0o1VACKEk-9dc9t5yOt2uwQdWv56BNQ5mshHKAiEA4jyaMMxcUmwSlv5VZ3OkWMXobGuA44pyBNi1xX6PRzU%3D/lsparams/hls_chunk_host,initcwndbps,mh,mm,mn,ms,mv,mvi,pl/lsig/AG3C_xAwRgIhALOYPRJONE8-pqGAQYZJSVVTJgIxvUN2dR79OkCtg4leAiEAtQ5mYoipEI-DZu_4xtZ1KHepzA6ByMzhZKho-fFovSo%3D/playlist/index.m3u8':

  Duration: N/A, start: 11561.647422, bitrate: N/A
  Program 0
    Metadata:
  variant_bitrate : 0
    Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, 
stereo, fltp

    Metadata:
  variant_bitrate : 0
    Stream #0:1: Video: h264 (Main) ([27][0][0][0] / 0x001B), 
yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k 
tbn, 60 tbc

    Metadata:
  variant_bitrate : 0
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (native) -> rawvideo (native))
  Stream #0:0 -> #1:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #1, alsa, to 'default':
  Metadata:
    encoder : Lavf58.20.100
    Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
    Metadata:
  variant_bitrate : 0
  encoder : Lavc58.35.100 pcm_s16le
[alsa @ 0x55d3b9e83b40] ALSA buffer xrun.
    Last message repeated 13 times
Output #0, video4linux2,v4l2, to '/dev/video2':
  Metadata:
    encoder : Lavf58.20.100
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720 
[SAR 1:1 DAR 16:9], q=2-31, 331776 kb/s, 30 fps, 30 tbn, 30 tbc

    Metadata:
  variant_bitrate : 0
  encoder : Lavc58.35.100 rawvideo
[alsa @ 0x55d3b9e83b40] ALSA buffer xrun.
    Last message repeated 8 times
[alsa @ 0x55d3b9e83b40] ALSA buffer xrun.00:00:00.51 bitrate=N/A 
speed=1.02x

    Last message repeated 22 times
frame=   22 fps= 22 q=-0.0 size=N/A time=00:00:01.00 bitrate=N/A 
speed=0.993x   [alsa @ 0x55d3b9e83b40] ALSA buffer xrun.

    Last message repeated 23 times
[alsa @ 0x55d3b9e83b40] ALSA buffer xrun.00:00:01.51 bitrate=N/A 
speed=   1x

    Last message repeated 23 times
[alsa @ 0x55d3b9e83b40] ALSA buffer xrun.00:00:02.02 bitrate=N/A 
speed=1.01x

    Last message repeated 22 times
frame=   67 fps= 27 q=-0.0 size=N/A time=00:00:02.51 bitrate=N/A 
speed=0.998x   [alsa @ 0x55d3b9e83b40] ALSA buffer xrun.

    Last message repeated 24 times
[alsa @ 0x55d3b9e83b40] ALSA buffer xrun.00:00:03.05 bitrate=N/A 
speed=1.01x

    Last message repeated 22 times
[alsa @ 0x55d3b9e83b40] ALSA buffer xrun.00:00:03.54 bitrate=N/A 
speed=   1x

    Last message repeated 1 times
frame=   98 fps= 27 q=-0.0 Lsize=N/A time=00:00:03.58 bitrate=N/A 
speed=0.998x
video:132300kB audio:672kB subtitle:0kB other streams:0kB global 
headers:0kB muxing overhead: unknown

Exiting normally, received signal 2.

On 2020-05-14 7:43 p.m., Jim Ruxton wrote:
I am wondering if there is a way to send ffmpeg output of a stream to 
a virtual usb device. I am using a videoloopback device now. I thought 
I could use something like this https://github.com/wlhe/uvc-gadget to 
be able to convert the dummy video device to make it look like a 
webcam but I haven't had any luck. One of the programs I'm using won't 
work with a stream and seems to need a usb device though most programs 
work with the loopback device as is. The ffmpeg command I am currently 
using is:


ffmpeg -re -i $(youtube-dl -g -f 95 
https://www.youtube.com/watch?v=9Auq9mYxFEE) -vcodec rawvideo -f v4l2 
/dev/video2 -f alsa default


Thanks for any tips or thoughts on this.

Jim





___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-user] Getting alsa xruns when sending video to v4l2 device and alsa

2021-02-24 Thread Jim Ruxton
Is there a way that I can avoid getting alsa buffer xruns when using the 
following command to send a video to a v4l2 device and sound out to alsa.


ffmpeg -re -i VideoInput.m4v -map 0:v -pix_fmt yuyv422 -f v4l2 
/dev/video0 -f alsa default


I tried sending sound to pulse instead as below which avoids xruns but 
the sound and video are way out of sync.


ffmpeg -re -i VideoInput.m4v -map 0:v -pix_fmt yuyv422 -f v4l2 
/dev/video0 -f pulse default


Thanks,

Jim


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".