Re: [FFmpeg-user] Converting BT2020 HVEC Videos to H.264 without Color Washout

2021-03-25 Thread Pavel Koshevoy
On Thu, Mar 25, 2021 at 5:59 PM Pavel Koshevoy  wrote:

>
>
> On Thu, Mar 25, 2021, 16:34 Craig L.  wrote:
>
>> I think I tried exactly that based upon this stackoverflow question:
>>
>>
>> https://stackoverflow.com/questions/64981984/ffmpeg-transcode-uhd-h265-to-sdr-h264-without-color-loss
>>
>> The example in that post uses this command:
>>
>> |ffmpeg -i 4K.ts -vf
>> zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p
>>
>> -c:v h264 -crf 19 -preset ultrafast output.mp4 |
>>
>
>
> I think tonemap should be upstream from the 2nd zscale filter
>
>
>

Also, you may still need to specify the input color_trc, primaries,
colorspace, range  for the 1st zscale filter ... in case your source
doesn't signal those.

something like this:

zscale=tin=smpte2084:pin=2020:min=2020_ncl:rin=limited:t=linear:npl=100,format=gbrpf32le,tonemap=tonemap=hable:desat=0,zscale=p=bt709,m=bt709:t=bt709:r=limited,format=yuv420p
___
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] Converting BT2020 HVEC Videos to H.264 without Color Washout

2021-03-25 Thread Pavel Koshevoy
On Thu, Mar 25, 2021, 16:34 Craig L.  wrote:

> I think I tried exactly that based upon this stackoverflow question:
>
>
> https://stackoverflow.com/questions/64981984/ffmpeg-transcode-uhd-h265-to-sdr-h264-without-color-loss
>
> The example in that post uses this command:
>
> |ffmpeg -i 4K.ts -vf
> zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p
>
> -c:v h264 -crf 19 -preset ultrafast output.mp4 |
>


I think tonemap should be upstream from the 2nd zscale filter
___
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] Converting BT2020 HVEC Videos to H.264 without Color Washout

2021-03-25 Thread Craig L.

Sorry. I don't think I responded to this correctly before.


I think I tried exactly that based upon this stackoverflow question:

https://stackoverflow.com/questions/64981984/ffmpeg-transcode-uhd-h265-to-sdr-h264-without-color-loss 



The example in that post uses this command:

|ffmpeg -i 4K.ts -vf 
zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p 
-c:v h264 -crf 19 -preset ultrafast output.mp4 |


Which I thought might be my solution but when I tried it, it ended up 
making the video too red.


Does that look like the route I need to take?

- Craig

On 3/25/21 4:09 PM, Pavel Koshevoy wrote:

On Thu, Mar 25, 2021 at 9:27 AM Craig L.  wrote:


I recently started finding certain videos were washing out upon H.264
conversion.


After doing some research I found that if I added -color_primaries
bt2020 to the command, the color would come out correctly, but ONLY if
the video was played in Quicktime.  When played in Chrome, it would look
washed out.

Here is a link to a screengrab showing the video in quicktime on the
left and in Chrome on the right.  Same video.


*https://snipboard.io/N8nYv0.jpg* 




After much research I can't figure out how to handle this?

What is the correct way to convert these videos that I suppose are 10
bit HDR  into H.264 so that they will play correctly in Chrome, etc.



This is my current command:

/usr/local/bin/ffmpeg  -i "156237-Video2.mov"   -filter_complex
"scale=480:270"  -color_trc smpte2084 -color_primaries bt2020 -c:v
libx264 -profile:v high -pix_fmt yuv420p -level 5.1 -preset ultrafast
-movflags faststart   -vsync 2  -c:a aac -b:a 128k -y
156237-Video2.mov-16-9-1616621202.mp4






For best possible player compatibility you really need to convert from
HDR10 to SDR (bt709).

To do that you need to use either colorspace or zscale ffmpeg filter.  The
colorspace filter didn't support HLG the last time I checked, but that
wouldn't matter if your source is HDR10, not HLG.
Since you'd be converting from high dynamic range to standard dynamic range
you would also need to use the tonemap filter.

There is probably a LUT file somewhere that implements HDR10 -> BT709 color
space conversion and tone mapping in one step, skipping zscale/tonemap.  If
you had such LUT you could use it with lut3d filter.

Pavel.
___
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] Converting BT2020 HVEC Videos to H.264 without Color Washout

2021-03-25 Thread Craig L.

I think I tried exactly that based upon this stackoverflow question:

https://stackoverflow.com/questions/64981984/ffmpeg-transcode-uhd-h265-to-sdr-h264-without-color-loss

The example in that post uses this command:

|ffmpeg -i 4K.ts -vf 
zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p 
-c:v h264 -crf 19 -preset ultrafast output.mp4 |


