[FFmpeg-user] Use source wallclock (NTP) in RTSP/RTCP streams to setpts for inter-media synchronization

2021-01-16 Thread David Gessel

I'm working on a project to multiplex several RTSP streams, from cameras, into a simple 
"grid" output.    The issue is that the cameras are intended to form an 
ultra-wide (panoramic) view and while total latency is never as low as one would like, 
relatively latency is a real problem.

I'm not expecting frame-accurate synchronization as one might get from genlocked analog 
or SDI sources, rather superficially synchronized - to within a few hundred msec, as 
would be sufficient for the visual perception of a live panorama.  As source start times 
and network connection times are not deterministic, manually tuning with incremental 
absolute offsets wouldn't work (though could help).  Currently the best I've been able to 
get is about 3 seconds differential latency, which is a fun way to do an automated 
one-person "wave" but not really the desired effect.  All devices are synced to 
NTP, which is more than sufficiently in sync for the application if I could figure out 
how to use it.

below is the command I'm using to connect, composite, and display that yields 
the fastest frame rates and least drop frames. Curiously, changing setpts from 
N/(8.33*TB) to the recommended for live stream setpts='(RTCTIME - RTCSTART) / 
(TB * 100)' for each stream results in really choppy playback (but no 
improvement in inter-stream sync).

ffmpeg  -max_delay 50 -reorder_queue_size 1 \
 -fflags nobuffer -re -rtsp_transport udp -an -flags low_delay -strict 
experimental\
 -fflags nobuffer -re -thread_queue_size 1024 -i 
rtsp://192.168.100.34:554/stream/profile0\
 -fflags nobuffer -re -thread_queue_size 1024 -i 
rtsp://192.168.100.57:554/stream/profile0\
 -fflags nobuffer -re -thread_queue_size 1024 -i 
rtsp://192.168.100.48:554/stream/profile0\
 -fflags nobuffer -re -thread_queue_size 1024 -i 
rtsp://192.168.100.34:554/stream/profile1\
 -fflags nobuffer -re -thread_queue_size 1024 -i 
rtsp://192.168.100.57:554/stream/profile1\
 -fflags nobuffer -re -thread_queue_size 1024 -i 
rtsp://192.168.100.48:554/stream/profile1\
-filter_complex "
nullsrc=size=3554x480 [base];
[0:v] setpts=N/(8.33*TB) [CAM1];
[1:v] setpts=N/(8.33*TB) [CAM2];
[2:v] setpts=N/(8.33*TB) [CAM3];
[3:v] setpts=N/(8.33*TB) [CAM4];
[4:v] setpts=N/(8.33*TB) [CAM5];
[5:v] setpts=N/(8.33*TB) [CAM6];
[base][CAM1] overlay=x=0 [tmp1];
[tmp1][CAM2] overlay=x=583 [tmp2];
[tmp2][CAM3] overlay=x=1165 [tmp3];
[tmp3][CAM4] overlay=x=1748 [tmp4];
[tmp4][CAM5] overlay=x=2331 [tmp5];
[tmp5][CAM6] overlay=x=2914 " \
-c:v libx264 -tune zerolatency -an -preset ultrafast -crf 22 -f 
matroska - |\
ffplay -framedrop -sync ext -probesize 32 -

What I was looking for was some way to set offsets to either:

* Least Latency - treat each inbound source as "live" and "best effort" rather 
than trying to sync to the start of each stream on the receiver (which is fairly arbitrary) or the 
start of the stream on the source (which is completely arbitrary).  I suspect this is doable, but I 
haven't found an obvious way to do it yet - any advice much appreciated.

* Absolute sync to NTP packets. This seems like it should be the "right" 
solution.  I've found some links that suggest I'm not the only one looking for a 
multi-source NTP sync solution, but I haven't found anyone with a clear solution.

I've tried the a few setpoints constructions to no obvious improvement in 
absolute synchronization including:

setpts=PTS-STARTPTS
setpts='(RTCTIME - RTCSTART) / (TB * 100)'
setpts=N/(8.33*TB

To no avail.

The RTCP Sender Report from these cameras do contain accurate wallclock time 
and are sent every 4-5 seconds:

Real-time Transport Control Protocol (Sender Report)
[Stream setup by RTSP (frame 12)]
10..  = Version: RFC 1889 Version (2)
..0.  = Padding: False
...0  = Reception report count: 0
Packet type: Sender Report (200)
Length: 6 (28 bytes)
Sender SSRC: 0xcd323da7 (3442621863)
Timestamp, MSW: 3819623083 (0xe3aad2ab)
Timestamp, LSW: 3277326335 (0xc35807ff)
[MSW and LSW as NTP timestamp: Jan 14, 2021 14:24:43.763062000 UTC]
RTP timestamp: 2329505188
Sender's packet count: 479641
Sender's octet count: 674869163

My understanding is that NTP is included in RTCP specifically for inter-media 
global synchronization but I don't know how to enable this.

This stack overflow question seems to be on the right path, but implies that 
some mods needed to be made, at least 7 years ago:

https://stackoverflow.com/questions/20265546/reading-rtcp-packets-from-an-ip-camera-using-ffmpeg
 but

On Trac #4586 inspired me to try -use_wallclock_as_timestamps, but that seems to be 
receiver wallclock, not source.  The only other option in options_table.h that seems 
relevant is "start_time_realitme" - but this is encode.

It looks like there was a patch 

[FFmpeg-user] Digest delivery ?

2021-01-16 Thread Michael Glenn Williams
Hi All,

Is it possible to get a digest delivery from this list?

Thank you for all the great info here!

All my best,
Michael

[image: facebook]
 [image:
twitter]  [image: linkedin]

___
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] ffmpeg with vulkan and or opencl

2021-01-16 Thread owen s
I have installed opencl and vulkan drivers on linux: Linux
5.8.0-7630-generic #32~1609193707~20.10~781bb80-Ubuntu SMP Tue Jan 5
21:29:56 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

I am using ffmpeg version:
ffmpeg version 4.3.1-4ubuntu1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10 (Ubuntu 10.2.0-9ubuntu2)

I am running this ffmpeg command
ffmpeg -y -hwaccel any \
-loop 1 -framerate 30 -re \
-hwaccel dxva2 \
-i ./1280x720.jpg \
-stream_loop -1 -re \
-i ./audio.mp3 \
-vcodec libx264 -pix_fmt yuv420p \
-b:v 2500k -maxrate 2500k -bufsize 1k \
-preset slow -tune stillimage \
-b:a 128k -ar 44100 -ac 2 -acodec aac \
-af "dynaudnorm=f=150:g=15" \
-g 60 \
-f flv tmp.flv

This is the output error:
ffmpeg version 4.3.1-4ubuntu1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10 (Ubuntu 10.2.0-9ubuntu2)
  configuration: --prefix=/usr --extra-version=4ubuntu1
--toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
--incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl
--disable-stripping --enable-avresample --disable-filter=resample
--enable-gnutls --enable-ladspa --enable-libaom --enable-libass
--enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio
--enable-libcodec2 --enable-libdav1d --enable-libflite
--enable-libfontconfig --enable-libfreetype --enable-libfribidi
--enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame
--enable-libmysofa --enable-libopenjpeg --enable-libopenmpt
--enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg
--enable-librubberband --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh
--enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq
--enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl
--enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx
--enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc
--enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil  56. 51.100 / 56. 51.100
  libavcodec 58. 91.100 / 58. 91.100
  libavformat58. 45.100 / 58. 45.100
  libavdevice58. 10.100 / 58. 10.100
  libavfilter 7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc55.  7.100 / 55.  7.100
Multiple -hwaccel options specified for stream 0, only the last option
'-hwaccel dxva2' will be used.
Input #0, image2, from './1280x720.jpg':
  Duration: 00:00:00.03, start: 0.00, bitrate: 46423 kb/s
Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc,
bt470bg/unknown/unknown), 1280x720 [SAR 72:72 DAR 16:9], 30 fps, 30 tbr, 30
tbn, 30 tbc
Input #1, mp3, from './audio.mp3':
  Duration: 00:49:57.42, start: 0.025057, bitrate: 128 kb/s
Stream #1:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
Metadata:
  encoder : LAME3.99r
Side data:
  replaygain: track gain - 13.00, track peak - unknown, album gain
- unknown, album peak - unknown,
Device creation failed: -12.
[mjpeg @ 0x56112782f480] No device available for decoder: device type dxva2
needed for codec mjpeg.
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
  Stream #1:0 -> #0:1 (mp3 (mp3float) -> aac (native))
Device setup failed for decoder on input stream #0:0 : Cannot allocate
memory


I cannot get ffmpeg to work, do I need to build a special version?
the wiki page: https://trac.ffmpeg.org/wiki/HWAccelIntro

doesn't provide very detailed info.
___
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] iOS AVPlayer won't play audio files from FFMPEG

