multiple instances of segmenter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

multiple instances of segmenter

Joe Konecny
I'm calling ffmpeg from crontab and using the segmenter.  Two instances
of ffmpeg are running at once.  One of the instances uses the segmenter
properly the other creates one large file.  Is there any way I can
make the segmenter work for each instance?

ffmpeg version 3.2.4-1build2 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (Ubuntu 6.3.0-8ubuntu1) 20170221
configuration: --prefix=/usr --extra-version=1build2
--toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
--incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping
--enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libebur128 --enable-libflite
--enable-libfontconfig --enable-libfreetype --enable-libfribidi
--enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-libpulse
--enable-librubberband --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
--enable-libtwolame --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid
--enable-libzmq --enable-libzvbi --enable-omx --enable-openal
--enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883
--enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264
--enable-shared


0 6     * * *   root    timeout 5h ffmpeg -i
"http://192.168.1.230/videostream.cgi?user=admin&pwd=blah&resolution=32&rate=0"
-map 0 -c copy -f segment -strftime 1 -segment_time 1200
-reset_timestamps 1 -segment_format mp4
"/opt/dev/00233s/734/hhsd/capture-\%Y-\%m-\%d-\%H-\%M-\%S.mp4"

0 6     * * *   root    timeout 5h ffmpeg -i
"http://192.168.1.8/videostream.cgi?user=admin&pwd=blah&resolution=32&rate=0"
-map 0 -c copy -f segment -strftime 1 -segment_time 1200
-reset_timestamps 1 -segment_format mp4
"/opt/dev/00233s/734/hhsd/lcapture-\%Y-\%m-\%d-\%H-\%M-\%S.mp4"
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: multiple instances of segmenter

Moritz Barsnick
On Mon, Jun 12, 2017 at 09:22:17 -0400, Joe Konecny wrote:
> I'm calling ffmpeg from crontab and using the segmenter.  Two instances
> of ffmpeg are running at once.  One of the instances uses the segmenter
> properly the other creates one large file.

> 0 6     * * *   root    timeout 5h ffmpeg -i

Sorry for being a bit blunt, but who in their right mind would execute
an arbitrary command as user "root"?

> "http://192.168.1.230/videostream.cgi?user=admin&pwd=blah&resolution=32&rate=0"
> "http://192.168.1.8/videostream.cgi?user=admin&pwd=blah&resolution=32&rate=0"

Hmm, I can't reproduce. Could it be that your second stream avoids
creating keyframes, or does it much less often than the first stream?
The segmenter doesn't cut until it encounters the next keyframe.

For us to understand the issue better, it may be necessary to update
your ffmpeg to latest git master (or at least 3.3.2), and to include
the full, uncut console output of the misbehaving command. (If you
can't redirect to a file from crontab, use the "-report" option, but
check for the size of the file first before posting here - it implies
an increased loglevel unless you set options using the environment
variable FFREPORT. Also, if your two ffmpegs launch simultaneously from
crontab, their report log file names will clash unless changed by such
an option.)

Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: multiple instances of segmenter

Joe Konecny
On 06/12/2017 10:03 AM, Moritz Barsnick wrote:

> On Mon, Jun 12, 2017 at 09:22:17 -0400, Joe Konecny wrote:
>> I'm calling ffmpeg from crontab and using the segmenter.  Two instances
>> of ffmpeg are running at once.  One of the instances uses the segmenter
>> properly the other creates one large file.
>
>> 0 6     * * *   root    timeout 5h ffmpeg -i
>
> Sorry for being a bit blunt, but who in their right mind would execute
> an arbitrary command as user "root"?
>
>> "http://192.168.1.230/videostream.cgi?user=admin&pwd=blah&resolution=32&rate=0"
>> "http://192.168.1.8/videostream.cgi?user=admin&pwd=blah&resolution=32&rate=0"
>
> Hmm, I can't reproduce. Could it be that your second stream avoids
> creating keyframes, or does it much less often than the first stream?
> The segmenter doesn't cut until it encounters the next keyframe.
>
> For us to understand the issue better, it may be necessary to update
> your ffmpeg to latest git master (or at least 3.3.2), and to include
> the full, uncut console output of the misbehaving command. (If you
> can't redirect to a file from crontab, use the "-report" option, but
> check for the size of the file first before posting here - it implies
> an increased loglevel unless you set options using the environment
> variable FFREPORT. Also, if your two ffmpegs launch simultaneously from
> crontab, their report log file names will clash unless changed by such
> an option.)
>
> Moritz

After researching this I think the issue is the frame rate.  I don't
understand how the frame rate relates to time and how to adjust it
with ffmpeg.  The frames come in maybe slower than ffmpeg thinks they
are.  So the result is that ffmpeg thinks not as much time has passed
as really has.  The video also plays back faster than real time.  Any
tips on how to make the stream and ffmpeg agree on the frame rate?
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: multiple instances of segmenter

Moritz Barsnick
On Tue, Jun 13, 2017 at 09:43:40 -0400, Joe Konecny wrote:
> After researching this I think the issue is the frame rate.  I don't
> understand how the frame rate relates to time and how to adjust it
> with ffmpeg.  The frames come in maybe slower than ffmpeg thinks they
> are.  So the result is that ffmpeg thinks not as much time has passed
> as really has.  The video also plays back faster than real time.  Any
> tips on how to make the stream and ffmpeg agree on the frame rate?

Any, not much we can say without seeing the complete, uncut console
output.

Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Loading...