Re: [FFmpeg-user] Help required in vp9 streaming on LAN using 2 Pass encoding

2020-10-14 Thread Moritz Barsnick
On Wed, Oct 14, 2020 at 15:34:56 +0500, USMAN AAMER wrote:
> I am working on vp9-RTP streaming over LAN and want to perform 2 pass
> encoding but unable to do so as it is not generating .sdp file.
>
> I am using the following command:
>
>   ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 1M -pass 1 -an -f null /dev/null
> && ffmpeg -i input.mp4 -c:v libvpx-vp9 -an -b:v 1M -pass 2 -c:a -f rtp
> rtp://192.168.12.5:5004

If you show us the complete, uncut console output, we can show you what
the error message means.

Apart from that:
> ffmpeg -i input.mp4 -c:v libvpx-vp9 -an -b:v 1M -pass 2 -c:a -f rtp 
> rtp://192.168.12.5:5004

a) You're saying not to use audio ("-an"), but specify "-c:a"
   nevertheless.
b) "-c:a" needs an additional parameter.

Moritz
___
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] Non-mandatory audio

2020-10-14 Thread Greg Oliver
On Wed, Oct 14, 2020 at 10:40 AM Will Boba  wrote:

> On 10/14/20 11:18 AM, Greg Oliver wrote:
> > sorry just realized I had to redirect stderr to get the results
> >
> > On Wed, Oct 14, 2020 at 10:17 AM Greg Oliver 
> wrote:
> >
> >> On Tue, Oct 13, 2020 at 8:50 AM Mar Andrés López 
> >> wrote:
> >>
> >>> Dear all,
> >>>
> >>>
> >>> I am using the following command to generate dash content from a file:
> >>>
> >>>
> >>> ffmpeg -i video.mp4 –r 25 -c:v libx264 -c:a aac -b:a 128k -ac 1 -ar
> 44100
> >>> -map v:0 -b:v:0 2M -map v:0 -b:v:1 145k -map v:0 -b:v:2 365k -map 0:a
> -f
> >>> dash dash.mpd
> >>>
> >>>
> >>> But sometimes I have streams with audio and sometimes not. Is there
> >>> anyway to make this command to not break if the video file does not
> >>> contains audio?
> >>>
> >>>
> >>> A lot of thanks
> >>>
> >> Assuming you are scripting this, probe the file first and check for
> >> audio.  Use a separate ffmpeg command line for eac result.
> >>
> >> ffprobe  | grep "Stream.*Audio"
> >> if [ $? -eq 0 ]; then
> >>  ffmpeg command with audio
> >> else
> >>  ffmpeg command without audio
> >> fi
> >>
> >
> > ffprobe  2>&1 | grep "Stream.*Audio"
> > if [ $? -eq 0 ]; then
> >  ffmpeg command with audio
> > else
> >  ffmpeg command without audio
> > fi
> > ___
> > 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".
>
>  From here: https://ffmpeg.org/ffmpeg-all.html
>
> "To map the video and audio streams from the first input, and using the
> trailing ?, ignore the audio mapping if no audio streams exist in the
> first input:
>
> ffmpeg -i INPUT -map 0:v -map 0:a? OUTPUT"
>
Even easier :)  Nice to know this exists.



>
> Will.
>
___
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] Non-mandatory audio

2020-10-14 Thread Will Boba


On 10/14/20 11:18 AM, Greg Oliver wrote:

sorry just realized I had to redirect stderr to get the results

On Wed, Oct 14, 2020 at 10:17 AM Greg Oliver  wrote:


On Tue, Oct 13, 2020 at 8:50 AM Mar Andrés López 
wrote:


Dear all,


I am using the following command to generate dash content from a file:


ffmpeg -i video.mp4 –r 25 -c:v libx264 -c:a aac -b:a 128k -ac 1 -ar 44100
-map v:0 -b:v:0 2M -map v:0 -b:v:1 145k -map v:0 -b:v:2 365k -map 0:a -f
dash dash.mpd


But sometimes I have streams with audio and sometimes not. Is there
anyway to make this command to not break if the video file does not
contains audio?


A lot of thanks


Assuming you are scripting this, probe the file first and check for
audio.  Use a separate ffmpeg command line for eac result.

ffprobe  | grep "Stream.*Audio"
if [ $? -eq 0 ]; then
 ffmpeg command with audio
else
 ffmpeg command without audio
fi



ffprobe  2>&1 | grep "Stream.*Audio"
if [ $? -eq 0 ]; then
 ffmpeg command with audio
else
 ffmpeg command without audio
fi
___
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".


From here: https://ffmpeg.org/ffmpeg-all.html

"To map the video and audio streams from the first input, and using the 
trailing ?, ignore the audio mapping if no audio streams exist in the 
first input:


ffmpeg -i INPUT -map 0:v -map 0:a? OUTPUT"


Will.


___
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] Non-mandatory audio

2020-10-14 Thread Greg Oliver
On Tue, Oct 13, 2020 at 8:50 AM Mar Andrés López 
wrote:

> Dear all,
>
>
> I am using the following command to generate dash content from a file:
>
>
> ffmpeg -i video.mp4 –r 25 -c:v libx264 -c:a aac -b:a 128k -ac 1 -ar 44100
> -map v:0 -b:v:0 2M -map v:0 -b:v:1 145k -map v:0 -b:v:2 365k -map 0:a -f
> dash dash.mpd
>
>
> But sometimes I have streams with audio and sometimes not. Is there anyway
> to make this command to not break if the video file does not contains audio?
>
>
> A lot of thanks
>

Assuming you are scripting this, probe the file first and check for audio.
Use a separate ffmpeg command line for eac result.