Which I thought might be my solution but when I tried it, it ended up 
making the video too red.


Does that look like the route I need to take?

- Craig
___
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] Converting BT2020 HVEC Videos to H.264 without Color Washout

2021-03-25 Thread Pedro Vivas Hernández
Lurking. Important. Thank you.

On Thu, Mar 25, 2021 at 5:17 PM Pavel Koshevoy  wrote:

> On Thu, Mar 25, 2021 at 9:27 AM Craig L.  wrote:
>
> > I recently started finding certain videos were washing out upon H.264
> > conversion.
> >
> >
> > After doing some research I found that if I added -color_primaries
> > bt2020 to the command, the color would come out correctly, but ONLY if
> > the video was played in Quicktime.  When played in Chrome, it would look
> > washed out.
> >
> > Here is a link to a screengrab showing the video in quicktime on the
> > left and in Chrome on the right.  Same video.
> >
> >
> > *https://snipboard.io/N8nYv0.jpg* 
> >
> >
> >
> >
> > After much research I can't figure out how to handle this?
> >
> > What is the correct way to convert these videos that I suppose are 10
> > bit HDR  into H.264 so that they will play correctly in Chrome, etc.
> >
> >
> >
> > This is my current command:
> >
> > /usr/local/bin/ffmpeg  -i "156237-Video2.mov"   -filter_complex
> > "scale=480:270"  -color_trc smpte2084 -color_primaries bt2020 -c:v
> > libx264 -profile:v high -pix_fmt yuv420p -level 5.1 -preset ultrafast
> > -movflags faststart   -vsync 2  -c:a aac -b:a 128k -y
> > 156237-Video2.mov-16-9-1616621202.mp4
> >
> >
> >
> >
> >
>
> For best possible player compatibility you really need to convert from
> HDR10 to SDR (bt709).
>
> To do that you need to use either colorspace or zscale ffmpeg filter.  The
> colorspace filter didn't support HLG the last time I checked, but that
> wouldn't matter if your source is HDR10, not HLG.
> Since you'd be converting from high dynamic range to standard dynamic range
> you would also need to use the tonemap filter.
>
> There is probably a LUT file somewhere that implements HDR10 -> BT709 color
> space conversion and tone mapping in one step, skipping zscale/tonemap.  If
> you had such LUT you could use it with lut3d filter.
>
> Pavel.
> ___
> 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".

-- 
yoctobio.me
--
Sent from a mobile phone.
___
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] Converting BT2020 HVEC Videos to H.264 without Color Washout

2021-03-25 Thread Pavel Koshevoy
On Thu, Mar 25, 2021 at 9:27 AM Craig L.  wrote:

> I recently started finding certain videos were washing out upon H.264
> conversion.
>
>
> After doing some research I found that if I added -color_primaries
> bt2020 to the command, the color would come out correctly, but ONLY if
> the video was played in Quicktime.  When played in Chrome, it would look
> washed out.
>
> Here is a link to a screengrab showing the video in quicktime on the
> left and in Chrome on the right.  Same video.
>
>
> *https://snipboard.io/N8nYv0.jpg* 
>
>
>
>
> After much research I can't figure out how to handle this?
>
> What is the correct way to convert these videos that I suppose are 10
> bit HDR  into H.264 so that they will play correctly in Chrome, etc.
>
>
>
> This is my current command:
>
> /usr/local/bin/ffmpeg  -i "156237-Video2.mov"   -filter_complex
> "scale=480:270"  -color_trc smpte2084 -color_primaries bt2020 -c:v
> libx264 -profile:v high -pix_fmt yuv420p -level 5.1 -preset ultrafast
> -movflags faststart   -vsync 2  -c:a aac -b:a 128k -y
> 156237-Video2.mov-16-9-1616621202.mp4
>
>
>
>
>

For best possible player compatibility you really need to convert from
HDR10 to SDR (bt709).

To do that you need to use either colorspace or zscale ffmpeg filter.  The
colorspace filter didn't support HLG the last time I checked, but that
wouldn't matter if your source is HDR10, not HLG.
Since you'd be converting from high dynamic range to standard dynamic range
you would also need to use the tonemap filter.

There is probably a LUT file somewhere that implements HDR10 -> BT709 color
space conversion and tone mapping in one step, skipping zscale/tonemap.  If
you had such LUT you could use it with lut3d filter.

Pavel.
___
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 bottleneck, thread-safe ?

2021-03-25 Thread Carl Eugen Hoyos
Am Do., 25. März 2021 um 17:04 Uhr schrieb :

> 76 vCPUs (Skylake Gold 6161 v5 bi-pro 2.2Ghz) | 304 GB | cc3.19xlarge.4 | OBS 
> CentOS 7.7

