Posts: 7
Threads: 1
Joined: Aug 2018
Hi, I apologise for asking this here, but I found an old thread by Selur that got things working mostly for me ( https://forum.selur.net/showthread.php?tid=162), so thought I would ask here, as you guys are very knowledgeable.
I have been supplied loads of QuickTime reference files (.mov container, with video.m2v and multiple audios.wav). All I am trying to do is re-wrap this into a single .mov file, which works fine using quicktime, for example.
To get the below command working, I need to run the ffmpeg.exe from the same folder as the content.
Using the below command I am able to achieve this, but I have a couple of issues which I can not seem to resolve.
c:\Temp>ffmpeg -enable_drefs 1 -use_absolute_path 1 -i CSP0002377.mov -map 0 -c copy test.mov
The input file is 25fps, but my output file is 26.40fps, and I can't sort out why this is happening.
I also get lots of these errors in the ffmpeg output:
Non-monotonous DTS in output stream 0:0; previous: 227334, current: 227328; changing to 227335. This may result in incorrect timestamps in the output file.
I have attached the ffmpeg outputs for the the initial copy and to show the format of the outputted file.
output1.txt = Initial ffmpeg copy
output2.txt = outputted file
If someone could point me int the right direction, that would be great.
Thanks.
Posts: 10.552
Threads: 57
Joined: May 2017
05.08.2018, 09:47
(This post was last modified: 05.08.2018, 09:49 by Selur.)
Seems like there is some problem with the time code
What I would try adding '-r 25' to the command line.
Concerning output of ffmpeg for me is:
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000013919db100] st: 0 edit list: 1 Missing key frame while searching for timestamp: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000013919db100] st: 0 edit list 1 Cannot find an index entry before timestamp: 0.
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000013919db100] st: 0 edit list: 2 Missing key frame while searching for timestamp: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000013919db100] st: 0 edit list 2 Cannot find an index entry before timestamp: 0.
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000013919db100] st: 0 edit list: 3 Missing key frame while searching for timestamp: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000013919db100] st: 0 edit list 3 Cannot find an index entry before timestamp: 0.
and
[mov @ 0000001391a5abc0] You requested a copy of the original timecode track so timecode metadata are now ignored
also the:
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227328, current: 227328; changing to 227329. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227329, current: 227328; changing to 227330. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227330, current: 227328; changing to 227331. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227331, current: 227328; changing to 227332. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227332, current: 227328; changing to 227333. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227333, current: 227328; changing to 227334. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227334, current: 227328; changing to 227335. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227335, current: 227328; changing to 227336. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227336, current: 227328; changing to 227337. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227337, current: 227328; changing to 227338. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227338, current: 227328; changing to 227339. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227339, current: 227328; changing to 227340. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227340, current: 227328; changing to 227341. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227341, current: 227328; changing to 227342. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227342, current: 227328; changing to 227343. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227343, current: 227328; changing to 227344. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227344, current: 227328; changing to 227345. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227345, current: 227328; changing to 227346. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227346, current: 227328; changing to 227347. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227347, current: 227328; changing to 227348. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227348, current: 227328; changing to 227349. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227349, current: 227328; changing to 227350. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227350, current: 227328; changing to 227351. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227351, current: 227328; changing to 227352. This may result in incorrect timestamps in the output file.
[mov @ 0000001391a5abc0] Non-monotonous DTS in output stream 0:0; previous: 227352, current: 227328; changing to 227353. This may result in incorrect timestamps in the output file.
block, looks like at some point the time codes stopped and are just repeating 227328 in the input.
In case '-r 25' doesn't help I would also try '-timecode 00:00::00 -timecode_rate 25'.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 7
Threads: 1
Joined: Aug 2018
Hi Selur, thanks for your quick reply, I already tried the -r 25 option, no difference.
I tried your suggestion '-timecode 00:00::00 -timecode_rate 25' but ffmpeg is not recognising the timecode_rate option, getting 'Unrecognized option 'timecode_rate'.
Just using -timecode 00:00:00:00 also gives the same issues. If I re-encode, then all is good, but i just need a re-warp to consolidate all external files into one stand alone file.
Kind regards.
Posts: 10.552
Threads: 57
Joined: May 2017
05.08.2018, 10:51
(This post was last modified: 05.08.2018, 10:52 by Selur.)
Does '-timecode 00:00::00 -r 25' work?
Also try adding '-fflags +genpts'.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 7
Threads: 1
Joined: Aug 2018
So I just tried:
c:\Temp>ffmpeg -enable_drefs 1 -use_absolute_path 1 -i c:\Temp\CSP0002140.mov -map 0 -c copy -fflags +genpts -timecode 00:00::00 -r 25 test.mov -y
Which gave same results
Attached is outputnew.txt is the ffmpeg output from that.
Kind regards.
Posts: 10.552
Threads: 57
Joined: May 2017
05.08.2018, 11:09
(This post was last modified: 05.08.2018, 11:11 by Selur.)
Does it change anything when you use:
ffmpeg -y -fflags +genpts -map_metadata -1 -enable_drefs 1 -use_absolute_path 1 -i c:\Temp\CSP0002140.mov -c copy -r 25 test.mov
instead?
Also try:
ffmpeg -y -enable_drefs 1 -use_absolute_path 1 -i c:\Temp\CSP0002140.mov -c copy -fflags +bitexact -flags:v +bitexact -flags:a +bitexact -r 25 test.mov
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 7
Threads: 1
Joined: Aug 2018
(05.08.2018, 11:09)Selur Wrote: Does it change anything when you use:
ffmpeg -y -fflags +genpts -map_metadata -1 -enable_drefs 1 -use_absolute_path 1 -i c:\Temp\CSP0002140.mov -c copy -r 25 test.mov
This gives:
Option map_metadata (set metadata information of outfile from infile) cannot be applied to input url c:\Temp\CSP0002140.mov -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
Also try:
ffmpeg -y -enable_drefs 1 -use_absolute_path 1 -i c:\Temp\CSP0002140.mov -c copy -fflags +bitexact -flags:v +bitexact -flags:a +bitexact -r 25 test.mov
This gives:
basically the same issues, but only have a single audio in the output.
Posts: 10.552
Threads: 57
Joined: May 2017
Ah sorry, try
ffmpeg -y -enable_drefs 1 -use_absolute_path 1 -i c:\Temp\CSP0002140.mov -fflags +genpts -map_metadata -1 -c copy -r 25 test.mov
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 7
Threads: 1
Joined: Aug 2018
(05.08.2018, 11:31)Selur Wrote: Ah sorry, try
ffmpeg -y -enable_drefs 1 -use_absolute_path 1 -i c:\Temp\CSP0002140.mov -fflags +genpts -map_metadata -1 -c copy -r 25 test.mov
Cu Selur
Gives same result, same errors, but again with only one audio
Posts: 10.552
Threads: 57
Joined: May 2017
Okay, the only first audio might be due to the missing '-map 0'.
What I wanted to archive is that the timecode infos get ignored and new generated, since:
Stream #0:0(eng): Video: mpeg2video (4:2:2) (xd5c / 0x63356478), yuv422p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 25 fps, 25 tbr, 2500 tbn, 50 tbc (default)
Metadata:
creation_time : 2018-05-08T16:46:20.000000Z
handler_name : Apple Video Media Handler
encoder : MPEG
timecode : 00:00:00:00
Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
Metadata:
creation_time : 2018-05-08T16:46:20.000000Z
handler_name : Apple Sound Media Handler
Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
Metadata:
creation_time : 2018-05-08T16:46:20.000000Z
handler_name : Apple Sound Media Handler
Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
Metadata:
creation_time : 2018-05-08T16:46:20.000000Z
handler_name : Apple Sound Media Handler
Stream #0:4(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
Metadata:
creation_time : 2018-05-08T16:46:20.000000Z
handler_name : Apple Sound Media Handler
Stream #0:5(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
Metadata:
creation_time : 2018-05-08T16:46:20.000000Z
handler_name : Time Code Media Handler
timecode : 00:00:00:00
this time code data from stream 0:0 and 0:5 seem to differ.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
|