First let me start off by saying that I am newcomer to FFMpeg so please be patient with my lack of knowledge. I am preparing to do a little work that will include a lot of copying the stream data directly via the "-vcodec/acodec/scodec copy" command in ffmpeg. I decided to test to see if I could copy the stream of both the video and audio from a xvid video and vorbis audio mkv into another mkv but ran into some problems(most aggravating of which is the "non monotone timestamp" error). I have tried all of the following commands:
These codes both cause FFMpeg to attempt to map a subtitle track onto an audio stream, at least that is what it seems to be doing(if anyone can tell me how to correct this in a non convoluted way I would be much obliged), which makes me wonder if I am correctly encoding the dual audio:
andCode:ffmpeg -i <input.mkv> -vcodec copy -acodec copy <output.mkv>
gives this error:Code:ffmpeg -i <input.mkv> -vcodec copy -acodec copy <output.mkv> -acodec copy -newaudio
(Which I guess can be fixed by passing -scodec copy(which will still copy stream 2 to 3 and 3 to 2 unless you pass -sn and then -scodec copy -newsubtitle, but this seems to get a little ridiculous, isn't there a way to just copy a dual audio stream?)Code:Input #0, matroska, from 'input.mkv': Stream #0.0: Video: mpeg4, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 23.98 tb(r) Stream #0.1(eng): Audio: vorbis, 48000 Hz, stereo Stream #0.2(jpn): Audio: vorbis, 48000 Hz, stereo Stream #0.3: Subtitle: 0x0000 Output #0, matroska, to 'output.mkv': Stream #0.0: Video: mpeg4, yuv420p, 640x480, q=2-31, 23.98 tb(c) Stream #0.1(eng): Audio: vorbis, 48000 Hz, stereo Stream #0.2: Subtitle: 0x0000 Stream #0.3(jpn): Audio: vorbis, 48000 Hz, stereo Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Stream #0.3 -> #0.2 Stream #0.2 -> #0.3 Unsupported codec for output stream #0.2
But for the purpose of speeding this up(very slightly) I used this code:
andCode:ffmpeg -i <input.mkv> -vcodec copy -acodec copy -sn <output.mkv>
Both of these codes have given me the following error regardless of what dual audio xvid/vorbis I have fed it:Code:ffmpeg -i <input.mkv> -vcodec copy -acodec copy -sn <output.mkv> -acodec copy -newaudio
I get the same error when trying to encode xvid video and vorbis audio(including ogm) to avi with the first code, which I can fix by specifying a different audio codec; dual audio will also work this way:Code:error, non monotone timestamps 57 >= 57 av_interleaved_write_frame(): Error while opening file
Dual Audio:Code:ffmpeg -i <input.ogm/mkv> -vcodec copy -acodec libmp3lame -ab 192k -ar 48000 -ac 2 <output.avi>
However, when using the same code with certain mkvs I receive the "non monotone timestamps" error again(Another strange note, when I am able to encode successfully I can also output to an mkv container, but the resulting video is jerky and does not include any dual audio even when specified, any help with this would also be appreciated). This time though, it is slightly different in that it encodes for a short time(until it gets to frame around 3800) and then spews out the error with slightly different parameters:Code:ffmpeg -i <input.ogm/mkv> -vcodec copy -acodec libmp3lame -ab 192k -ar 48000 -ac 2 <output.avi> -acodec libmp3lame -ab 192k -ar 48000 -ac 2 -newaudio
Nothing that I can see is out of the ordinary about frame 3831 on the video that gave that particular error message.Code:error, non monotone timestamps 3831 >= 3831 av_interleaved_write_frame(): Error while opening file
I would much appreciate it if anyone can tell me any of the following:
1. What I am doing wrong.
2. Is there an easy way(preferably one command) to copy and correctly map the direct streams of a dual audio file without using convoluted commands(e.g. -acodec copy -sn ouput.mkv -acodec copy -newaudio -scodec copy -newsubtitle)
and most importantly:
3. What on earth is a "non monotone timestamp" or for that matter a "monotone timestamp" and how do I fix this problem? I have scoured the net to no avail in an attempt to discover the meaning of this cryptic error message.
Entire FFMpeg Output:
Code:ffmpeg -i "input.mkv" -vcodec copy -acodec copy -sn "output.mkv" FFmpeg version SVN-r12665, Copyright (c) 2000-2008 Fabrice Bellard, et al. configuration: --enable-gpl --enable-postproc --enable-swscale --enable-avfilt er-lavf --enable-pthreads --enable-liba52 --enable-avisynth --enable-libfaac --e nable-libfaad --enable-libgsm --enable-memalign-hack --enable-libmp3lame --enabl e-libnut --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --cpu=i686 --extra-ldflags=-static libavutil version: 49.6.0 libavcodec version: 51.54.0 libavformat version: 52.13.0 libavdevice version: 52.0.0 built on Apr 2 2008 22:35:11, gcc: 4.2.3 [matroska @ 00AA6C70]Ignoring seekhead entry for ID=0x1549a966 [matroska @ 00AA6C70]Ignoring seekhead entry for ID=0x1654ae6b [matroska @ 00AA6C70]Ignoring seekhead entry for ID=0x114d9b74 [matroska @ 00AA6C70]Ignoring seekhead entry for ID=0x1043a770 [matroska @ 00AA6C70]Unknown entry 0x73a4 in info header [matroska @ 00AA6C70]Unknown track header entry 0x23314f - ignoring [matroska @ 00AA6C70]Unknown track header entry 0x23314f - ignoring [matroska @ 00AA6C70]Unknown track header entry 0x23314f - ignoring [matroska @ 00AA6C70]Unknown track header entry 0x23314f - ignoring [matroska @ 00AA6C70]Unknown matroska file header ID 0x1043a770 Input #0, matroska, from 'Input.mkv': Duration: 00:23:46.6, start: 0.000000, bitrate: N/A Stream #0.0: Video: mpeg4, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 23.98 tb(r) Stream #0.1(eng): Audio: vorbis, 48000 Hz, stereo Stream #0.2(jpn): Audio: vorbis, 48000 Hz, stereo Stream #0.3: Subtitle: 0x0000 File 'output.mkv' already exists. Overwrite ? [y/N] y Output #0, matroska, to 'output.mkv': Stream #0.0: Video: mpeg4, yuv420p, 640x480, q=2-31, 23.98 tb(c) Stream #0.1(eng): Audio: vorbis, 48000 Hz, stereo Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding error, non monotone timestamps 57 >= 57 av_interleaved_write_frame(): Error while opening file
+ Reply to Thread
Results 1 to 9 of 9
-
-
Originally Posted by blazerqb11
http://arrozcru.no-ip.org/tripp
Originally Posted by blazerqb11
ffmpeg is what it is,
and complex, muxing/remuxing is not a strength.
use something more dedicated to the task, like mkvtoolnix for mkvs.
Originally Posted by blazerqb11
-newaudio only auto routes mapping when input streams equal output streams.
Originally Posted by blazerqb11
much of understanding ffmpeg, means undersanding c, and audiovisual internals.
c'est la vie
tripp"I'll give you five dollars if you let me throw a rock at you" -
First off thanks for replying, I know that was a long post.
Originally Posted by 45tripp
Originally Posted by 45tripp
And second, the input streams do equal the output streams. I have one video, two audio and one subtitle in both the input and output. I can run -vodec copy -acodec <new parameters because copy results in non monotone error> -scodec copy -acodec <new parameters because copy results in non monotone error> -newaudio and It will still cross streams 2 and 3, though I don't get the "unsupported codec" error. If I was able to use copy would it map them all to the same stream? I suppose maybe it doesn't matter, it just seems a little odd. -
Originally Posted by blazerqb11
if you want to remux with this tool.
Originally Posted by blazerqb11
do crossed streams matter to you?
it's probably unattractive, but you can always manually map them,
which will just extend your commandline even more though.
Originally Posted by blazerqb11
that makes no sense actually.
no. copy vs encode wouldn't make a difference to the mapping, if that's what you mean.
and btw,
putting vorbis in an avi, is a very bad idea.
i forgot to mention that last time.
like water and oil basically.
Originally Posted by blazerqb11
tripp"I'll give you five dollars if you let me throw a rock at you" -
Originally Posted by 45Tripp
Originally Posted by 45Tripp
Originally Posted by 45Tripp -
Remuxing with MKVtools seems to have solved the problem, however I am still having playback issues with Media Player Classic and small playback issues with VLC. Playback is flawless in MPlayer though.
-
Originally Posted by blazerqb11
Originally Posted by blazerqb11
Originally Posted by blazerqb11
this the first mention of them.
what kind of problems?
perhaps open a new thread for it.
tripp"I'll give you five dollars if you let me throw a rock at you" -
Originally Posted by 45tripp
The videos jutter constantly in Media Player Classic, and there is a slight transposition of a few frames at the beginning of the video while playing in VLC. -
yeah open a new thread.
post a screenshot from mediainfo of the problem file,
post info on what kind of ds codecs you have setup on your system.
bad playback on vlc is never a good sign.
could well be a bad file.
i'm generally interested in shitty files for samples,
so you could upload it if you liked too.
tripp"I'll give you five dollars if you let me throw a rock at you"
Similar Threads
-
Multiple audio, subtitles, OGM, MKV & RMVB issues
By bkfng in forum ffmpegX general discussionReplies: 12Last Post: 16th Jan 2011, 23:05 -
converting OGM/MKV to AVI (with dual audio track)
By mwasim1 in forum Video ConversionReplies: 1Last Post: 4th Jan 2009, 22:54 -
Dual Audio .ogm/.mkv to dvd
By aszwet1 in forum Newbie / General discussionsReplies: 1Last Post: 10th Jul 2007, 19:35 -
Dual audio .mkv/.ogm to DVD
By aszwet1 in forum Authoring (DVD)Replies: 1Last Post: 10th Jul 2007, 18:12 -
Dual Audio .OGM format to MPEG4
By Van Klizzy in forum Video ConversionReplies: 4Last Post: 29th Jun 2007, 23:50