> o   /home/local/ffmpeg_build/bin/ffmpeg -i 
> /data/testjulien/iss_ep01telco_DT_video360_h265_7680x7680_10b_250Mbps_stereo_v001.mp4
>  -maxrate 25M -bufsize 200M  -b:v 25000k -c:v libx265 -pix_fmt yuvj420p -c:a 
> copy  -f hls -hls_time 4 -hls_flags independent_segments -hls_list_size 5 
> -strftime 1 -hls_segment_filename 
> /data/www/httpsvmmalo/test_capa/file_%m-%d_%H-%M-%S.m4s 
> /data/www/httpsvmmalo/test_capa/stream.m3u8

When asking questions on this mailing list, you are expected to
provide the command
line you tested together with the complete, uncut console output,
attachments are
rarely useful-

> o   ffmpeg version 4.3.2

Please test current FFmpeg git head.

In general, video decoding can be parallelized (although restrictions
exist), encoding
parallelization has limitations, it is therefore likely that you found
a bottleneck of x265.
But to be able to clearly decide if this is true, you can first test
decoding speed (only),
then test encoding from testsrc2 (which should be faster than decoding
an 8k video),
and don't use hls muxing to rule out any bottleneck there.

> Ce message et ses pieces jointes peuvent contenir des informations 
> confidentielles

Please remove this nonsense from emails sent to a public mailing list.

I wonder what "thread-safe" means in your subject...

Carl Eugen

PS:
Before you ask the x265 developers why they are not maxing out your CPUs:
There was a patch once that allowed the x265 encoder to use more cpu cycles
but since it reduced encoding speed it was decided not to merge it...
___
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] Continuous live stream capture

2021-03-25 Thread Bo Berglund
On Mon, 22 Mar 2021 13:03:01 +, adam smith via ffmpeg-user
 wrote:

>Hi group, hope everyone is good,
>
>I am trying to capture an srt stream using ffmpeg as a caller and everything 
>is going well, just a couple of edge cases I would like to resolve that I 
>think are related.
>
>I would like the capture to continue even if the source stream is unavailable 
>for a time. I don’t mean just keep the connection open and reconnect. I need 
>the timing to remain constant, so the output should have gaps in it where the 
>source was unavailable.
>
>I have tried using lavfi -i color=color=blue:size=1920x1080 as an input and 
>then overlaying the SRT stream. But ffmpeg will wait for the stream data to 
>arrive before starting and will pause if the stream becomes unavailable, 
>continuing when the SRT is available again. Basically the same behaviour as 
>without the colour input.
>
>The other issue (which will probably go away if the first issue is resolved, 
>is stopping it :)
>I was setting a record duration using the -t option, but removed it as with 
>current behaviour the duration may never be reached and it will hang around 
>forever waiting for the stream to come back and finish.
>The new plan was to use a terminator script outside of ffmpeg that waits until 
>a set time and then sends the pid.kill.
>
>The terminator works great when the source stream is still active so I can 
>dynamically update the end time; but if the source stream has already stopped, 
>ffmpeg will continue to hang as it needs another pid.kill to stop, which in 
>turn stops it from muxing the mp4 output.
>I have a sort of workaround for this where the mp4 is written as a fragmented 
>mp4 and so doesn’t need the mux stage, but I would prefer to stop it nicely so 
>that I can use other output formats if I want.
>
>Latest command used is below.
>It includes the colour input and overlay which is not acting in the way that I 
>wanted.
>It includes the fragmented mp4 flags which are showing me love but I would 
>prefer not to need.
>I can include a console output if helps but there is no actual error, its just 
>me not knowing how to achieve what I want ;)
>Please ignore the audio filter, I know it could be simpler but this is 
>automated and is set up to cope with random inputs so follows a pattern.
>Please ignore the Tee Muxer, again that is automated and is used because there 
>can be more than one output destination for each.
> 
> 
>
>Thanks in advance for any advice.

Maybe not exactly what you need but...

I have a script that downloads the streaming video starting immediately and
running for a specific duration.
It is executed in an at job on Ubuntu and the at command looks like this:

timeout --signal=2 66m getmsnbcstreamyt 2021-03-25_input13.mp4
The job is created using this:

echo "timeout --signal=2 66m getmsnbcstreamyt 2021-03-25_input13.mp4" | at 17:59


So this process starts at the time set for the at command and ends after 66
minutes in this case.

The script getmsnbcstreamyt uses youtube-dl, which in turn uses ffmpeg.

If I start the script interactively I see lots of féedback from the download
progress and can break it using either Ctrl-C or q from the keyboard, in both
cases youtube-dl exits after finishing the output file by adding the moov atom
and changing the name by removing the .part ending.

Obviously I cannot send q to the process from within the at job so I use the
timeout function with the signal argument --signal=2
And this works just fine.

