Re: [FFmpeg-user] How to filter time dependent

2021-04-24 Thread Michael Koch

Am 24.04.2021 um 19:24 schrieb Michael Koch:

Am 23.04.2021 um 23:19 schrieb Ulf Zibis:


Am 23.04.21 um 08:31 schrieb Gyan Doshi:


On this topic generally, see https://superuser.com/q/1632998/

Much thanks for this hint. I was successful with this approach:

ffmpeg -i 'Stille Tage in Clichy.mpg' -vf 
"split=3[a][b][c];[a]trim=0:2888.36,setpts=PTS-STARTPTS,crop=352:496:0:36[a];[b]trim=2888.36:3293.96,setpts=PTS-STARTPTS,crop=352:496:0:42[b];[c]trim=3293.96,setpts=PTS-STARTPTS,crop=352:496:0:38[c];[a][b][c]concat=n=3:v=1:a=0",scale=iw:ih/2,hqdn3d=2:1.5:12 
-preset slow -movflags +faststart 'Stille Tage in 
Clichy_c_3_scale_1_2_hqdn3d_2_1_12_slow.mp4'



You can simplify this by using sendcmd:

ffmpeg -i input.mp4 -vf 
"sendcmd=f=test.cmd,crop@1=352:496:0:36,scale=iw:ih/2,hqdn3d=2:1.5:12 
out.mp4


I forgot the quotation mark " at the end of the filter chain:

ffmpeg -i input.mp4 -vf 
"sendcmd=f=test.cmd,crop@1=352:496:0:36,scale=iw:ih/2,hqdn3d=2:1.5:12" 
out.mp4


"@1" can be omitted if there is only one crop filter in the filter chain.

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".


Re: [FFmpeg-user] How to filter time dependent

2021-04-24 Thread Michael Koch

Am 23.04.2021 um 23:19 schrieb Ulf Zibis:


Am 23.04.21 um 08:31 schrieb Gyan Doshi:


On this topic generally, see https://superuser.com/q/1632998/

Much thanks for this hint. I was successful with this approach:

ffmpeg -i 'Stille Tage in Clichy.mpg' -vf 
"split=3[a][b][c];[a]trim=0:2888.36,setpts=PTS-STARTPTS,crop=352:496:0:36[a];[b]trim=2888.36:3293.96,setpts=PTS-STARTPTS,crop=352:496:0:42[b];[c]trim=3293.96,setpts=PTS-STARTPTS,crop=352:496:0:38[c];[a][b][c]concat=n=3:v=1:a=0",scale=iw:ih/2,hqdn3d=2:1.5:12 
-preset slow -movflags +faststart 'Stille Tage in 
Clichy_c_3_scale_1_2_hqdn3d_2_1_12_slow.mp4'



You can simplify this by using sendcmd:

ffmpeg -i input.mp4 -vf 
"sendcmd=f=test.cmd,crop@1=352:496:0:36,scale=iw:ih/2,hqdn3d=2:1.5:12 
out.mp4


The file "test.cmd" contains these two lines:
2888.36 crop@1 y 42;
3293.96 crop@1 y 38;

The above example is untested. There is a similar example at the end of 
chapter 2.86 in my book:

http://www.astro-electronic.de/FFmpeg_Book.pdf

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".


Re: [FFmpeg-user] drawtext timecode from metadata

2021-04-24 Thread Bouke
Hmm,
I’m pretty sure I saw a reply from Gyan, stating ’not possible, how are you 
capturing, i’ll look into something’

few seconds later that was gone. (Or I really need to up my medicine…)

