Re: [FFmpeg-user] Get the file size in advance when encoding from one another format

2022-06-14 Thread Adam Nielsen via ffmpeg-user
> I've created a simple wrapper for FFmpeg using java and use this in a > spring boot web application, and everything works fine. But the problem is > I have this requirement that I need to get the file size of any media > format in advance from encoding to another format because I need to set the

Re: [FFmpeg-user] h264_v4l2m2m not working properly

2022-06-13 Thread Adam Nielsen via ffmpeg-user
> Console output for hardware and software encoding. > https://0x0.st/ouiE.txt > > Software encoding finished encoding successfully. Playback was also > possible. > > But I want to do hardware encoding because software encoding only gives me > about 0.5x. > > Is there anything I can find out fro

Re: [FFmpeg-user] h264_v4l2m2m not working properly

2022-06-09 Thread Adam Nielsen via ffmpeg-user
> I am trying to use h264_v4l2m2m on a Raspberry pi 4B to do M2TS to H264 > hardware encoding, but it is not working properly. The log is below. > http://0x0.st/oMOa.txt > > If I don't use hardware encoding or if the source is not m2ts (tested with > mpeg-1 to h264(v4l2m2m)) I can encode. It look

Re: [FFmpeg-user] Why does ffplay lie about vq value? (was: How to get ffplay live stream latency under 15 seconds)

2022-05-04 Thread Adam Nielsen via ffmpeg-user
ev/video0 -vsync cfr -r 15 -c:v h264_v4l2m2m -b:v 5M -f rtp_mpegts udp://239.0.0.1:5004 And on the client x86 PC: ffplay -probesize 32 -sync ext udp://239.0.0.1:5004 # Plus variations of all the options described further below Many thanks, Adam. On Mon, 3 Jan

Re: [FFmpeg-user] FFMPEG RTSP stream problem

2022-04-07 Thread Adam Nielsen via ffmpeg-user
> I have an RTSP stream which framerate is 1/16, which means every 16 sec > a frame is transported through RTSP. This framerate is because of a > special purpose, cannot and want not to change it. > > What i want is to save every frame of this video as single JPEG image on > my server (Linux).

Re: [FFmpeg-user] ffmpeg on Raspberry Pi using h264_v4l2m2m hardware acceleration

2022-03-04 Thread Adam Nielsen via ffmpeg-user
> The resulting .mp4 is flagged as VFR which is not what I expected nor > wanted. I am using v4l2_m2m on a Pi and getting constant framerate (although still not correct) so it is at least possible: Frame rate mode : Constant Frame rate :

Re: [FFmpeg-user] drawtext reload=N > 1?

2022-02-28 Thread Adam Nielsen via ffmpeg-user
> > Have you tried benchmarking to see how much benefit you'd get from > > this optimisation? You could check CPU usage and I/O load with > > reload=1 and again with reload=0 and see what the difference is. > > Regarding I/O load, I know it’s probably negligible, but it just > offends my sensibil

Re: [FFmpeg-user] drawtext reload=N > 1?