You could possibly run your script as is but package it inside a timeout call
such that ffmpeg is at least exiting after the timeout has expired?


-- 
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] Split stream in equal chunks

2021-03-25 Thread Marian Klymov
Sorry, I've copied a message from #ffmpeg IRC channel which suggested using
pastebin for ffmpeg commands. This is the command that was the closest to
what I want but still doesn't always work.

ffmpeg -i rtmp://localhost/live/$name -s 1920x1080 -codec:a aac -ar
48000 -ac 1 -codec:v libx264 -r 25 -g 1 -f stream_segment
-segment_time 30 -reset_timestamps 1 -segment_atclocktime 1 -strftime
1 /var/rec/high%H%M%S.ts;

Example of output files:
1) ffprobe C:\dev\records_test\high162001.ts
ffprobe version 4.3.2-2021-02-27-full_build-www.gyan.dev Copyright (c)
2007-2021 the FFmpeg developers
  built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static
--disable-w32threads --disable-autodetect --enable-fontconfig
--enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp
--enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt
--enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray
--enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi
--enable-librav1e --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx
--enable-libass --enable-frei0r --enable-libfreetype
--enable-libfribidi --enable-libvidstab --enable-libvmaf
--enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid
--enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va
--enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme
--enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb
--enable-libmp3lame --enable-libshine --enable-libtheora
--enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc
--enable-libgsm --enable-libopencore-amrnb --enable-libopus
--enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b
--enable-libflite --enable-libmysofa --enable-librubberband
--enable-libsoxr --enable-chromaprint
  libavutil  56. 51.100 / 56. 51.100
  libavcodec 58. 91.100 / 58. 91.100
  libavformat58. 45.100 / 58. 45.100
  libavdevice58. 10.100 / 58. 10.100
  libavfilter 7. 85.100 /  7. 85.100
  libswscale  5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc55.  7.100 / 55.  7.100
Input #0, mpegts, from 'C:\dev\records_test\high162001.ts':
  Duration: 00:00:28.66, start: 1.40, bitrate: 18837 kb/s
  Program 1
Metadata:
  service_name: Service01
  service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B),
yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr,
90k tbn, 50 tbc
Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F),
48000 Hz, mono, fltp, 4 kb/s

This was the start of the stream, so it's ok to have it not 30.00 seconds
I'm omitting uninteresting lines for next paragraphs - only bitrate
and duration are different.

2) Input #0, mpegts, from 'C:\dev\records_test\high162029.ts':
  Duration: 00:00:30.04, start: 1.40, bitrate: 17092 kb/s - 29 in
name for some reason. And also not 30.00.

3) 2 more chunks with 30.00
4) Input #0, mpegts, from 'C:\dev\records_test\high162200.ts':
  Duration: 00:00:29.96, start: 1.40, bitrate: 16452 kb/s

I don't care about file size. I want to always have 30.00 seconds. Without
specifying -g 1 I'm usually getting 30.06-30.07 (this is what ffprobe shows
me).

I've also tried keyint=1 and force_key_frames expr:gte(t,n_forced*30)

I'm testing this inside a very simple Docker container based on Debian
Buster. ffmpeg is triggered by nginx if it matters at all.

# ffmpeg -version
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
libavdevice

Re: [FFmpeg-user] Split stream in equal chunks

2021-03-25 Thread Carl Eugen Hoyos
Am Do., 25. März 2021 um 08:03 Uhr schrieb Marian Klymov :
>
> I want to receive rtmp stream (using nginx-rtmp module), transcode
> it and save it in chunks.
> I would like to have splitting at specific times and to have all chunks
> equal to 30.00 seconds (except first and last obviously). I've tried
> playing with different parameters. segment_atclocktime looked like
> it should do what I want but it creates chunks of different sizes.

Either I misunderstand or this makes no sense:
You write that you want 30-second-chunks which is not unusual I
guess. With each real encoder (like x264), each 30-second-chunk
has a different size (in bytes). Then you write that you expect that
your chunks all have the same size.
You would that be possible?

Generally, when asking questions here, always post the command
line you used together with the complete, uncut console output in
your email, do not use external resources.

Carl Eugen
___
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] Split stream in equal chunks

2021-03-25 Thread Marian Klymov
I want to receive rtmp stream (using nginx-rtmp module), transcode it and
save it in chunks.
I would like to have splitting at specific times and to have all chunks
equal to 30.00 seconds (except first and last obviously). I've tried
playing with different parameters. segment_atclocktime looked like it
should do what I want but it creates chunks of different sizes. Originally
I thought that this is because of keyframes, but even with -g 1 it fails
sometimes.
My last try looks like this https://pastebin.com/raw/dYED4YXQ Is it
possible to do such thing with ffmpeg or do I need to implement some
heuristics with trying to resplit chunks outside?
___
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".