ffprobe  | grep "Stream.*Audio"
if [ $? -eq 0 ]; then
ffmpeg command with audio
else
ffmpeg command without audio
fi
___
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] Non-mandatory audio

2020-10-14 Thread Greg Oliver
sorry just realized I had to redirect stderr to get the results

On Wed, Oct 14, 2020 at 10:17 AM Greg Oliver  wrote:

> On Tue, Oct 13, 2020 at 8:50 AM Mar Andrés López 
> wrote:
>
>> Dear all,
>>
>>
>> I am using the following command to generate dash content from a file:
>>
>>
>> ffmpeg -i video.mp4 –r 25 -c:v libx264 -c:a aac -b:a 128k -ac 1 -ar 44100
>> -map v:0 -b:v:0 2M -map v:0 -b:v:1 145k -map v:0 -b:v:2 365k -map 0:a -f
>> dash dash.mpd
>>
>>
>> But sometimes I have streams with audio and sometimes not. Is there
>> anyway to make this command to not break if the video file does not
>> contains audio?
>>
>>
>> A lot of thanks
>>
>
> Assuming you are scripting this, probe the file first and check for
> audio.  Use a separate ffmpeg command line for eac result.
>
> ffprobe  | grep "Stream.*Audio"
> if [ $? -eq 0 ]; then
> ffmpeg command with audio
> else
> ffmpeg command without audio
> fi
>


ffprobe  2>&1 | grep "Stream.*Audio"
if [ $? -eq 0 ]; then
ffmpeg command with audio
else
ffmpeg command without audio
fi
___
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] Help required in vp9 streaming on LAN using 2 Pass encoding

2020-10-14 Thread USMAN AAMER
Hi,

I am working on vp9-RTP streaming over LAN and want to perform 2 pass
encoding but unable to do so as it is not generating .sdp file.

I am using the following command:

  ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 1M -pass 1 -an -f null /dev/null
&& ffmpeg -i input.mp4 -c:v libvpx-vp9 -an -b:v 1M -pass 2 -c:a -f rtp
rtp://192.168.12.5:5004

Kindly guide me that what mistake I am doing. or in what way I can perform
2 pass encoding.

Thanks
___
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] DNG images

2020-10-14 Thread Paul B Mahol
On Tue, Oct 13, 2020 at 10:06:37PM +0200, Michael Koch wrote:
> Am 11.10.2020 um 21:07 schrieb Michael Koch:
> > Am 11.10.2020 um 20:56 schrieb Paul B Mahol:
> > > On Sun, Oct 11, 2020 at 07:37:25PM +0200, Michael Koch wrote:
> > > > I tested all 4 DNG images again with the latest FFmpeg version
> > > > (Gyan's build
> > > > from today).
> > > > I tested with and without zscale filter. All tests failed. When
> > > > testing with
> > > > IrfanView, all DNG input images seem to be ok.
> > > > 
> > > Your issues is that you do not know how to use zscale properly.
> > > 
> > > DNG decoding is just fine, what is missing is colorspace stuff in
> > > swscale,
> > > for proper display.
> > 
> > Can you please give an example for the correct zscale options?
> > 
> 
> Finally I found a command line that converts DNG (from Adobe DNG converter)
> to JPG with a more or less acceptable result:
> 
> ffmpeg -i IMG_3459.dng -vf 
> zscale=t=linear,tonemap=gamma:param=1.85,tonemap=linear:param=64,colorlevels=rimin=0.0:gimin=0.0:bimin=0.0:rimax=0.53:gimax=1:bimax=0.57

This is simple wrong. You do not set output trc at all. Make sure to use right
input pixel format prior to calling zscale as it does not support bayer formats.
___
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] Replacing stream input when using segment time option

2020-10-14 Thread James Fowkes
Hello all,

We have an application using ffmpeg to record an RTSP stream. We split this
stream into timestamped segments using the following options:

ffmpeg -f segment -segment_time 60 -strftime 1 "+%Y-%m-%d_%H-%M-%S.mp4"

We now have a requirement to replace recordings made using this stream with
a placeholder blank video under certain conditions (for privacy reasons).
This needs to be recorded using the same segment time options so that later
post- processing can treat the files the same and not have to know which is
"real" video and which is placeholder. The switchover does not have to be
seamless, it's OK to stop one ffmpeg process and start another.

I'm comfortable with ffmpeg basics, but this is a bit beyond my knowledge.
I'm not sure of the best way to do things.

Is the easiest way to have one instance of ffmpeg acting as a streaming
server for the placeholder video (using -stream_loop maybe?) and then
switch to recording from this stream when required? Or am I overthinking
this?

Thanks,
___
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] Watermark on RTSP h264 stream

2020-10-14 Thread HAN Hao
Hi all,

I want to place a watermark(png/jpeg file) diagonally across a RTSP h264 stream 
with a certain level of transparency and output it into a mp4 file. May I know 
how can I do this using ffmpeg?

Thanks!

Regards,
Han Hao
__

Han Hao
Engineer
UAV Business Unit
Engineering & Development Centre

ST Engineering Aerospace Ltd.
540 Airport Road, Paya Lebar
Singapore 539938
T: (65) 6287   D: (65) 6380 6546
F: (65) 6284 3146
https://www.stengg.com/

[Email Banner - ST Engineering]

This email is confidential and may also be privileged. If this email has been 
sent to you in error, please delete it immediately and notify us. Please do not 
copy, distribute, or disseminate part or whole of this email if you are not the 
intended recipient or if you have not been authorized to do so. We reserve the 
right, to the extent and under circumstances permitted by applicable laws, to 
retain, monitor, and intercept email messages to and from our systems. Thank 
you.
___
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".