2022-02-27 Thread Adam Nielsen via ffmpeg-user
> Would it be worthy feature request to allow drawtext to accept > integer values N > 1, and then reload the text file every Nth frame? > It seems like a win for CPU and I/O loading, with the benefit of > being fully backward compatible with existing scripts that read in > every 1 frame (e.g. reloa

Re: [FFmpeg-user] FFMpeg question on Raspberry Pi

2022-02-25 Thread Adam Nielsen via ffmpeg-user
> We are most interested in being able to group videos by a certain time > period, e.g., the motion tripped within a particular time period.  The > ideal setup would be looking at the concatenating video with two sliders > - one for the beginning and one for the ending and downloading to the >

Re: [FFmpeg-user] FFMpeg question on Raspberry Pi

2022-02-22 Thread Adam Nielsen via ffmpeg-user
> Thanks about the USB tip. I’m trying to concatenate automatically, > however. We have many Arlo cameras where we CAN connect to the > internet. Otherwise, you’re right, we could just use a trail cam but > the time someone would need to be spending going through assembling > videos would not

Re: [FFmpeg-user] FFMpeg question on Raspberry Pi

2022-02-22 Thread Adam Nielsen via ffmpeg-user
>     I need help in trying to develop a security camera for a remote > area of a farm.  There is no internet in some places there and some of > the motion videos may be long, e.g., 20 to 30 minutes. > >     So, I would like to be able to record these longer motion videos on > a Raspberry Pi

Re: [FFmpeg-user] watch a folder for new images

2022-01-31 Thread Adam Nielsen via ffmpeg-user
> The best solution would be if something like fileSystemWatcher could be > added to FFmpeg. > Below is a C# example for fileSystemWatcher. FFmpeg is written in C++. Windows, Mac and Linux each have a different method for watching the filesystem change. Do you have any example C++ code that wor

Re: [FFmpeg-user] No Audio from ALSA device on Raspberry Pi

2022-01-30 Thread Adam Nielsen via ffmpeg-user
> Using 'arecord' I am able to record audio. I have a .asoundrc file in my > home dir and reference the device by the name in there ("-D dmic_sv"). Where is the ffmpeg output from where you tried using this "dmic_sv" device that works with arecord? > But, when I try to record with ffmpeg, nothing

Re: [FFmpeg-user] Lensfun

2022-01-16 Thread Adam Nielsen via ffmpeg-user
> Interesting... > -- > ben@dell2in1:~/ffmpeg/ffbuild$ more config.log | grep lensfun > lensfun_filter > lensfun_filter > liblensfun > liblensfun > liblensfun > liblensfun > lensfun_filter > lensfun_

Re: [FFmpeg-user] Lensfun

2022-01-16 Thread Adam Nielsen via ffmpeg-user
> No, I have the latest version from github, and built for myself. > Interesting because in ffmpeg/libavfilter there is a file, whose name is > vf_lensfun.c but only a ".c" extension. All the other filters have a ".c" > ".o" and a ".d" extension. According to Google this is provided by the exter

Re: [FFmpeg-user] ERROR: zimg >= 2.7.0 not found using pkg-config

2022-01-14 Thread Adam Nielsen via ffmpeg-user
> Hi, when compiling, is there a good way to fix the > > ERROR: zimg >= 2.7.0 not found using pkg-config > > Was using this guide > > https://zimg.buaa.us/documents/install/ That tells you to configure things to install into /usr/local (which is a good idea), but have you then configured pkg-co

Re: [FFmpeg-user] Can MJPEG be live streamed without transcoding?

2022-01-09 Thread Adam Nielsen via ffmpeg-user
> > [mpegts @ 0x6725d0] Stream 0, codec mjpeg, is muxed as a private data > > stream and may not be recognized upon reading. > > You cannot mux random data into mpegts, this is not a limitation of FFmpeg. > > A small change to the FFmpeg source code probably makes possible what > you want,

[FFmpeg-user] Can MJPEG be live streamed without transcoding?

2022-01-07 Thread Adam Nielsen via ffmpeg-user
Hi all, I'm trying to stream video from a USB camera plugged into a Raspberry Pi[1], however I can't work out how to stream the camera's MJPEG data over a network without transcoding it first[2]. If I use a command like this: $ ffmpeg -f v4l2 -input_format mjpeg -video_size 1280x720 -i /de

Re: [FFmpeg-user] using multiple instances of ffmpeg

2022-01-03 Thread Adam Nielsen via ffmpeg-user
> I wanted to know if any of you have had success using multiple > instances of ffmpeg to connect to separate multi-cast or uni-cast > audio/video streams simultaneously? Yes, I have multiple Raspberry Pi devices each streaming 1-2 multicast H264 streams. I then have a machine that uses multiple

[FFmpeg-user] How to get ffplay live stream latency under 15 seconds

2022-01-03 Thread Adam Nielsen via ffmpeg-user
Hi all, I'm using ffplay to play a video stream from a Raspberry Pi (encoded via ffmpeg using the Pi's hardware H264 encoder). Unfortunately I cannot work out how to get the stream latency lower than about 15 seconds. I would be happy if the overall delay could be reduced to 2 seconds or less.

Re: [FFmpeg-user] Please advise

2021-12-30 Thread Adam Nielsen via ffmpeg-user
> I have received 2 replies to my topic. > And both are asking for me to provide clarification. > > I don't see any way to reply to them. You should have gotten the replies via e-mail. Use 'Reply All' so that the ffmpeg-user@ffmpeg.org e-mail address is in the To or CC field in your reply e-mail

Re: [FFmpeg-user] Multiple ffmpeg instances failing to subscribe to separate audio streams

