Re: [FFmpeg-user] Non-monotonous DTS in output stream

2021-02-10 Thread Pieter Venter
I've found out some new info, but worried about this top post etiquette.
Please help if I'm doing this wrong.

On Tue, Feb 9, 2021 at 7:19 PM Pieter Venter  wrote:

> Hello,
>
> I'm trying to process some AVI files that originally came from a Sony
> Handycam to mp4 and managed to get that to work.
> However, a couple of files are giving me trouble and I've spent days
> trying to figure it out.
>
> I'm new here but have done my homework as best I could:
> * I downloaded the latest ffmpeg build I could find.
> * Searched the forums for solutions/switches (-af
> aresample=async=1, -fflags +igndts, -fflags +sortdts).
> * Tried other tools to extract the audio.
> * Past full command and output for your reference.
> * Will try to not "top post". That seems to be a thing here.
>
> If I run the following command, audio is processed correctly up to about
> the 43s mark, then becomes slower than expected (i.e. voices are deep,
> audio in "slow mo" but video plays normal).
>
> The original file plays correctly with VLC and Video on Linux. It does not
> play correctly with mplayer (same slowed down audio issue past 43 seconds).
>
> fmpeg -i input.avi -c:v libx264 -preset fast -crf 21 output.mp4
> ffmpeg version N-55863-g9f38fac053-static
> https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2021 the FFmpeg
> developers
>   built with gcc 8 (Debian 8.3.0-6)
>   configuration: --enable-gpl --enable-version3 --enable-static
> --disable-debug --disable-ffplay --disable-indev=sndio
> --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r
> --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom
> --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype
> --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libopenjpeg --enable-librubberband --enable-libsoxr
> --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus
> --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc
> --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
> --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi
> --enable-libzimg
>   libavutil  56. 64.100 / 56. 64.100
>   libavcodec 58.119.100 / 58.119.100
>   libavformat58. 65.101 / 58. 65.101
>   libavdevice58. 11.103 / 58. 11.103
>   libavfilter 7.100.100 /  7.100.100
>   libswscale  5.  8.100 /  5.  8.100
>   libswresample   3.  8.100 /  3.  8.100
>   libpostproc55.  8.100 / 55.  8.100
> [avi @ 0x620c340] Switching to NI mode, due to poor interleaving
> Input #0, avi, from 'input.avi':
>   Duration: 00:07:00.00, start: 0.00, bitrate: 28806 kb/s
> Stream #0:0: Video: dvvideo, yuv420p, 720x576 [SAR 16:15 DAR 4:3],
> 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
> Stream #0:1: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s
> Stream #0:2: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s
> Stream mapping:
>   Stream #0:0 -> #0:0 (dvvideo (native) -> h264 (libx264))
>   Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
> Press [q] to stop, [?] for help
> [libx264 @ 0x6233580] using SAR=16/15
> [libx264 @ 0x6233580] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
> AVX FMA3 BMI2 AVX2
> [libx264 @ 0x6233580] profile High, level 3.0, 4:2:0, 8-bit
> [libx264 @ 0x6233580] 264 - core 161 r3040 35417dc - H.264/MPEG-4 AVC
> codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options:
> cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 psy=1
> psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
> cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12
> lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0
> bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
> b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25
> scenecut=40 intra_refresh=0 rc_lookahead=30 rc=crf mbtree=1 crf=21.0
> qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
> Output #0, mp4, to 'output.mp4':
>   Metadata:
> encoder : Lavf58.65.101
> Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(bottom coded
> first (swapped)), 720x576 [SAR 16:15 DAR 4:3], q=2-31, 25 fps, 12800 tbn
> Metadata:
>   encoder : Lavc58.119.100 libx264
> Side data:
>   cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
> Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz, stereo,
> fltp, 128 kb/s
> Metadata:
>   encoder : Lavc58.119.100 aac
> frame=10500 fps=116 q=-1.0 Lsize=  168876kB time=00:07:00.02
> bitrate=3293.7kbits/s speed=4.63x
> video:158898kB audio:9545kB subtitle:0kB other streams:0kB global
> headers:0kB muxing overhead: 0.257381%
> [libx264 @ 0x6233580] frame I:93Avg QP:20.65  size: 54098
> [libx264 @ 0x6233580] frame P:3607  Avg QP:23.10  size: 22302
> [libx264 @ 0x6233580] frame B:6800  Avg QP:24.65  size: 11358
> [libx264 @ 0x6233580] consecutive B-frames: 13.4%  0.6%  0.7% 

Re: [FFmpeg-user] "Non-monotonous DTS in output stream" error, previous and current values are equal

2020-04-15 Thread Dennis Mungai
Try this: Add -dts_delta_threshold 0 *before* the input and retest.

On Sun, 23 Feb 2020, 16:27 Crazy Red Elephant via ffmpeg-user, <
ffmpeg-user@ffmpeg.org> wrote:

> I tried adding "-fflags +ignpts" before input but that didn't help, there
> are still DTS warnings, however, this time the values are not equal for
> some reason (except the first pair):
>
> [mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0;
> previous: 6030, current: 6030; changing to 6031. This may result in
> incorrect timestamps in the output file.
> [mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0;
> previous: 180204, current: 177177; changing to 180205. This may result in
> incorrect timestamps in the output file.
> [hls @ 01a901cc9380] Opening 'crypto:part1.ts' for reading
> [mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0;
> previous: 360384, current: 357357; changing to 360385. This may result in
> incorrect timestamps in the output file.
> [mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0;
> previous: 540565, current: 537538; changing to 540566. This may result in
> incorrect timestamps in the output file.
> [hls @ 01a901cc9380] Opening 'crypto:part2.ts' for reading
> [mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0;
> previous: 720745, current: 717718; changing to 720746. This may result in
> incorrect timestamps in the output file.
> [mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0;
> previous: 900925, current: 897898; changing to 900926. This may result in
> incorrect timestamps in the output file.
>
> ‐‐‐ Original Message ‐‐‐
> On Sunday, February 23, 2020 3:15 PM, Crazy Red Elephant via ffmpeg-user <
> ffmpeg-user@ffmpeg.org> wrote:
>
> > Guys please, I still have not found a solution and I'm so desperate :-(
> I asked this question on multiple sites and nobody is helping...
> >
> > ‐‐‐ Original Message ‐‐‐
> > On Wednesday, February 12, 2020 12:44 AM, Ted Park
> kumowoon1...@gmail.com wrote:
> >
> > > > 4.  A general question - is there any difference between (a)
> decrypting all .ts parts separately, then concatenating them into one big
> .ts file and remuxing it into .mp4 and (b) concatenating all encrypted .ts
> parts first, then decrypting the big .ts result file and then remuxing it
> into .mp4?
> > >
> > > This makes me think you are not decrypting the segments correctly, I
> had understood the specs to mean that if it isn’t specified, the IV needs
> to be incremented for each segment (so you would need to use
> 0x for the first segment,
> 0x0001 for the second, etc. based on the
> initial media sequence number of 0).
> > > I don’t think the missing picture message at the end is unexpected,
> since the stream was cut arbitrarily after all, this is the result of my
> attempt at decrypting each segment with openssl and using cat to put them
> together (ffmpeg wasn’t used, except to test the file).
> > > https://media.kumowoon1025.com/videos/cat.ts
> https://media.kumowoon1025.com/videos/cat.ts
> > > 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".
>
>
> ___
> 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] "Non-monotonous DTS in output stream" error, previous and current values are equal

2020-04-06 Thread Mark Filipak

On 04/06/2020 10:01 AM, Crazy Red Elephant via ffmpeg-user wrote:

So what do you think, Mark? I also noticed that if I use 1.2 version of ffmpeg there are 
no DTS errors and no dropping frames. The result file though acts weird when I try to 
create gifs from it for example. My gif creation software detects like 15 fps in it while 
"normal" videos give me the same amount fps in the gif as there are in the 
actual video. Not sure what's so special in version 1.2. Maybe it's because in old 
versions ffmpeg doesn't try to fix these timestamps or so... I still don't understand 
what's wrong with the source files :-(


Sorry, CRE, I don't know anything about animated GIFs and I'm way to ignorant about ffmpeg. I can't 
help. I wish I could. At the rate of progress I'm making, maybe sometime after 2022. :-(


- Mark.

PS: I don't even know how to get the ffmpeg version. Look:

>ffmpeg -version
ffmpeg version N-94664-g0821bc4eee Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190807
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls 
--enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype 
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg 
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora 
--enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 
--enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp 
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex 
--enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid 
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt

libavutil  56. 33.100 / 56. 33.100
libavcodec 58. 55.101 / 58. 55.101
libavformat58. 31.104 / 58. 31.104
libavdevice58.  9.100 / 58.  9.100
libavfilter 7. 58.101 /  7. 58.101
libswscale  5.  6.100 /  5.  6.100
libswresample   3.  6.100 /  3.  6.100
libpostproc55.  6.100 / 55.  6.100


‐‐‐ Original Message ‐‐‐
On Thursday, April 2, 2020 10:14 PM, Mark Filipak 
 wrote:


Thanks, CRE. Now I know.

On 04/01/2020 09:38 AM, Crazy Red Elephant via ffmpeg-user wrote:


Hi Mark, the option is called "Fix bitstream timing info", it's in the "Timestamps and default 
duration" box which is on the right side of the "Input" tab...
On Sunday, March 15, 2020 3:41 PM, Mark Filipak 
markfilipak.windows+ffm...@gmail.com wrote:


On 03/15/2020 09:02 AM, Crazy Red Elephant via ffmpeg-user wrote:


Are they actually disruptive, or could you just keep the original stream as is, 
knowing 1 out of 120 frames or something will be dropped when playing back?


To me, yes. I know some other users also reported something about playback 
issues numerous times but the stream provider doesn't seem to care.
I think I mentioned before that remuxing the video with MKVToolNix and the "generate 
timestamps" option checked...


Can you help me find the "generate timestamps" option? I can't find it. I'd like to 
see what it does with a VOB that has 8 PGCs that are okay, but the 9th & 10th PGCs have 
audio in advance of video by about 4400ms.


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


___
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-monotonous DTS in output stream" error, previous and current values are equal

2020-04-06 Thread Crazy Red Elephant via ffmpeg-user
So what do you think, Mark? I also noticed that if I use 1.2 version of ffmpeg 
there are no DTS errors and no dropping frames. The result file though acts 
weird when I try to create gifs from it for example. My gif creation software 
detects like 15 fps in it while "normal" videos give me the same amount fps in 
the gif as there are in the actual video. Not sure what's so special in version 
1.2. Maybe it's because in old versions ffmpeg doesn't try to fix these 
timestamps or so... I still don't understand what's wrong with the source files 
:-(

‐‐‐ Original Message ‐‐‐
On Thursday, April 2, 2020 10:14 PM, Mark Filipak 
 wrote:

> Thanks, CRE. Now I know.
>
> On 04/01/2020 09:38 AM, Crazy Red Elephant via ffmpeg-user wrote:
>
> > Hi Mark, the option is called "Fix bitstream timing info", it's in the 
> > "Timestamps and default duration" box which is on the right side of the 
> > "Input" tab...
> > On Sunday, March 15, 2020 3:41 PM, Mark Filipak 
> > markfilipak.windows+ffm...@gmail.com wrote:
> >
> > > On 03/15/2020 09:02 AM, Crazy Red Elephant via ffmpeg-user wrote:
> > >
> > > > > Are they actually disruptive, or could you just keep the original 
> > > > > stream as is, knowing 1 out of 120 frames or something will be 
> > > > > dropped when playing back?
> > > >
> > > > To me, yes. I know some other users also reported something about 
> > > > playback issues numerous times but the stream provider doesn't seem to 
> > > > care.
> > > > I think I mentioned before that remuxing the video with MKVToolNix and 
> > > > the "generate timestamps" option checked...
> > >
> > > Can you help me find the "generate timestamps" option? I can't find it. 
> > > I'd like to see what it does with a VOB that has 8 PGCs that are okay, 
> > > but the 9th & 10th PGCs have audio in advance of video by about 4400ms.
>
> 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] "Non-monotonous DTS in output stream" error, previous and current values are equal

2020-04-02 Thread Mark Filipak

Thanks, CRE. Now I know.

On 04/01/2020 09:38 AM, Crazy Red Elephant via ffmpeg-user wrote:

Hi Mark, the option is called "Fix bitstream timing info", it's in the "Timestamps and default 
duration" box which is on the right side of the "Input" tab...

On Sunday, March 15, 2020 3:41 PM, Mark Filipak 
 wrote:

On 03/15/2020 09:02 AM, Crazy Red Elephant via ffmpeg-user wrote:


Are they actually disruptive, or could you just keep the original stream as is, 
knowing 1 out of 120 frames or something will be dropped when playing back?


To me, yes. I know some other users also reported something about playback 
issues numerous times but the stream provider doesn't seem to care.
I think I mentioned before that remuxing the video with MKVToolNix and the "generate 
timestamps" option checked...


Can you help me find the "generate timestamps" option? I can't find it. I'd like to 
see what it does with a VOB that has 8 PGCs that are okay, but the 9th & 10th PGCs have 
audio in advance of video by about 4400ms.

___
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-monotonous DTS in output stream" error, previous and current values are equal

2020-04-01 Thread Crazy Red Elephant via ffmpeg-user
Hi Mark, the option is called "Fix bitstream timing info", it's in the 
"Timestamps and default duration" box which is on the right side of the "Input" 
tab...

‐‐‐ Original Message ‐‐‐
On Sunday, March 15, 2020 3:41 PM, Mark Filipak 
 wrote:

> On 03/15/2020 09:02 AM, Crazy Red Elephant via ffmpeg-user wrote:
>
> > > Are they actually disruptive, or could you just keep the original stream 
> > > as is, knowing 1 out of 120 frames or something will be dropped when 
> > > playing back?
> >
> > To me, yes. I know some other users also reported something about playback 
> > issues numerous times but the stream provider doesn't seem to care.
> > I think I mentioned before that remuxing the video with MKVToolNix and the 
> > "generate timestamps" option checked...
>
> Can you help me find the "generate timestamps" option? I can't find it. I'd 
> like to see what it does with a VOB that has 8 PGCs that are okay, but the 
> 9th & 10th PGCs have audio in advance of video by about 4400ms.
>
> Regards,
> Mark.
>
> 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] "Non-monotonous DTS in output stream" error, previous and current values are equal

2020-03-15 Thread Mark Filipak

On 03/15/2020 09:02 AM, Crazy Red Elephant via ffmpeg-user wrote:

Are they actually disruptive, or could you just keep the original stream as is, 
knowing 1 out of 120 frames or something will be dropped when playing back?


To me, yes. I know some other users also reported something about playback 
issues numerous times but the stream provider doesn't seem to care.

I think I mentioned before that remuxing the video with MKVToolNix and the "generate 
timestamps" option checked...


Can you help me find the "generate timestamps" option? I can't find it. I'd like to 
see what it does with a VOB that has 8 PGCs that are okay, but the 9th & 10th PGCs have 
audio in advance of video by about 4400ms.

Regards,
Mark.
___
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-monotonous DTS in output stream" error, previous and current values are equal

2020-03-15 Thread Crazy Red Elephant via ffmpeg-user
> Are they actually disruptive, or could you just keep the original stream as 
> is, knowing 1 out of 120 frames or something will be dropped when playing 
> back?

To me, yes. I know some other users also reported something about playback 
issues numerous times but the stream provider doesn't seem to care.

I think I mentioned before that remuxing the video with MKVToolNix and the 
"generate timestamps" option checked kinda solves the problem but I'm not sure 
if the video and audio streams are synced after that... Also that produces an 
.mkv while I need .mp4



‐‐‐ Original Message ‐‐‐
On Tuesday, February 25, 2020 8:49 PM, Ted Park  wrote:

> Hi,
>
> > I tried adding "-fflags +ignpts" before input but that didn't help, there 
> > are still DTS warnings, however, this time the values are not equal for 
> > some reason (except the first pair)
>
> I think igndts is more likely to affect the result but not sure in what way.
>
> Since you have bad timestamps in your original file, you’ll probably have to 
> settle for workarounds. Like the first two frame drops seem unavoidable, they 
> both have dts 0 and one has pts 0.
>
> The warnings do tell you how it handles the problem when it adjusts the 
> timestamps so they’re not the same, with the caveat that it might not be 
> accurate. You could also generate new timestamps based on frame rate but that 
> might not be accurate, and cause audio sync issues.
>
> As I recall you said you downloaded the files directly, so the timestamp 
> related frame drops probably happens to everyone who plays that stream? Are 
> they actually disruptive, or could you just keep the original stream as is, 
> knowing 1 out of 120 frames or something will be dropped when playing back? 
> I’m pretty sure this is your best bet for keeping audio and video 
> synchronized.
>
> 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".


___
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-monotonous DTS in output stream" error, previous and current values are equal

2020-02-25 Thread Ted Park
Hi,

> I tried adding "-fflags +ignpts" before input but that didn't help, there are 
> still DTS warnings, however, this time the values are not equal for some 
> reason (except the first pair)

I think igndts is more likely to affect the result but not sure in what way.

Since you have bad timestamps in your original file, you’ll probably have to 
settle for workarounds. Like the first two frame drops seem unavoidable, they 
both have dts 0 and one has pts 0.

The warnings do tell you how it handles the problem when it adjusts the 
timestamps so they’re not the same, with the caveat that it might not be 
accurate. You could also generate new timestamps based on frame rate but that 
might not be accurate, and cause audio sync issues.

As I recall you said you downloaded the files directly, so the timestamp 
related frame drops probably happens to everyone who plays that stream? Are 
they actually disruptive, or could you just keep the original stream as is, 
knowing 1 out of 120 frames or something will be dropped when playing back? I’m 
pretty sure this is your best bet for keeping audio and video synchronized.

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] "Non-monotonous DTS in output stream" error, previous and current values are equal

2020-02-24 Thread Carl Eugen Hoyos
Am Di., 11. Feb. 2020 um 23:22 Uhr schrieb Crazy Red Elephant via
ffmpeg-user :

> Here is the console output

Sadly not, if you need support here, please always provide the command line
you tested together with the complete, uncut console output, don't forget to
test current FFmpeg git head, nothing else is supported here.

And please find out what top-posting means and avoid it here, it is
considered rude by many people here to ignore this advice.

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

Re: [FFmpeg-user] "Non-monotonous DTS in output stream" error, previous and current values are equal

2020-02-23 Thread Carl Zwanzig

On 2/23/2020 5:15 AM, Crazy Red Elephant via ffmpeg-user wrote:

Guys please, I still have not found a solution and I'm so desperate :-( I asked 
this question on multiple sites and nobody is helping...


Perhaps nobody has help to give?

(As has been said many times, please do not top-post on this list; if you're 
unsure what that is, most search engines will tell.)


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

Re: [FFmpeg-user] "Non-monotonous DTS in output stream" error, previous and current values are equal

2020-02-23 Thread Crazy Red Elephant via ffmpeg-user
I tried adding "-fflags +ignpts" before input but that didn't help, there are 
still DTS warnings, however, this time the values are not equal for some reason 
(except the first pair):

[mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0; previous: 
6030, current: 6030; changing to 6031. This may result in incorrect timestamps 
in the output file.
[mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0; previous: 
180204, current: 177177; changing to 180205. This may result in incorrect 
timestamps in the output file.
[hls @ 01a901cc9380] Opening 'crypto:part1.ts' for reading
[mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0; previous: 
360384, current: 357357; changing to 360385. This may result in incorrect 
timestamps in the output file.
[mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0; previous: 
540565, current: 537538; changing to 540566. This may result in incorrect 
timestamps in the output file.
[hls @ 01a901cc9380] Opening 'crypto:part2.ts' for reading
[mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0; previous: 
720745, current: 717718; changing to 720746. This may result in incorrect 
timestamps in the output file.
[mp4 @ 01a902a100c0] Non-monotonous DTS in output stream 0:0; previous: 
900925, current: 897898; changing to 900926. This may result in incorrect 
timestamps in the output file.

‐‐‐ Original Message ‐‐‐
On Sunday, February 23, 2020 3:15 PM, Crazy Red Elephant via ffmpeg-user 
 wrote:

> Guys please, I still have not found a solution and I'm so desperate :-( I 
> asked this question on multiple sites and nobody is helping...
>
> ‐‐‐ Original Message ‐‐‐
> On Wednesday, February 12, 2020 12:44 AM, Ted Park kumowoon1...@gmail.com 
> wrote:
>
> > > 4.  A general question - is there any difference between (a) decrypting 
> > > all .ts parts separately, then concatenating them into one big .ts file 
> > > and remuxing it into .mp4 and (b) concatenating all encrypted .ts parts 
> > > first, then decrypting the big .ts result file and then remuxing it into 
> > > .mp4?
> >
> > This makes me think you are not decrypting the segments correctly, I had 
> > understood the specs to mean that if it isn’t specified, the IV needs to be 
> > incremented for each segment (so you would need to use 
> > 0x for the first segment, 
> > 0x0001 for the second, etc. based on the 
> > initial media sequence number of 0).
> > I don’t think the missing picture message at the end is unexpected, since 
> > the stream was cut arbitrarily after all, this is the result of my attempt 
> > at decrypting each segment with openssl and using cat to put them together 
> > (ffmpeg wasn’t used, except to test the file).
> > https://media.kumowoon1025.com/videos/cat.ts 
> > https://media.kumowoon1025.com/videos/cat.ts
> > 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".


___
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-monotonous DTS in output stream" error, previous and current values are equal

2020-02-23 Thread Crazy Red Elephant via ffmpeg-user
Guys please, I still have not found a solution and I'm so desperate :-( I asked 
this question on multiple sites and nobody is helping...

‐‐‐ Original Message ‐‐‐
On Wednesday, February 12, 2020 12:44 AM, Ted Park  
wrote:

> > 4.  A general question - is there any difference between (a) decrypting all 
> > .ts parts separately, then concatenating them into one big .ts file and 
> > remuxing it into .mp4 and (b) concatenating all encrypted .ts parts first, 
> > then decrypting the big .ts result file and then remuxing it into .mp4?
>
> This makes me think you are not decrypting the segments correctly, I had 
> understood the specs to mean that if it isn’t specified, the IV needs to be 
> incremented for each segment (so you would need to use 
> 0x for the first segment, 
> 0x0001 for the second, etc. based on the initial 
> media sequence number of 0).
>
> I don’t think the missing picture message at the end is unexpected, since the 
> stream was cut arbitrarily after all, this is the result of my attempt at 
> decrypting each segment with openssl and using cat to put them together 
> (ffmpeg wasn’t used, except to test the file).
> https://media.kumowoon1025.com/videos/cat.ts 
> https://media.kumowoon1025.com/videos/cat.ts
>
> 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] "Non-monotonous DTS in output stream" error, previous and current values are equal

2020-02-11 Thread Ted Park
> 4. A general question - is there any difference between (a) decrypting all 
> .ts parts separately, then concatenating them into one big .ts file and 
> remuxing it into .mp4 and (b) concatenating all encrypted .ts parts first, 
> then decrypting the big .ts result file and then remuxing it into .mp4?

This makes me think you are not decrypting the segments correctly, I had 
understood the specs to mean that if it isn’t specified, the IV needs to be 
incremented for each segment (so you would need to use 
0x for the first segment, 
0x0001 for the second, etc. based on the initial 
media sequence number of 0).

I don’t think the missing picture message at the end is unexpected, since the 
stream was cut arbitrarily after all, this is the result of my attempt at 
decrypting each segment with openssl and using cat to put them together (ffmpeg 
wasn’t used, except to test the file).
https://media.kumowoon1025.com/videos/cat.ts 


___
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-monotonous DTS in output stream 0:1

2018-09-05 Thread Mustafa Al Ani
No particular reason but I can tell it happens on master build as well.

R,
Mustafa 

> On Sep 5, 2018, at 9:57 AM, Moritz Barsnick  wrote:
> 
>> On Wed, Sep 05, 2018 at 09:29:16 +0200, Mustafa Al Ani wrote:
>> without the patch:
>> 
>> ffmpeg -f libndi_newtek -find_sources 1 -i dummy -loglevel debug
>> ffmpeg version 3.4.git Copyright (c) 2000-2018 the FFmpeg developers
> 
> Are you using the 3.4 branch from git? If so, is there any particular
> reason for this, and not using master?
> 
> Just wondering,
> Moritz
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://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
http://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-monotonous DTS in output stream 0:1

2018-09-05 Thread Moritz Barsnick
On Wed, Sep 05, 2018 at 09:29:16 +0200, Mustafa Al Ani wrote:
> without the patch:
> 
> ffmpeg -f libndi_newtek -find_sources 1 -i dummy -loglevel debug
> ffmpeg version 3.4.git Copyright (c) 2000-2018 the FFmpeg developers

Are you using the 3.4 branch from git? If so, is there any particular
reason for this, and not using master?

Just wondering,
Moritz
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://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-monotonous DTS in output stream 0:1

2018-09-05 Thread Mustafa Al Ani
without the patch:

ffmpeg -f libndi_newtek -find_sources 1 -i dummy -loglevel debug
ffmpeg version 3.4.git Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
  configuration: --enable-libndi_newtek
--extra-cflags='-I/home/ls/iohub/ndi/include
-I/home/ls/iohub/bm_sdk/Linux/include'
--extra-ldflags=-L/home/ls/iohub/ndi/lib/x86_64-linux-gnu
--enable-libsrt --enable-ffplay --enable-decklink --enable-libx264
--enable-nonfree --enable-gpl --enable-libfdk-aac --enable-libx265
--enable-openssl
  libavutil  56. 19.100 / 56. 19.100
  libavcodec 58. 27.101 / 58. 27.101
  libavformat58. 17.106 / 58. 17.106
  libavdevice58.  4.101 / 58.  4.101
  libavfilter 7. 26.100 /  7. 26.100
  libswscale  5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc55.  2.100 / 55.  2.100
Splitting the commandline.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'libndi_newtek'.
Reading option '-find_sources' ... matched as AVOption 'find_sources'
with argument '1'.
Reading option '-i' ... matched as input url with argument 'dummy'.
Reading option '-loglevel' ... matched as option 'loglevel' (set
logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url dummy.
Applying option f (force format) with argument libndi_newtek.
Successfully parsed a group of options.
Opening an input file: dummy.
[libndi_newtek @ 0x347e380] Waiting for sources 1000 miliseconds
[libndi_newtek @ 0x347e380] NDIlib_find_wait_for_sources returns 1
[libndi_newtek @ 0x347e380] Waiting for sources 1000 miliseconds
[libndi_newtek @ 0x347e380] NDIlib_find_wait_for_sources returns 1
[libndi_newtek @ 0x347e380] Waiting for sources 1000 miliseconds
[libndi_newtek @ 0x347e380] NDIlib_find_wait_for_sources returns 1
[libndi_newtek @ 0x347e380] Waiting for sources 1000 miliseconds
[libndi_newtek @ 0x347e380] NDIlib_find_wait_for_sources returns 0
[libndi_newtek @ 0x347e380] Found 5 NDI sources:
[libndi_newtek @ 0x347e380] 'IO-ENC-01 (IO-ENC-01-NDI-01)'
'192.168.173.81:5961'
[libndi_newtek @ 0x347e380] 'IO-ENC-01 (IO-ENC-01-NDI-02)'
'192.168.173.81:5962'
[libndi_newtek @ 0x347e380] 'MED-GW-01 (IO-ENC-01-NDI-01_VR)'
 '192.168.173.80:5962'
[libndi_newtek @ 0x347e380] 'MED-GW-01 (IO-ENC-01-NDI-02_VR)'
 '192.168.173.80:5961'
[libndi_newtek @ 0x347e380] 'OTT-ENC-01 (NDI-TEST-01)'
'152.115.45.153:5961'
dummy: Immediate exit requested


R,

Mustafa


On Tue, Sep 4, 2018 at 2:19 PM Carl Eugen Hoyos  wrote:

> 2018-09-04 11:35 GMT+02:00, Mustafa Al Ani :
> > Hi,
> >
> > After applying the patch, it can't even find sources anymore.
> >
> > Here is the console output:
> >
> > ffmpeg -f libndi_newtek -find_sources 1 -i dummy -loglevel debug
>
> Then it's probably just wrong but feel free to post the console
> output without the patch.
>
> Carl Eugen
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://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
http://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-monotonous DTS in output stream 0:1

2018-09-04 Thread Carl Eugen Hoyos
2018-09-04 11:35 GMT+02:00, Mustafa Al Ani :
> Hi,
>
> After applying the patch, it can't even find sources anymore.
>
> Here is the console output:
>
> ffmpeg -f libndi_newtek -find_sources 1 -i dummy -loglevel debug

Then it's probably just wrong but feel free to post the console
output without the patch.

Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://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-monotonous DTS in output stream 0:1

2018-09-04 Thread Mustafa Al Ani
Hi,

After applying the patch, it can't even find sources anymore.

Here is the console output:

ffmpeg -f libndi_newtek -find_sources 1 -i dummy -loglevel debug
ffmpeg version 3.4.git Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
  configuration: --enable-libndi_newtek
--extra-cflags='-I/home/ls/iohub/ndi/include
-I/home/ls/iohub/bm_sdk/Linux/include'
--extra-ldflags=-L/home/ls/iohub/ndi/lib/x86_64-linux-gnu
--enable-libsrt --enable-ffplay --enable-decklink --enable-libx264
--enable-nonfree --enable-gpl --enable-libfdk-aac --enable-libx265
--enable-openssl
  libavutil  56. 19.100 / 56. 19.100
  libavcodec 58. 27.101 / 58. 27.101
  libavformat58. 17.106 / 58. 17.106
  libavdevice58.  4.101 / 58.  4.101
  libavfilter 7. 26.100 /  7. 26.100
  libswscale  5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc55.  2.100 / 55.  2.100
Splitting the commandline.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'libndi_newtek'.
Reading option '-find_sources' ... matched as AVOption 'find_sources'
with argument '1'.
Reading option '-i' ... matched as input url with argument 'dummy'.
Reading option '-loglevel' ... matched as option 'loglevel' (set
logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url dummy.
Applying option f (force format) with argument libndi_newtek.
Successfully parsed a group of options.
Opening an input file: dummy.
[libndi_newtek @ 0x3857380] Opening 'dummy' for reading
[file @ 0x3857c40] Setting default whitelist 'file,crypto'
dummy: No such file or directory

R,
Mustafa

On Tue, Sep 4, 2018 at 12:40 AM Carl Eugen Hoyos  wrote:

> 2018-09-01 20:18 GMT+02:00, Mustafa Al Ani :
>
> > In my setup I'm playing out NDI stream using decklink. everything
> > looks good and both the NDI and the decklink playout are very
> > stable.. but when the NDI stream stops and starts again later.. the
> > decklink starts giving Non-monotonous DTS in output stream 0:1
> > which makes sense because the DTS has been changed since the
> > last frame in previous NDI stream.
> >
> > Here is my command
> >
> > fmpeg -f libndi_newtek -i "NDI_SOURCE_NAME_1" -f decklink 'DeckLink Duo
> (1)'
> >
> > The same happens when I restream NDI to NDI.
> >
> > ffmpeg -f libndi_newtek -i "NDI_SOURCE_NAME_1" -f libndi_newtek
> > NDI_SOURCE_NAME_2
> >
> > Is there any way I can force ffmpeg to ignore the DTS?
>
> You could test adding the AVFMT_TS_DISCONT flag:
> (inlined)
>
> diff --git a/libavdevice/libndi_newtek_dec.c
> b/libavdevice/libndi_newtek_dec.c
> index 4fb7197..04eec31 100644
> --- a/libavdevice/libndi_newtek_dec.c
> +++ b/libavdevice/libndi_newtek_dec.c
> @@ -337,4 +337,5 @@ AVInputFormat ff_libndi_newtek_demuxer = {
>  .read_header   = ndi_read_header,
>  .read_packet   = ndi_read_packet,
>  .read_close= ndi_read_close,
> +.flags = AVFMT_TS_DISCONT,
>  };
>
>
> Please report back, Carl Eugen
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://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
http://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-monotonous DTS in output stream 0:1

2018-09-03 Thread Carl Eugen Hoyos
2018-09-01 20:18 GMT+02:00, Mustafa Al Ani :

> In my setup I'm playing out NDI stream using decklink. everything
> looks good and both the NDI and the decklink playout are very
> stable.. but when the NDI stream stops and starts again later.. the
> decklink starts giving Non-monotonous DTS in output stream 0:1
> which makes sense because the DTS has been changed since the
> last frame in previous NDI stream.
>
> Here is my command
>
> fmpeg -f libndi_newtek -i "NDI_SOURCE_NAME_1" -f decklink 'DeckLink Duo (1)'
>
> The same happens when I restream NDI to NDI.
>
> ffmpeg -f libndi_newtek -i "NDI_SOURCE_NAME_1" -f libndi_newtek
> NDI_SOURCE_NAME_2
>
> Is there any way I can force ffmpeg to ignore the DTS?

You could test adding the AVFMT_TS_DISCONT flag:
(inlined)

diff --git a/libavdevice/libndi_newtek_dec.c b/libavdevice/libndi_newtek_dec.c
index 4fb7197..04eec31 100644
--- a/libavdevice/libndi_newtek_dec.c
+++ b/libavdevice/libndi_newtek_dec.c
@@ -337,4 +337,5 @@ AVInputFormat ff_libndi_newtek_demuxer = {
 .read_header   = ndi_read_header,
 .read_packet   = ndi_read_packet,
 .read_close= ndi_read_close,
+.flags = AVFMT_TS_DISCONT,
 };


Please report back, Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://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-monotonous DTS in output stream

2018-05-18 Thread cedric.dew...@telfort.nl

>Origineel Bericht
>Van : ceffm...@gmail.com
>Datum : 18/05/2018 10:05
>Aan : ffmpeg-user@ffmpeg.org
>Onderwerp : Re: [FFmpeg-user] non-monotonous DTS in output stream
>
>2018-05-17 14:57 GMT+02:00, cedric.dew...@telfort.nl 
>:
>> Hi All,
>> I am capturing mjpeg frames from my webcam connected to a bananapi, running
>> armbian. The resulting video file is choppy when played with mplayer and
>> VLC, and in the console I see the following messages.
>
>If the camera provides constant frame rate, you can use the mjpg container.
>
>Carl Eugen
>___
>ffmpeg-user mailing list
>ffmpeg-user@ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
>To unsubscribe, visit link above, or email
>ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

I Carl,

I've tried, but there are a lot of frames missing in the resulting video file. 
I have captured the image of a stopwatch with my webcam, and I see the seconds 
go way faster than they should. I used the official 4.0 version of the source:

ffmpeg-4.0$ ./ffmpeg -fflags +igndts -f v4l2 -input_format mjpeg -s 1280x720 -i 
/dev/video0 -pix_fmt nv12 -c:v copy output.mjpeg
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 20160609
  configuration: --prefix=/usr --enable-nonfree --enable-gpl --enable-version3 
--enable-vdpau --enable-libx264 --enable-libmp3lame --enable-libpulse 
--enable-libv4l2
  libavutil  56. 14.100 / 56. 14.100
  libavcodec 58. 18.100 / 58. 18.100
  libavformat58. 12.100 / 58. 12.100
  libavdevice58.  3.100 / 58.  3.100
  libavfilter 7. 16.100 /  7. 16.100
  libswscale  5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc55.  1.100 / 55.  1.100
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 71259.463599, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 
30 fps, 30 tbr, 1000k tbn, 1000k tbc
Output #0, mjpeg, to 'output.mjpeg':
  Metadata:
encoder : Lavf58.12.100
Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 
q=2-31, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=   16 fps=0.0 q=-1.0 size=2048kB time=00:00:00.49 
bitrate=33559.2kbitsframe=   31 fps= 31 q=-1.0 size=4864kB time=00:00:00.99 
bitrate=39854.6kbitsframe=   46 fps= 31 q=-1.0 size=7680kB time=00:00:01.49 
bitrate=41953.0kbitsframe=   61 fps= 30 q=-1.0 size=   10496kB time=00:00:01.99 
bitrate=43001.2kbitsframe=   76 fps= 30 q=-1.0 size=   13312kB time=00:00:02.49 
bitrate=43629.2kbitsframe=   91 fps= 30 q=-1.0 size=   16128kB time=00:00:02.99 
bitrate=44049.9kbitsframe=  106 fps= 30 q=-1.0 size=   18944kB time=00:00:03.49 
bitrate=44349.5kbitsframe=  121 fps= 30 q=-1.0 size=   21760kB time=00:00:03.99 
bitrate=44575.2kbitsframe=  136 fps= 30 q=-1.0 size=   24576kB time=00:00:04.49

s/s speed=0.907x
video:381272kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB 
muxing overhead: 0.00%
Exiting normally, received signal 2.

Cheers,
Cedric
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://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-monotonous DTS in output stream

2018-05-18 Thread Carl Eugen Hoyos
2018-05-17 14:57 GMT+02:00, cedric.dew...@telfort.nl :
> Hi All,
> I am capturing mjpeg frames from my webcam connected to a bananapi, running
> armbian. The resulting video file is choppy when played with mplayer and
> VLC, and in the console I see the following messages.

If the camera provides constant frame rate, you can use the mjpg container.

Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://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-monotonous DTS in output stream

2018-05-17 Thread cedric.dew...@telfort.nl
>
>I thought you were getting "/dev/video0: Invalid argument"?

Yes, i dit get invalid argument with this very old version of ffmpeg:
https://github.com/chwe17/FFmpeg-Cedrus/

But with this newer version my webcam is openend correctly:
https://github.com/danielkucera/FFmpeg/tree/cedrus264

>What actual fps does ffmpeg report while processing? Does the camera
>deliver the 30 fps, and can ffmpeg handle them (speed=1.0x)? Do you get
>dups or drops?
I see no dups or drops, but when I stop the stream I see speed=70.3:
$ ./ffmpeg -f v4l2 -input_format mjpeg -s 1280x720 -i /dev/video0 -c:v copy 
output.mkv
...
frame= 3294 fps= 23 q=-1.0 Lsize= 1153815kB time=02:49:28.92 bitrate= 
929.5kbits/s speed=70.3x
video:1153712kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB 
muxing overhead: 0.008993%

Cheers,
Cedric
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://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-monotonous DTS in output stream

2018-05-17 Thread cedric.dew...@telfort.nl

>Origineel Bericht
>Van : micaelsi...@gmail.com
>Datum : 17/05/2018 19:39
>Aan : ffmpeg-user@ffmpeg.org
>Onderwerp : Re: [FFmpeg-user] non-monotonous DTS in output stream
>
>On Thu, 17 May 2018, 09:57 cedric.dew...@telfort.nl, <
>cedric.dew...@telfort.nl> wrote:
>
>> Hi All,
>> I am capturing mjpeg frames from my webcam connected to a bananapi,
>> running armbian. The resulting video file is choppy when played with
>> mplayer and VLC, and in the console I see the following messages. The CPU
>> of the bananapi is nowhere near 100%
>> cedric@bananapi:~/FFmpeg$ ./ffmpeg -f v4l2 -input_format mjpeg -s
>> 1280x720 -i /dev/video0 -c:v copy output.mkv
>> ffmpeg version N-86245-gcd67ff8 Copyright (c) 2000-2017 the FFmpeg
>> developers
>>   built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 20160609
>>   configuration: --prefix=/usr --enable-nonfree --enable-gpl
>> --enable-version3 --enable-vdpau --enable-libx264 --enable-libmp3lame
>> --enable-libpulse --enable-libv4l2
>>   libavutil  55. 63.100 / 55. 63.100
>>   libavcodec 57. 96.101 / 57. 96.101
>>   libavformat57. 72.101 / 57. 72.101
>>   libavdevice57.  7.100 / 57.  7.100
>>   libavfilter 6. 90.100 /  6. 90.100
>>   libswscale  4.  7.101 /  4.  7.101
>>   libswresample   2.  8.100 /  2.  8.100
>>   libpostproc54.  6.100 / 54.  6.100
>> Input #0, video4linux2,v4l2, from '/dev/video0':
>>   Duration: N/A, start: 1488.098843, bitrate: N/A
>> Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown),
>> 1280x720, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
>> File 'output.mkv' already exists. Overwrite ? [y/N] y
>> Output #0, matroska, to 'output.mkv':
>>   Metadata:
>> encoder : Lavf57.72.101
>> Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc,
>> bt470bg/unknown/unknown), 1280x720, q=2-31, 30 fps, 30 tbr, 1k tbn, 1000k
>> tbc
>> Stream mapping:
>>   Stream #0:0 -> #0:0 (copy)
>> Press [q] to stop, [?] for help
>> [matroska @ 0x1c48860] Non-monotonous DTS in output stream 0:0; previous:
>> 3109, current: 2048; changing to 3109. This may result in incorrect
>> timestamps in the output file.
>> [matroska @ 0x1c48860] Non-monotonous DTS in output stream 0:0; previous:
>> 3109, current: 2080; changing to 3109. This may result in incorrect
>> timestamps in the output file.
>> Is there a way to prevent he above errors?
>> Is there a way to post-process the output file so VLC can play it?
>> Cheers,
>> Cedric
>>
>
>Have you tried...
>
>ffmpeg -fflags +igndts -f v4l2 (...)
>
>?
I have now, I still gets lots of Non-monotonous DTS errors. I am running this 
version of ffmpeg:
https://github.com/danielkucera/FFmpeg/tree/cedrus264

compiled in the following way:
./configure --prefix=/usr --enable-nonfree --enable-gpl --enable-version3 
--enable-vdpau --enable-libx264 --enable-libmp3lame --enable-libpulse 
--enable-libv4l2

running with the following command line:
./ffmpeg -fflags +igndts -f v4l2 -input_format mjpeg -s 1280x720 -i /dev/video0 
-c:v copy output.mkv


I am now compiling this version of ffmpeg, I hope this solves the problem. It 
will take a few hours.
https://ffmpeg.org/releases/ffmpeg-4.0.tar.xz

Cheers,
Cedric
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://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-monotonous DTS in output stream

2018-05-17 Thread Moritz Barsnick
On Thu, May 17, 2018 at 14:57:46 +0200, cedric.dew...@telfort.nl wrote:

I thought you were getting "/dev/video0: Invalid argument"?

Anyway:

> [matroska @ 0x1c48860] Non-monotonous DTS in output stream 0:0; previous: 
> 3109, current: 2048; changing to 3109. This may result in incorrect 
> timestamps in the output file.

I have never understood why this happens, but *oh well*.

What actual fps does ffmpeg report while processing? Does the camera
deliver the 30 fps, and can ffmpeg handle them (speed=1.0x)? Do you get
dups or drops?

> Is there a way to prevent he above errors?

The v4l2 input device supports an option "-timestamps". You may want to
try its three possible values.

> Is there a way to post-process the output file so VLC can play it?

If the frame's timestamps are borked, and/or frames are duplicated or
missing, probably not. Try your options above first.

Cheers,
Moritz
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://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-monotonous DTS in output stream

2018-05-17 Thread Micael Silva
On Thu, 17 May 2018, 09:57 cedric.dew...@telfort.nl, <
cedric.dew...@telfort.nl> wrote:

> Hi All,
> I am capturing mjpeg frames from my webcam connected to a bananapi,
> running armbian. The resulting video file is choppy when played with
> mplayer and VLC, and in the console I see the following messages. The CPU
> of the bananapi is nowhere near 100%
> cedric@bananapi:~/FFmpeg$ ./ffmpeg -f v4l2 -input_format mjpeg -s
> 1280x720 -i /dev/video0 -c:v copy output.mkv
> ffmpeg version N-86245-gcd67ff8 Copyright (c) 2000-2017 the FFmpeg
> developers
>   built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 20160609
>   configuration: --prefix=/usr --enable-nonfree --enable-gpl
> --enable-version3 --enable-vdpau --enable-libx264 --enable-libmp3lame
> --enable-libpulse --enable-libv4l2
>   libavutil  55. 63.100 / 55. 63.100
>   libavcodec 57. 96.101 / 57. 96.101
>   libavformat57. 72.101 / 57. 72.101
>   libavdevice57.  7.100 / 57.  7.100
>   libavfilter 6. 90.100 /  6. 90.100
>   libswscale  4.  7.101 /  4.  7.101
>   libswresample   2.  8.100 /  2.  8.100
>   libpostproc54.  6.100 / 54.  6.100
> Input #0, video4linux2,v4l2, from '/dev/video0':
>   Duration: N/A, start: 1488.098843, bitrate: N/A
> Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown),
> 1280x720, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
> File 'output.mkv' already exists. Overwrite ? [y/N] y
> Output #0, matroska, to 'output.mkv':
>   Metadata:
> encoder : Lavf57.72.101
> Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc,
> bt470bg/unknown/unknown), 1280x720, q=2-31, 30 fps, 30 tbr, 1k tbn, 1000k
> tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (copy)
> Press [q] to stop, [?] for help
> [matroska @ 0x1c48860] Non-monotonous DTS in output stream 0:0; previous:
> 3109, current: 2048; changing to 3109. This may result in incorrect
> timestamps in the output file.
> [matroska @ 0x1c48860] Non-monotonous DTS in output stream 0:0; previous:
> 3109, current: 2080; changing to 3109. This may result in incorrect
> timestamps in the output file.
> Is there a way to prevent he above errors?
> Is there a way to post-process the output file so VLC can play it?
> Cheers,
> Cedric
>

Have you tried...

ffmpeg -fflags +igndts -f v4l2 (...)

?

>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://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-monotonous DTS in output stream in concat

2015-06-21 Thread Patrick Roelli
Hello,

I have encoutered the same issue lately. One thing you could try is to
change the container of the videos of "mylist.txt". No need for encoding,
just rebuild the container as mp4.

2015-06-21 21:14 GMT+02:00 Dani A :

> I am concatenating two files and I am getting the below errors. both files
> are mp4s an
>
> ffmpeg -f concat -i mylist.txt -c copy output.mp4
>
>
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332800, current: 306700; changing to 332801. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332801, current: 307724; changing to 332802. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332802, current: 308748; changing to 332803. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332803, current: 309772; changing to 332804. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332804, current: 310796; changing to 332805. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332805, current: 311820; changing to 332806. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332806, current: 312844; changing to 332807. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332807, current: 313867; changing to 332808. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332808, current: 314891; changing to 332809. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332809, current: 315915; changing to 332810. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332810, current: 316939; changing to 332811. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332811, current: 317963; changing to 332812. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332812, current: 318987; changing to 332813. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332813, current: 320011; changing to 332814. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332814, current: 321035; changing to 332815. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332815, current: 322059; changing to 332816. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332816, current: 323083; changing to 332817. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332817, current: 324107; changing to 332818. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332818, current: 325131; changing to 332819. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332819, current: 326155; changing to 332820. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332820, current: 327179; changing to 332821. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332821, current: 328202; changing to 332822. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332822, current: 329226; changing to 332823. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332823, current: 330250; changing to 332824. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332824, current: 331274; changing to 332825. This may result in incorrect
> timestamps in the output file.
> [mp4 @ 0xbc48a40] Non-monotonous DTS in output stream 0:1; previous:
> 332825, current: 332298; changing to 332826. This m