Re: [FFmpeg-user] ffmpeg does nothing but using CPU

2020-10-22 Thread Cecil Westerhof
Edward Park  writes:

> Hi,
>
>>> just remove the redirection and look how to avoid that situation
>> 
>> Nope, I just added -nostdin.
>
>
> But doesn’t that redirection just count as that process having another
> file open? I think with ionice -c3 it might make a difference, unless
> -nostdin also is silent

It is a batch script. I do not want the output to the terminal, but I
do want the output in a log-file.

By using -nostdin I circumvent the possibility that ffmpeg expects
input from stdin. (Whay you do not want from a batch script.)

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
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] ffmpeg does nothing but using CPU

2020-10-22 Thread Nicolas George
Cecil Westerhof (12020-10-21):
> I think over 90% CPU just for waiting for input is a 'little'
> overkill.

ffmpeg busty-waits the commands: the command input is not designed for
interactive editing. The fact that it is not echoed was a hint.

Just copy-paste your command all at once and you will not notice any
load.

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature
___
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] ffmpeg does nothing but using CPU

2020-10-22 Thread Edward Park
Hi,

>> just remove the redirection and look how to avoid that situation
> 
> Nope, I just added -nostdin.


But doesn’t that redirection just count as that process having another file 
open? I think with ionice -c3 it might make a difference, unless -nostdin also 
is silent

Regards,
Ted Park

___
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] ffmpeg does nothing but using CPU

2020-10-21 Thread Cecil Westerhof
Reindl Harald  writes:

> Am 20.10.20 um 20:38 schrieb Cecil Westerhof:
>>  Enter command: |all |-1 [ ]
>>
>>  From this moment on ffmpeg does nothing but using CPU cycles
>
> and you don't realize that it waits for input?

I think over 90% CPU just for waiting for input is a 'little'
overkill.


> just remove the redirection and look how to avoid that situation

Nope, I just added -nostdin.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
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] ffmpeg does nothing but using CPU

2020-10-20 Thread Reindl Harald



Am 20.10.20 um 20:38 schrieb Cecil Westerhof:

 Enter command: |all |-1 [ ]

 From this moment on ffmpeg does nothing but using CPU cycles


and you don't realize that it waits for input?

just remove the redirection and look how to avoid that situation
___
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] ffmpeg does nothing but using CPU

2020-10-20 Thread Cecil Westerhof
Moritz Barsnick  writes:

> On Tue, Oct 20, 2020 at 19:33:05 +0200, Cecil Westerhof wrote:
>> When looking into the log-file I see it ends with:
>> Enter command: |all |-1 [ ]
>>
>> What could be happening here?
>
> This looks like something from stdin triggered interactive mode.
>
> On Tue, Oct 20, 2020 at 20:38:03 +0200, Cecil Westerhof wrote:
>> The command I use in the bash script is:
>> nice -n 10 ionice -c3   \
>>  ffmpeg -y  \
>> -i  "${inputfile}"  \
>> -vf scale=${xDimension}:-2  \
>> -crf28  \
>> -acodec libmp3lame  \
>> -qscale:a   9   \
>> -preset veryfast\
>> "${outputfile}" 2>"${logfile}"
>
> If you add the option "-nostdin", this mode cannot be triggered. Do try
> that. (You can then no longer interactively quit ffmpeg, of course.)

I will add that. It is in a batch, so I do not need the interactivity.
;-)

Does it matter where I put it? (I am thinking between -i and -vf.)

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
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] ffmpeg does nothing but using CPU

2020-10-20 Thread Moritz Barsnick
On Tue, Oct 20, 2020 at 19:33:05 +0200, Cecil Westerhof wrote:
> When looking into the log-file I see it ends with:
> Enter command: |all |-1 [ ]
>
> What could be happening here?

This looks like something from stdin triggered interactive mode.

On Tue, Oct 20, 2020 at 20:38:03 +0200, Cecil Westerhof wrote:
> The command I use in the bash script is:
> nice -n 10 ionice -c3   \
>  ffmpeg -y  \
> -i  "${inputfile}"  \
> -vf scale=${xDimension}:-2  \
> -crf28  \
> -acodec libmp3lame  \
> -qscale:a   9   \
> -preset veryfast\
> "${outputfile}" 2>"${logfile}"