2021-12-21 Thread Adam Nielsen via ffmpeg-user
> We have been initially working with the 2110 decode example on the > github site (https://github.com/cbcrc/FFmpeg) and have been > successfully streaming media with it. We have evolved our design and > would like to operate with multiple media streams. The set up is probably a bit complex for an

Re: [FFmpeg-user] onvif use

2021-12-14 Thread Adam Nielsen via ffmpeg-user
> I have tried to reproduce the streaming without success: > > ffplay http://admin:password@192.168.1.59:8000 > > and to record it in various protocols and formats: > > ffmpeg -i http://admin:password@192.168.1.59:8000 stream.h264 > or > ffmpeg -i > rtsp://admin:password@192.168.1.59:8000//onvif

Re: [FFmpeg-user] help with pipe command ffmpeg

2021-12-08 Thread Adam Nielsen via ffmpeg-user
> i want to know how to output to a windows named pipe and reference > that in c++ code as input ... > > kindly share some working command line examples of ffmpeg.exe > > googling is not much help full, tired of it... It seems that using named pipes is not very common. If you still want to use

Re: [FFmpeg-user] Struggling with audio of multipart stream

2021-12-02 Thread Adam Nielsen via ffmpeg-user
> I have a TPLink Kasa IP camera, which can be coaxed into sending a live or > recorded stream. It looks like this: That looks like some sort of custom format, perhaps to make it easier to stream over HTTP to a browser. I am guessing if you want to use this stream you'll probably have to write yo

Re: [FFmpeg-user] kmsgrab: variable framerate captures (was: Oh man, this could be so great. But it's just... not.)

2021-11-20 Thread Adam Nielsen via ffmpeg-user
> 2.) As far as I can tell, kmsgrab (like x11grab or other screen devices) > wants a constant frame rate value (-r). > [...] This is exactly how camera input is > recorded on mobile devices, as they're all variable frame rate, and it > works fine. kmsgrab should do the same. Wouldn't this work the

Re: [FFmpeg-user] Can I set a "wait-timeout" for ffmpeg to not abort a stream download?

2021-11-15 Thread Adam Nielsen via ffmpeg-user
> On a new invocation I will have to adjust the -t argument to handle > the time until the original stop was supposed to be done of course. If you're using "at" as you have suggested in your other message, possibly you could just write the FFmpeg PID to a file and have "at" send a TERM signal at t

Re: [FFmpeg-user] Can I set a "wait-timeout" for ffmpeg to not abort a stream download?

2021-11-15 Thread Adam Nielsen via ffmpeg-user
> Here you go (even though I was asking for the existence of an ffmpeg argument > to > tell it to wait out the set -t time rather than aborting if there is a pause > in > the stream). > Actual URL domains obfuscated. > > ffmpeg -hide_banner -referer "https://w.com/.html"; -i > "https

Re: [FFmpeg-user] Can I set a "wait-timeout" for ffmpeg to not abort a stream download?

2021-11-14 Thread Adam Nielsen via ffmpeg-user
> Some live streams I download from are sometimes interrupted for a short time > of > 1-2 minutes and when I use ffmpeg for download it quits at these occurrences. > > Is there some way to enforce the "-t 3800 " argument so it really waits all > that > time if the video stops before aborting the

Re: [FFmpeg-user] Alternative to Dynamic Text

2021-11-08 Thread Adam Nielsen via ffmpeg-user
> Instead of a sleep and retry, we can simply continue with existing text > and try again on next frame. We can also extend the semantics of the > option (in a backward-compatible way) to specify the frame interval at > which the file is reloaded. I like this idea. I'm using it on a Raspberry

Re: [FFmpeg-user] Alternative to Dynamic Text

2021-11-06 Thread Adam Nielsen via ffmpeg-user
> Btw, I think following approach may help (or may not, I have no windows > system by hand to test it myself). Let's say I want to atomically > replace file a.txt with file b.txt > mklink /h wrk.txt a.txt > open wrk.txt with ffmpeg > update b.txt as needed > mklink /h next.txt b.txt > move /y next.

Re: [FFmpeg-user] Alternative to Dynamic Text

2021-11-03 Thread Adam Nielsen via ffmpeg-user
> I have tried to do what you have suggested. Somehow, it still cause > ffmpeg to crash at the exact moment the file is being renamed. > > By the way, I am running in Windows environment. Not sure, if in > Linux will this issue occurs. It works fine for me but I'm on Linux. If renaming doesn't w

Re: [FFmpeg-user] How to obtain packets as soon as sending a frame?

2021-11-03 Thread Adam Nielsen via ffmpeg-user
> I am experimenting with the encoder > example. > According to the FFmpeg encoding and decoding API > overview, > the codec might accept multiple input frames without

Re: [FFmpeg-user] Alternative to Dynamic Text

2021-11-02 Thread Adam Nielsen via ffmpeg-user
> textfile/reload=1 is working. > > However, the textfile is being updated by another process at every > second. This caused ffmpeg to crash after running sometime as the > ffmpeg unable to read the textfile when the other process is updating > it. In the manpage it says the update has to be atom

Re: [FFmpeg-user] Alternative to Dynamic Text

2021-11-02 Thread Adam Nielsen via ffmpeg-user
> For subtitles, what if the content of .srt or .ass file is being > updated at every second. Will ffmpeg crash because the file is being > ‘locked’ by another process that is updating it? If you're going to update it every second, how come textfile/reload=1 won't work? I put my textfile in /tmp

[FFmpeg-user] How to set scanline stride value? Corrupted video with RasPi HW encoder

2021-10-22 Thread Adam Nielsen via ffmpeg-user
Hi all, I'm having a small issue encoding video with the Raspberry Pi's hardware encoder, available as a V4L2M2M device that ffmpeg can use in current firmware/kernel versions. If I try to encode a video where the width is not a multiple of 64 pixels, I get video corruption. I opened an issue ab

[FFmpeg-user] Terminate on no frames/input buffer overflow

2021-10-01 Thread Adam Nielsen via ffmpeg-user
Hi all, I'm streaming a video with ffplay on a Raspberry Pi using the hardware decoder (v4l2_m2m) and the video stream keeps randomly freezing, I am guessing due to a bug in the hardware decoder implementation. When this happens, I must run "killall ffplay". I have configured systemd to restart

Re: [FFmpeg-user] How to set V4L2 M2M codec options like bitrate

2021-10-01 Thread Adam Nielsen via ffmpeg-user
Hi Andriy, > > Unfortunately the most important option I need to change is the > > "repeat_sequence_header" control, which I need to set to 1 as the > > default of 0 means if you miss the initial frame of the video, you can > > never join the stream mid-way through, as ffplay just produces heaps o

Re: [FFmpeg-user] Problem with console log

2021-09-03 Thread Adam Nielsen via ffmpeg-user
> So there isn’t a way to repair the master file? I know it's a 2008 MiniDV > captured. So it's old. Possibly there was some issue (e.g. dirty tape heads) when the camera recorded it so there's probably not much you can do to fix it. > I need to use the master file with other editing applications

Re: [FFmpeg-user] Problem with console log

2021-09-03 Thread Adam Nielsen via ffmpeg-user
> I have the following problem: > I recently tested a MOV (codec DV) file that has the following console log > error > How can I fix this? The error means your file has some corruption but ffmpeg is able to cope with the problem. You can fix it by playing a file that isn't corrupted, or by using

Re: [FFmpeg-user] Framerate automatically increased while cropping

2021-08-22 Thread Adam Nielsen via ffmpeg-user
> why is the framerate automatically changed here from 29.98 fps to 120 > fps, and how can I prevent from this ? > >   Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, > 1280x720, 2508 kb/s, 29.98 fps, 120 tbr, 90k tbn, 2k tbc (default) From what I can find, "tbr" is the targe

Re: [FFmpeg-user] How to set V4L2 M2M codec options like bitrate

2021-08-15 Thread Adam Nielsen via ffmpeg-user
> > I'm using the h264_v4l2m2m codec to do hardware accelerated encoding on > > a Raspberry Pi. This is working well, except I am unable to set any > > encoder options such as bitrate, as I cannot find how to tell ffmpeg to > > set V4L2 control options. > > You can use -b:v option to set the bitr

[FFmpeg-user] How to set V4L2 M2M codec options like bitrate

2021-08-15 Thread Adam Nielsen via ffmpeg-user
Hi all, I'm using the h264_v4l2m2m codec to do hardware accelerated encoding on a Raspberry Pi. This is working well, except I am unable to set any encoder options such as bitrate, as I cannot find how to tell ffmpeg to set V4L2 control options. When I run ffmpeg, it says: [h264_v4l2m2m @ 0x5