2021-01-16 Thread Marcus P
Before requesting audio data iOS AVPlayer requests byte range 0-1 from
FFMPEG.

FFMPEG gives a 200 response, but AVPlayer requires a 206 response.

This results in the request failing and audio can't be played.

Can we change FFMPEG http to return a 206 response?


*Expected behavior*: Play tracks when streaming through ffmpeg

*Current behavior*: When trying to stream with ffmpeg we get "Operation
Stopped"

Sample FFMPEG command:

ffmpeg -i "/path/to/audio/track.mp3" -vn -strict -2 -acodec pcm_u8 -f
wav -listen 1 -seekable 1 http://localhost:8090/restream.wav

Player Log:

Error Domain=AVFoundationErrorDomain Code=-11850 "Operation Stopped"
UserInfo={NSLocalizedFailureReason=The server is not correctly
configured., NSLocalizedDescription=Operation Stopped,
NSUnderlyingError=0x63bcc4b0 {Error Domain=NSOSStatusErrorDomain
Code=-12939 "(null)"}}
!av_interleaved_write_frame(): Broken pipe

!Connection to tcp://localhost:8090 failed: Connection refused

!Connection to tcp://localhost:8090 failed: Connection refused

!Connection to tcp://localhost:8090 failed: Connection refused

!Error writing trailer of http://localhost:8090/restream.wav: Broken pipe

This error is defined by Apple

as:

+"The HTTP server sending the media resource is not configured as
expected. This might mean that the server does not support byte range
requests."

And summarised nicely in this StackOverflow post
:

when AVPlayerItem receive a video URL , it do the following task:

Send a bytes request HTTP Request, and range = 0 -1
If the response code is 206 and return 1 bytes data, It do the 3th
task, if not, AVErrorServerIncorrectlyConfigured error occurred.
continue send other HTTP Request, to download segment of All
duration. and the response of VideoData code must be 206
In my situation , when send range[0-1] HTTP request, the server side
give me a 200 OK response, So error occurred.

Network Log:

GET /file.wav HTTP/1.1Host: localhost:1234X-Playback-Session-Id:
F72F1139-6F4C-4A22-B334-407672045A86Range: bytes=0-1Accept:
*/*User-Agent: AppleCoreMedia/1.0.0.18C61 (iPhone; U; CPU OS 14_3 like
Mac OS X; en_us)Accept-Language: en-usAccept-Encoding:
identityConnection: keep-alive
HTTP/1.1 200 OKContent-Type: application/octet-streamTransfer-Encoding: chunked

Reproduce using this sample app
:

This can also be reproduced using standard ffmpeg and adding URL to local
or remote ffmpeg URL

Can we solve this by making changes to FFMPEG to return 206?
___
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] Compiling FFmpeg with Nvidia GPU acceleration

2021-01-16 Thread Michael Shaffer
Yes, it replaces Windows.

https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview

On Sat, Jan 16, 2021 at 10:49 AM madderek--- via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

>
>
> -Original Message-
> From: ffmpeg-user  On Behalf Of Michael
> Shaffer
> Sent: 16 January 2021 15:23
> To: FFmpeg user questions 
> Subject: Re: [FFmpeg-user] Compiling FFmpeg with Nvidia GPU acceleration
>
> Thanks for reply
>
> Does that mean installing ubuntu rather than Windows? (which I've never
> done but happy to try!!)
>
> Derek
>
> You could try using Ubuntu Linux. I followed the Nvidia instructions for
> installing acceleration on my GTX 1080 and it worked fine.
>
> On Sat, Jan 16, 2021 at 9:47 AM madderek--- via ffmpeg-user <
> ffmpeg-user@ffmpeg.org> wrote:
>
> >
> >
> >
> >
> > -Original Message-
> > From: ffmpeg-user  On Behalf Of Carl
> > Zwanzig
> > Sent: 15 January 2021 21:13
> > To: ffmpeg-user@ffmpeg.org
> > Subject: Re: [FFmpeg-user] Compiling FFmpeg with Nvidia GPU
> > acceleration
> >
> >
> >
> > Thanks very much for taking the trouble to reply.
> >
> >
> >
> > I'm following the instructions here, Windows section:
> >
> >
> > https://docs.nvidia.com/video-technologies/video-codec-sdk/ffmpeg-with
> > -nvidia-gpu/
> >
> >
> >
> > What I'm trying to achieve is joining many images together which have
> > been produced by a video enhancing program.  The command line is:
> >
> > ffmpeg -framerate 59.94  -start_number 160004 -i P:\xmas5\%06d.png
> > -c:v
> > libx264 -preset veryslow -tune film -profile:v high -pix_fmt yuv420p
> > -level
> > 4.1 -crf 17 -r 59.94 -threads 2
> > P:\xmaspng_80002-99932_Dione-DVx4_png.mkv
> >
> >
> >
> > Some times it's TIFFs not PNGs.
> >
> >
> >
> > I am hoping that the Nvidia GPU acceleration will speed up what is a
> > very slow process.  That's all I want it for, and I'm trying to
> > achieve this on a clean install of Windows 10 on a spare disc.  Nvidia
> RTX 2080Ti.
> >
> > I've managed to install make (I'm not an expert on any of this!) but
> > now the make command produces:
> >
> >
> >
> > C:\Windows\System32\nv-codec-headers>make install PREFIX=/usr
> >
> > make: *** No rule to make target `install'.  Stop.
> >
> >
> >
> > The makefile in that directory contains:
> >
> >
> >
> > PREFIX = /usr/local
> >
> > LIBDIR = lib
> >
> > INSTALL = install
> >
> > SED = sed
> >
> >
> >
> > all:
> >
> > ifeq ($(OS),Windows_NT)
> >
> >   $(SED) 's#@@PREFIX@@#$(shell cygpath -m ${PREFIX})#'
> > ffnvcodec.pc.in > ffnvcodec.pc
> >
> > else
> >
> >   $(SED) 's#@@PREFIX@@#$(PREFIX)#' ffnvcodec.pc.in >
> > ffnvcodec.pc
> >
> > endif
> >
> >
> >
> > install: all
> >
> >   $(INSTALL) -m 0755 -d
> '$(DESTDIR)$(PREFIX)/include/ffnvcodec'
> >
> >   $(INSTALL) -m 0644 include/ffnvcodec/*.h
> > '$(DESTDIR)$(PREFIX)/include/ffnvcodec'
> >
> >   $(INSTALL) -m 0755 -d
> > '$(DESTDIR)$(PREFIX)/$(LIBDIR)/pkgconfig'
> >
> >   $(INSTALL) -m 0644 ffnvcodec.pc
> > '$(DESTDIR)$(PREFIX)/$(LIBDIR)/pkgconfig'
> >
> >
> >
> > uninstall:
> >
> >   rm -rf '$(DESTDIR)$(PREFIX)/include/ffnvcodec'
> > '$(DESTDIR)$(PREFIX)/$(LIBDIR)/pkgconfig/ffnvcodec.pc'
> >
> >
> >
> > .PHONY: all install uninstall
> >
> >
> >
> > The following command from the documentation also fails:
> >
> >
> >
> > C:\FFmpeg>./configure --enable-nonfree -disable-shared
> > --enable-cuda-sdk --enable-libnpp --toolchain=msvc
> > --extra-cflags=-I../nv_sdk --extra-ldflags=-libpath:../nv_sdk
> >
> > '.' is not recognized as an internal or external command,
> >
> > operable program or batch file.
> >
> >
> >
> > But I'm not sure whether this is due to the previous failure.
> >
> >
> >
> > If I'm on the completely wrong track I'm prepared to format the disc
> > and start again!  (What a pity there's not an image of Windows all
> > prepared with this and ready to go!)
> >
> >
> >
> > Thanks again for taking an interest in my problem - I am a beginner here!
> >
> >
> >
> > Derek
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On 1/15/2021 10:49 AM, madderek--- via ffmpeg-user wrote:
> >
> >
> >
> > > I cannot get the 'make' command to work - I get  'make' is not
> >
> > > recognized as an internal or external command,
> >
> > >
> >
> > > operable program or batch file.
> >
> >
> >
> > Well install make (nvidia's instructions include that).
> >
> >
> >
> > What's your intended build environment? VisualStudio of msys2/mingw?
> > If mingw, did you install the 'c' compiler?
> >
> >
> >
> > The nvidia instructions don't cover installing a heap of things, like
> > the compiler and a lot of packages. (They also say "–-toolchain=msvc"
> > even as they're giving instructions for mingw, which is suspect (I
> > haven't looked at the code yet to see if it matters.)
> >
> >
> >
> > So first, make sure you have a working build environment, that's out
> > the scope of this list. Then look at the instructions for building
> > ffmpeg-
> >
> >

Re: [FFmpeg-user] Compiling FFmpeg with Nvidia GPU acceleration

2021-01-16 Thread madderek--- via ffmpeg-user


-Original Message-
From: ffmpeg-user  On Behalf Of Michael Shaffer
Sent: 16 January 2021 15:23
To: FFmpeg user questions 
Subject: Re: [FFmpeg-user] Compiling FFmpeg with Nvidia GPU acceleration

Thanks for reply

Does that mean installing ubuntu rather than Windows? (which I've never done 
but happy to try!!)

Derek

You could try using Ubuntu Linux. I followed the Nvidia instructions for 
installing acceleration on my GTX 1080 and it worked fine.

On Sat, Jan 16, 2021 at 9:47 AM madderek--- via ffmpeg-user < 
ffmpeg-user@ffmpeg.org> wrote:

>
>
>
>
> -Original Message-
> From: ffmpeg-user  On Behalf Of Carl 
> Zwanzig
> Sent: 15 January 2021 21:13
> To: ffmpeg-user@ffmpeg.org
> Subject: Re: [FFmpeg-user] Compiling FFmpeg with Nvidia GPU 
> acceleration
>
>
>
> Thanks very much for taking the trouble to reply.
>
>
>
> I'm following the instructions here, Windows section:
>
>
> https://docs.nvidia.com/video-technologies/video-codec-sdk/ffmpeg-with
> -nvidia-gpu/
>
>
>
> What I'm trying to achieve is joining many images together which have 
> been produced by a video enhancing program.  The command line is:
>
> ffmpeg -framerate 59.94  -start_number 160004 -i P:\xmas5\%06d.png 
> -c:v
> libx264 -preset veryslow -tune film -profile:v high -pix_fmt yuv420p 
> -level
> 4.1 -crf 17 -r 59.94 -threads 2 
> P:\xmaspng_80002-99932_Dione-DVx4_png.mkv
>
>
>
> Some times it's TIFFs not PNGs.
>
>
>
> I am hoping that the Nvidia GPU acceleration will speed up what is a 
> very slow process.  That's all I want it for, and I'm trying to 
> achieve this on a clean install of Windows 10 on a spare disc.  Nvidia RTX 
> 2080Ti.
>
> I've managed to install make (I'm not an expert on any of this!) but 
> now the make command produces:
>
>
>
> C:\Windows\System32\nv-codec-headers>make install PREFIX=/usr
>
> make: *** No rule to make target `install'.  Stop.
>
>
>
> The makefile in that directory contains:
>
>
>
> PREFIX = /usr/local
>
> LIBDIR = lib
>
> INSTALL = install
>
> SED = sed
>
>
>
> all:
>
> ifeq ($(OS),Windows_NT)
>
>   $(SED) 's#@@PREFIX@@#$(shell cygpath -m ${PREFIX})#'
> ffnvcodec.pc.in > ffnvcodec.pc
>
> else
>
>   $(SED) 's#@@PREFIX@@#$(PREFIX)#' ffnvcodec.pc.in > 
> ffnvcodec.pc
>
> endif
>
>
>
> install: all
>
>   $(INSTALL) -m 0755 -d '$(DESTDIR)$(PREFIX)/include/ffnvcodec'
>
>   $(INSTALL) -m 0644 include/ffnvcodec/*.h 
> '$(DESTDIR)$(PREFIX)/include/ffnvcodec'
>
>   $(INSTALL) -m 0755 -d
> '$(DESTDIR)$(PREFIX)/$(LIBDIR)/pkgconfig'
>
>   $(INSTALL) -m 0644 ffnvcodec.pc 
> '$(DESTDIR)$(PREFIX)/$(LIBDIR)/pkgconfig'
>
>
>
> uninstall:
>
>   rm -rf '$(DESTDIR)$(PREFIX)/include/ffnvcodec'
> '$(DESTDIR)$(PREFIX)/$(LIBDIR)/pkgconfig/ffnvcodec.pc'
>
>
>
> .PHONY: all install uninstall
>
>
>
> The following command from the documentation also fails:
>
>
>
> C:\FFmpeg>./configure --enable-nonfree -disable-shared 
> --enable-cuda-sdk --enable-libnpp --toolchain=msvc 
> --extra-cflags=-I../nv_sdk --extra-ldflags=-libpath:../nv_sdk
>
> '.' is not recognized as an internal or external command,
>
> operable program or batch file.
>
>
>
> But I'm not sure whether this is due to the previous failure.
>
>
>
> If I'm on the completely wrong track I'm prepared to format the disc 
> and start again!  (What a pity there's not an image of Windows all 
> prepared with this and ready to go!)
>
>
>
> Thanks again for taking an interest in my problem - I am a beginner here!
>
>
>
> Derek
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On 1/15/2021 10:49 AM, madderek--- via ffmpeg-user wrote:
>
>
>
> > I cannot get the 'make' command to work - I get  'make' is not
>
> > recognized as an internal or external command,
>
> >
>
> > operable program or batch file.
>
>
>
> Well install make (nvidia's instructions include that).
>
>
>
> What's your intended build environment? VisualStudio of msys2/mingw? 
> If mingw, did you install the 'c' compiler?
>
>
>
> The nvidia instructions don't cover installing a heap of things, like 
> the compiler and a lot of packages. (They also say "–-toolchain=msvc" 
> even as they're giving instructions for mingw, which is suspect (I 
> haven't looked at the code yet to see if it matters.)
>
>
>
> So first, make sure you have a working build environment, that's out 
> the scope of this list. Then look at the instructions for building 
> ffmpeg-
>
>
>
> I use "Option 2: MSYS2" of
>
>  
> https://trac.ffmpeg.org/wiki/CompilationGuide/MinGW
>
>
>
> If you're using visual studio, see
>
>  
> https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC
>
>
>
> You'll have to manually install any needed packages, usually 
> ./configure will tell you when something's missing.
>
>
>
> Once you can build ffmpeg without cuda, then try building with cuda. 
> And you may want to follow up with nvidia if you're using their instructions.
>

Re: [FFmpeg-user] Compiling FFmpeg with Nvidia GPU acceleration

2021-01-16 Thread Michael Shaffer
You could try using Ubuntu Linux. I followed the Nvidia instructions for
installing acceleration on my GTX 1080 and it worked fine.

On Sat, Jan 16, 2021 at 9:47 AM madderek--- via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

>
>
>
>
> -Original Message-
> From: ffmpeg-user  On Behalf Of Carl
> Zwanzig
> Sent: 15 January 2021 21:13
> To: ffmpeg-user@ffmpeg.org
> Subject: Re: [FFmpeg-user] Compiling FFmpeg with Nvidia GPU acceleration
>
>
>
> Thanks very much for taking the trouble to reply.
>
>
>
> I'm following the instructions here, Windows section:
>
>
> https://docs.nvidia.com/video-technologies/video-codec-sdk/ffmpeg-with-nvidia-gpu/
>
>
>
> What I'm trying to achieve is joining many images together which have been
> produced by a video enhancing program.  The command line is:
>
> ffmpeg -framerate 59.94  -start_number 160004 -i P:\xmas5\%06d.png -c:v
> libx264 -preset veryslow -tune film -profile:v high -pix_fmt yuv420p -level
> 4.1 -crf 17 -r 59.94 -threads 2 P:\xmaspng_80002-99932_Dione-DVx4_png.mkv
>
>
>
> Some times it's TIFFs not PNGs.
>
>
>
> I am hoping that the Nvidia GPU acceleration will speed up what is a very
> slow process.  That's all I want it for, and I'm trying to achieve this on
> a clean install of Windows 10 on a spare disc.  Nvidia RTX 2080Ti.
>
> I've managed to install make (I'm not an expert on any of this!) but now
> the make command produces:
>
>
>
> C:\Windows\System32\nv-codec-headers>make install PREFIX=/usr
>
> make: *** No rule to make target `install'.  Stop.
>
>
>
> The makefile in that directory contains:
>
>
>
> PREFIX = /usr/local
>
> LIBDIR = lib
>
> INSTALL = install
>
> SED = sed
>
>
>
> all:
>
> ifeq ($(OS),Windows_NT)
>
>   $(SED) 's#@@PREFIX@@#$(shell cygpath -m ${PREFIX})#'
> ffnvcodec.pc.in > ffnvcodec.pc
>
> else
>
>   $(SED) 's#@@PREFIX@@#$(PREFIX)#' ffnvcodec.pc.in >
> ffnvcodec.pc
>
> endif
>
>
>
> install: all
>
>   $(INSTALL) -m 0755 -d '$(DESTDIR)$(PREFIX)/include/ffnvcodec'
>
>   $(INSTALL) -m 0644 include/ffnvcodec/*.h
> '$(DESTDIR)$(PREFIX)/include/ffnvcodec'
>
>   $(INSTALL) -m 0755 -d
> '$(DESTDIR)$(PREFIX)/$(LIBDIR)/pkgconfig'
>
>   $(INSTALL) -m 0644 ffnvcodec.pc
> '$(DESTDIR)$(PREFIX)/$(LIBDIR)/pkgconfig'
>
>
>
> uninstall:
>
>   rm -rf '$(DESTDIR)$(PREFIX)/include/ffnvcodec'
> '$(DESTDIR)$(PREFIX)/$(LIBDIR)/pkgconfig/ffnvcodec.pc'
>
>
>
> .PHONY: all install uninstall
>
>
>
> The following command from the documentation also fails:
>
>
>
> C:\FFmpeg>./configure --enable-nonfree -disable-shared --enable-cuda-sdk
> --enable-libnpp --toolchain=msvc --extra-cflags=-I../nv_sdk
> --extra-ldflags=-libpath:../nv_sdk
>
> '.' is not recognized as an internal or external command,
>
> operable program or batch file.
>
>
>
> But I'm not sure whether this is due to the previous failure.
>
>
>
> If I'm on the completely wrong track I'm prepared to format the disc and
> start again!  (What a pity there's not an image of Windows all prepared
> with this and ready to go!)
>
>
>
> Thanks again for taking an interest in my problem - I am a beginner here!
>
>
>
> Derek
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On 1/15/2021 10:49 AM, madderek--- via ffmpeg-user wrote:
>
>
>
> > I cannot get the 'make' command to work - I get  'make' is not
>
> > recognized as an internal or external command,
>
> >
>
> > operable program or batch file.
>
>
>
> Well install make (nvidia's instructions include that).
>
>
>
> What's your intended build environment? VisualStudio of msys2/mingw? If
> mingw, did you install the 'c' compiler?
>
>
>
> The nvidia instructions don't cover installing a heap of things, like the
> compiler and a lot of packages. (They also say "–-toolchain=msvc" even as
> they're giving instructions for mingw, which is suspect (I haven't looked
> at the code yet to see if it matters.)
>
>
>
> So first, make sure you have a working build environment, that's out the
> scope of this list. Then look at the instructions for building ffmpeg-
>
>
>
> I use "Option 2: MSYS2" of
>
>  
> https://trac.ffmpeg.org/wiki/CompilationGuide/MinGW
>
>
>
> If you're using visual studio, see
>
>  
> https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC
>
>
>
> You'll have to manually install any needed packages, usually ./configure
> will tell you when something's missing.
>
>
>
> Once you can build ffmpeg without cuda, then try building with cuda. And
> you may want to follow up with nvidia if you're using their instructions.
>
>
>
> Later,
>
>
>
> z!
>
> ___
>
> 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> 

Re: [FFmpeg-user] Compiling FFmpeg with Nvidia GPU acceleration

2021-01-16 Thread madderek--- via ffmpeg-user
 

 

-Original Message-
From: ffmpeg-user  On Behalf Of Carl Zwanzig
Sent: 15 January 2021 21:13
To: ffmpeg-user@ffmpeg.org
Subject: Re: [FFmpeg-user] Compiling FFmpeg with Nvidia GPU acceleration

 

Thanks very much for taking the trouble to reply.

 

I'm following the instructions here, Windows section:

https://docs.nvidia.com/video-technologies/video-codec-sdk/ffmpeg-with-nvidia-gpu/

 

What I'm trying to achieve is joining many images together which have been 
produced by a video enhancing program.  The command line is:

ffmpeg -framerate 59.94  -start_number 160004 -i P:\xmas5\%06d.png -c:v libx264 
-preset veryslow -tune film -profile:v high -pix_fmt yuv420p -level 4.1 -crf 17 
-r 59.94 -threads 2 P:\xmaspng_80002-99932_Dione-DVx4_png.mkv

 

Some times it's TIFFs not PNGs.

 

I am hoping that the Nvidia GPU acceleration will speed up what is a very slow 
process.  That's all I want it for, and I'm trying to achieve this on a clean 
install of Windows 10 on a spare disc.  Nvidia RTX 2080Ti.

I've managed to install make (I'm not an expert on any of this!) but now the 
make command produces:

 

C:\Windows\System32\nv-codec-headers>make install PREFIX=/usr

make: *** No rule to make target `install'.  Stop.

 

The makefile in that directory contains:

 

PREFIX = /usr/local

LIBDIR = lib

INSTALL = install

SED = sed

 

all:

ifeq ($(OS),Windows_NT)

  $(SED) 's#@@PREFIX@@#$(shell cygpath -m ${PREFIX})#' 
ffnvcodec.pc.in > ffnvcodec.pc

else

  $(SED) 's#@@PREFIX@@#$(PREFIX)#' ffnvcodec.pc.in > ffnvcodec.pc

endif

 

install: all

  $(INSTALL) -m 0755 -d '$(DESTDIR)$(PREFIX)/include/ffnvcodec'

  $(INSTALL) -m 0644 include/ffnvcodec/*.h 
'$(DESTDIR)$(PREFIX)/include/ffnvcodec'

  $(INSTALL) -m 0755 -d '$(DESTDIR)$(PREFIX)/$(LIBDIR)/pkgconfig'

  $(INSTALL) -m 0644 ffnvcodec.pc 
'$(DESTDIR)$(PREFIX)/$(LIBDIR)/pkgconfig'

 

uninstall:

  rm -rf '$(DESTDIR)$(PREFIX)/include/ffnvcodec' 
'$(DESTDIR)$(PREFIX)/$(LIBDIR)/pkgconfig/ffnvcodec.pc'

 

.PHONY: all install uninstall

 

The following command from the documentation also fails:

 

C:\FFmpeg>./configure --enable-nonfree -disable-shared --enable-cuda-sdk 
--enable-libnpp --toolchain=msvc --extra-cflags=-I../nv_sdk 
--extra-ldflags=-libpath:../nv_sdk

'.' is not recognized as an internal or external command,

operable program or batch file.

 

But I'm not sure whether this is due to the previous failure.

 

If I'm on the completely wrong track I'm prepared to format the disc and start 
again!  (What a pity there's not an image of Windows all prepared with this and 
ready to go!)

 

Thanks again for taking an interest in my problem - I am a beginner here!

 

Derek

 

 

 

 

 

 

 

On 1/15/2021 10:49 AM, madderek--- via ffmpeg-user wrote:

 

> I cannot get the 'make' command to work - I get  'make' is not 

> recognized as an internal or external command,

> 

> operable program or batch file.

 

Well install make (nvidia's instructions include that).

 

What's your intended build environment? VisualStudio of msys2/mingw? If mingw, 
did you install the 'c' compiler?

 

The nvidia instructions don't cover installing a heap of things, like the 
compiler and a lot of packages. (They also say "–-toolchain=msvc" even as 
they're giving instructions for mingw, which is suspect (I haven't looked at 
the code yet to see if it matters.)

 

So first, make sure you have a working build environment, that's out the scope 
of this list. Then look at the instructions for building ffmpeg-

 

I use "Option 2: MSYS2" of

  
https://trac.ffmpeg.org/wiki/CompilationGuide/MinGW

 

If you're using visual studio, see

  
https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC

 

You'll have to manually install any needed packages, usually ./configure will 
tell you when something's missing.

 

Once you can build ffmpeg without cuda, then try building with cuda. And you 
may want to follow up with nvidia if you're using their instructions.

 

Later,

 

z!

___

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] How to join mp3 with array of images(paths from text file) along with seconds frame wise?

2021-01-16 Thread Ravi Patel
Hello All,

I have used older FFmpeg which is currently not working in Android 10 and
later, I started learning this library and I need help for a the command
that combines mp3 with images(array) and also duration define by sec. by
images wise

**Older I used **

String[] inputCode = application.getMusicData() != null ? new String[]{
FileUtils.getFFmpeg(this), "-r",
String.valueOf(BitmapDescriptorFactory.HUE_ORANGE /
application.getSecond()),
"-f", "concat", "-safe", "0", "-i", r0.getAbsolutePath(), "-i",
audioFile.getAbsolutePath(), "-strict",
"experimental", "-r", "30",
"-t", String.valueOf(toatalSecond), "-c:v", "libx264",
"-preset",
"ultrafast", "-pix_fmt", "yuv420p", "-ac", "2", videoPath}

: new String[]{FileUtils.getFFmpeg(this),
"-r",
String.valueOf(BitmapDescriptorFactory.HUE_ORANGE /
application.getSecond()),
"-f", "concat", "-i", r0.getAbsolutePath(), "-r",
"30", "-c:v", "libx264",
"-preset", "ultrafast", "-pix_fmt", "yuv420p", videoPath};

*Here Details of the params used in the older one.*
application.getMusicData() - " it returns string value of Audio"
r0.getAbsolutePath() - " text file contains List of images "
totalSecond - "set for video duration"
videoPath - "Output video mp4 file name along with path"

*Please explain how this going to use in command for*

"mobile-ffmpeg"


Thanks

Ravi P.
___
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".