Anyways, I’m dong a BM capture, with TC coming in embedded over SDI.
(I must admit I have not yet tested it with BM capture, just with a local file.

The TC as metadata in a Qt atom works just fine.

Bouke


> On 24 Apr 2021, at 13:26, Bouke  wrote:
> 
> trying to capture and burn in TC at the same time.
> Burn in TC works if I specify the start TC, but I can’t probe and then 
> record, as that takes time so the TC will be off.
> So I’m hoping to set the drawtext filter on the fly, I tried:
> drawtext=timecode=%{metadata\\\:timecode}:
> 
> -filter_complex 
> "[0:0]drawtext=timecode=%{metadata\\\:timecode}:fontfile='/Volumes/Data/fonts/courbd.ttf':r=25:x=(w-tw)
>  - (w * 0.02): y=h-(2*lh):fontsize=54.0:fontcolor=white” 
> 
> This does not work, gives me:
> [Parsed_drawtext_0 @ 0x7ff9fbe0cb40] Unable to parse timecode, syntax: 
> hh:mm:ss[:;.]ff
> 
> Is there a way to do this?
> 
> thx,
> Bouke
> 
> 
> ___
> 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".


Re: [FFmpeg-user] drawtext timecode from metadata

2021-04-24 Thread Gyan Doshi



On 2021-04-24 16:56, Bouke wrote:

trying to capture and burn in TC at the same time.
Burn in TC works if I specify the start TC, but I can’t probe and then record, 
as that takes time so the TC will be off.
So I’m hoping to set the drawtext filter on the fly, I tried:
drawtext=timecode=%{metadata\\\:timecode}:

-filter_complex 
"[0:0]drawtext=timecode=%{metadata\\\:timecode}:fontfile='/Volumes/Data/fonts/courbd.ttf':r=25:x=(w-tw)
 - (w * 0.02): y=h-(2*lh):fontsize=54.0:fontcolor=white”

This does not work, gives me:
[Parsed_drawtext_0 @ 0x7ff9fbe0cb40] Unable to parse timecode, syntax: 
hh:mm:ss[:;.]ff

Is there a way to do this?


Not possible. Let me see if it's possible to get it from frame metadata.

How are you capturing?

Gyan
___
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] drawtext timecode from metadata

2021-04-24 Thread Bouke
trying to capture and burn in TC at the same time.
Burn in TC works if I specify the start TC, but I can’t probe and then record, 
as that takes time so the TC will be off.
So I’m hoping to set the drawtext filter on the fly, I tried:
drawtext=timecode=%{metadata\\\:timecode}:

-filter_complex 
"[0:0]drawtext=timecode=%{metadata\\\:timecode}:fontfile='/Volumes/Data/fonts/courbd.ttf':r=25:x=(w-tw)
 - (w * 0.02): y=h-(2*lh):fontsize=54.0:fontcolor=white” 

This does not work, gives me:
[Parsed_drawtext_0 @ 0x7ff9fbe0cb40] Unable to parse timecode, syntax: 
hh:mm:ss[:;.]ff

Is there a way to do this?

thx,
Bouke


___
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] Odd video output, playing RTSP on RPI

2021-04-24 Thread Bo Berglund
On Fri, 23 Apr 2021 10:01:21 -0400, schrotty  wrote:

>my RPI is running a headless raspian installation.
...
>i see the RTSP stream in the lower left corner of the screen at a very
>low frame rate (1 frame  /10s) and then i also see a mouse pointer above
>the RTSP stream area.

If the RPi computer is headless how can you view the output?


-- 
Bo Berglund
Developer in Sweden

___
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] Can ffmpeg be set to wait if a stream stop happens?

2021-04-24 Thread Bo Berglund
On Thu, 22 Apr 2021 14:22:17 +0200, Moritz Barsnick  wrote:

>Hej Bo,
>
>On Wed, Apr 21, 2021 at 16:59:10 +0200, Bo Berglund wrote:
>> But what I have noticed lately is that sometimes the stream it downloads from
>> stops feeding data for a few seconds (don't know for how long) and it seems 
>> like
>> ffmpeg at that times finishes up the output file and exits.
>
>ffmpeg shouldn't interrupt if the input stream just "stalls". It will
>interrupt if the stream server actually closes the connection. With
>HLS, where the URLs to open continuously change, ffmpeg will retry a
>certain number of times (IIRC) before giving up.
>
>> Is there a way to tell ffmpeg to stay online for that full amount even if the
>> stream pauses for some reason?
>
>I suspect it isn't "pausing". It would be practical to see a complete
>log output, of course. (You can generate them by using the "-report"
>option, but they may become large, unless you reduce the default report
>log level.)
>

I don't really know what happens but the hourly downloads are supposed to end at
about 4 min after the hour (using the -t argumant to ffmpeg) and the problem
videos end anywhere inside the hour.
It can happen after 5 min or 55 min into the recording...
The shortened videos are playable but suddenly end without warning.

I extended my download script so it will check after ffmpeg exits if the set
time has been reached or if it is more than 2 min short.
If it is short it modifies the output file name by adding extension .x.mp4
instead of .mp4, then it waits for 60 s and re-launches the ffmpeg command.
I log it too so I can see that it has triggered but no video file appears from
this call so I assume that the problem persists for longer than the minute I
wait...

In my log I see that the extra ffmpeg call has been executed 5 times since April
22, when I modified the script.
But no "rescue" video appeared so I guess at these times the outage was longer
than 60 seconds. When the next recording started the following hour it usually
worked.

Since I am unable to simulate the problem I think I have just to give up for the
moment...


-- 
Bo Berglund
Developer in Sweden

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