If you add the option "-nostdin", this mode cannot be triggered. Do try
that. (You can then no longer interactively quit ffmpeg, of course.)

Cheers,
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] ffmpeg does nothing but using CPU

2020-10-20 Thread Cecil Westerhof
Carl Zwanzig  writes:

> On 10/20/2020 10:33 AM, Cecil Westerhof wrote:
>> What could be happening here?
>
> Please post some more info, at the least the complete command and the
> output of the last invocation in by the script.

The command I use in the bash script is:
nice -n 10 ionice -c3   \
 ffmpeg -y  \
-i  "${inputfile}"  \
-vf scale=${xDimension}:-2  \
-crf28  \
-acodec libmp3lame  \
-qscale:a   9   \
-preset veryfast\
"${outputfile}" 2>"${logfile}"

The value of xDimension was in this case 720.

I am using ffmpeg version 4.1.6 on Debian 10.

The log-file starts with:
ffmpeg version 4.1.6-1~deb10u1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --prefix=/usr --extra-version='1~deb10u1' 
--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-avisynth --enable-gnutls --enable-ladspa --enable-libaom 
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca 
--enable-libcdio --enable-libcodec2 --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-librsvg 
--enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr 
--enable-libspeex --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-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm 
--enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 
--enable-shared
  libavutil  56. 22.100 / 56. 22.100
  libavcodec 58. 35.100 / 58. 35.100
  libavformat58. 20.100 / 58. 20.100
  libavdevice58.  5.100 / 58.  5.100
  libavfilter 7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc55.  3.100 / 55.  3.100

Everything looks fine to me until the following:
frame=28999 fps= 26 q=34.0 size=   33024kB time=00:16:06.40 bitrate= 
279.9kbits/s speed=0.855x
frame=29003 fps= 26 q=34.0 size=   33024kB time=00:16:06.40 bitrate= 
279.9kbits/s speed=0.854x
frame=29010 fps= 26 q=34.0 size=   33024kB time=00:16:06.40 bitrate= 
279.9kbits/s speed=0.853x
frame=29016 fps= 26 q=34.0 size=   33024kB time=00:16:06.87 bitrate= 
279.8kbits/s speed=0.853x
frame=29022 fps= 26 q=34.0 size=   33024kB time=00:16:06.87 bitrate= 
279.8kbits/s speed=0.853x


Then there is quit a lot like this:
stream #0:
  keyframe=0
  duration=0.033
  dts=968.033  pts=968.067
  size=3318
[h264 @ 0x562755f52ac0] nal_unit_type: 1(Coded slice of a non-IDR picture), 
nal_ref_idc: 2
[libx264 @ 0x562755f46600] frame=29022 QP=29.87 NAL=0 Slice:B Poc:12  I:0   
 P:91   SKIP:1079 size=160 bytes
stream #1:
  keyframe=1
  duration=0.023
  dts=967.599  pts=967.599
  size=347
stream #1:
  keyframe=1
  duration=0.023
  dts=967.622  pts=967.622
  size=359

And it ends with this:
[h264 @ 0x562755f487c0] nal_unit_type: 1(Coded slice of a non-IDR picture), 
nal_ref_idc: 2
[libx264 @ 0x562755f46600] frame=29131 QP=34.84 NAL=2 Slice:B Poc:4   I:29  
 P:345  SKIP:782  size=1179 bytes
stream #0:
  keyframe=0
  duration=0.033
  dts=971.700  pts=971.700
  size=197
[h264 @ 0x562755f5c3c0] nal_unit_type: 1(Coded slice of a non-IDR picture), 
nal_ref_idc: 0
[libx264 @ 0x562755f46600] frame=29132 QP=35.33 NAL=0 Slice:B Poc:6   I:8   
 P:264  SKIP:892  size=722 bytes

Enter command: |all |-1 [ ]

From this moment on ffmpeg does nothing but using CPU cycles.


One interesting part: I had earlier the same problem with another
file. After cancelling and starting again, it was processed without a
problem.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
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] ffmpeg does nothing but using CPU

2020-10-20 Thread Carl Zwanzig

On 10/20/2020 10:33 AM, Cecil Westerhof wrote:

What could be happening here?


Please post some more info, at the least the complete command and the output 
of the last invocation in by the script.


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