Discussion:
[Ffmpeg-user] DVD NAV packets
Dennis Meuwissen
2007-03-13 20:40:25 UTC
Permalink
I am trying to multiplex several streams into a DVD VOB file, using
FFMPEG's "dvd" output format, as specified by using ntsc-dvd as target.
It does however not add NAV packets before the start of every new GOP,
resulting in non-standard DVDs that my standalone DVD player as well as
Media Player Classic choke on; no time is displayed and seeking
sometimes start playing from the start. Only before *some* I-frames NAV
packets are added, and at the very beginning of the resulting file. I
examined the file using VOBEdit.
The commandline used;

ffmpeg.exe -vcodec copy -acodec copy -i "video0.vob" -i "audio0.ac3"
-target pal-dvd "title0.vob" -map 0:0 -map 1:0

Where video0.vob is a previously encoded video file with -target
ntsc-dvd without any audio, and the audio.ac3 would be just the raw AC3
audio.
I would really appreciate any help on this, it's the only thing that
keeps me from producing DVDs that are compatible with most hardware
players out there. I have tried using mplex from mjpegtools but it
produces audio desyncing for a lot of people. Thanks.
Paul Curtis
2007-03-13 21:04:14 UTC
Permalink
Post by Dennis Meuwissen
ffmpeg.exe -vcodec copy -acodec copy -i "video0.vob" -i "audio0.ac3"
-target pal-dvd "title0.vob" -map 0:0 -map 1:0
If I recall the code I wrote for the DVD NAV packets, they won't be
created when you use '-vcodec copy'. I would have to go back and check
the source code to determine if the copy maintains the previous encoded
NAV packets in the stream.

If you could upload a small (30 second or so) sample, I can check. I
typically use 'mpeg2desc < video0.vob' (part of DVD Author on Linux) to
check for the "pes private2" packets. The output looks like this:

00000000: mpeg2 pack hdr, 0.000 sec
0000000e: system header; length=18
00000026: pes private2; length=980
00000400: pes private2; length=1018
00000800: mpeg2 pack hdr, 0.001 sec
0000080e: pes video 0; length=2028; hdr=17; pts 0.500 sec; dts 0.466
sec; (pext); pstd=235520 (scale=1024)
00001000: mpeg2 pack hdr, 0.003 sec
0000100e: pes private1, audio 0; length=2028; hdr=12; pts 0.500 sec;
(pext); pstd=4096 (scale=1024)

Before DVD authoring, the packets exist but would not contain information.

Regards,
Paul
Dennis Meuwissen
2007-03-13 21:59:01 UTC
Permalink
Uploaded sample as title0.vob to the MPlayer FTP incoming dir.
Otherwise, http://members.home.nl/meuwissenth/title0.vob
The video quality is beyond poor, but other files that displayed the
same symptoms would have been much larger. It has two or three NAV
packets muxed in at the start, but after that no more were added.
Post by Paul Curtis
Post by Dennis Meuwissen
ffmpeg.exe -vcodec copy -acodec copy -i "video0.vob" -i "audio0.ac3"
-target pal-dvd "title0.vob" -map 0:0 -map 1:0
If I recall the code I wrote for the DVD NAV packets, they won't be
created when you use '-vcodec copy'. I would have to go back and check
the source code to determine if the copy maintains the previous
encoded NAV packets in the stream.
If you could upload a small (30 second or so) sample, I can check. I
typically use 'mpeg2desc < video0.vob' (part of DVD Author on Linux)
00000000: mpeg2 pack hdr, 0.000 sec
0000000e: system header; length=18
00000026: pes private2; length=980
00000400: pes private2; length=1018
00000800: mpeg2 pack hdr, 0.001 sec
0000080e: pes video 0; length=2028; hdr=17; pts 0.500 sec; dts 0.466
sec; (pext); pstd=235520 (scale=1024)
00001000: mpeg2 pack hdr, 0.003 sec
0000100e: pes private1, audio 0; length=2028; hdr=12; pts 0.500 sec;
(pext); pstd=4096 (scale=1024)
Before DVD authoring, the packets exist but would not contain
information.
Regards,
Paul
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at mplayerhq.hu
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Paul Curtis
2007-03-13 22:02:53 UTC
Permalink
Post by Dennis Meuwissen
Uploaded sample as title0.vob to the MPlayer FTP incoming dir.
Otherwise, http://members.home.nl/meuwissenth/title0.vob
The video quality is beyond poor, but other files that displayed the
same symptoms would have been much larger. It has two or three NAV
packets muxed in at the start, but after that no more were added.
Could you upload a piece of the original, too? I'd like to compare the
differences between the original and the "after" ffmpeg multiplexing
version.

Paul
Dennis Meuwissen
2007-03-13 22:15:59 UTC
Permalink
The original would be this file:
http://members.home.nl/meuwissenth/3gp.3gp that was converted to audio
plus video using

ffmpeg -i "3gp.3gp" -ab 64 -ac 1 -acodec ac3 -target ntsc-dvd -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -minrate 3000000 -maxrate 3000000 -b 3000000 -me log
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -target ntsc-dvd
-an "0.0.m2v"

http://members.home.nl/meuwissenth/0.0.ac3
http://members.home.nl/meuwissenth/0.0.m2v

I do them separately because they're part of an automated process that
might also concatenate two or more converted video files.
They were muxed together using

ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -target
ntsc-dvd "title0.vob" -map 0:0 -map 1:0

resulting in http://members.home.nl/meuwissenth/title0.vob . Might all
be redundant information considering the original isn't MPEG2 at all,
but I hope it helps.
Post by Paul Curtis
Post by Dennis Meuwissen
Uploaded sample as title0.vob to the MPlayer FTP incoming dir.
Otherwise, http://members.home.nl/meuwissenth/title0.vob
The video quality is beyond poor, but other files that displayed the
same symptoms would have been much larger. It has two or three NAV
packets muxed in at the start, but after that no more were added.
Could you upload a piece of the original, too? I'd like to compare the
differences between the original and the "after" ffmpeg multiplexing
version.
Paul
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at mplayerhq.hu
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
herve.flores
2007-03-14 10:13:55 UTC
Permalink
The original would be this file: http://members.home.nl/meuwissenth/
3gp.3gp that was converted to audio plus video using
ffmpeg -i "3gp.3gp" -ab 64 -ac 1 -acodec ac3 -target ntsc-dvd -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -minrate 3000000 -maxrate 3000000 -b 3000000 -
me log -sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -
target ntsc-dvd -an "0.0.m2v"
http://members.home.nl/meuwissenth/0.0.ac3
http://members.home.nl/meuwissenth/0.0.m2v
I do them separately because they're part of an automated process
that might also concatenate two or more converted video files.
They were muxed together using
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -target
ntsc-dvd "title0.vob" -map 0:0 -map 1:0
just a remark:
you encode elementary streams, then you mux them (with a lot of
"complicated" parameters: map, target)

why did you only mux them like this?
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -f dvd
"title0.vob"
PS: works great with dvdauthor (and the framerate or size is include
in the m2v, no problem)

bye

Herv?
Dennis Meuwissen
2007-03-14 13:18:22 UTC
Permalink
Because it's part of an automated process that can handle more than one
audio stream, hence the -map parameters (together with -newaudio when
more than one audio stream is muxed). In the case of muxing any dvd
-target is indeed equal to -f dvd, but I used -target for consistency's
sake.
Post by herve.flores
Post by Dennis Meuwissen
http://members.home.nl/meuwissenth/3gp.3gp that was converted to
audio plus video using
ffmpeg -i "3gp.3gp" -ab 64 -ac 1 -acodec ac3 -target ntsc-dvd -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -minrate 3000000 -maxrate 3000000 -b 3000000 -me
log -sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -target
ntsc-dvd -an "0.0.m2v"
http://members.home.nl/meuwissenth/0.0.ac3
http://members.home.nl/meuwissenth/0.0.m2v
I do them separately because they're part of an automated process
that might also concatenate two or more converted video files.
They were muxed together using
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -target
ntsc-dvd "title0.vob" -map 0:0 -map 1:0
you encode elementary streams, then you mux them (with a lot of
"complicated" parameters: map, target)
why did you only mux them like this?
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -f dvd
"title0.vob"
PS: works great with dvdauthor (and the framerate or size is include
in the m2v, no problem)
bye
Herv?_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at mplayerhq.hu
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
--Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
2/24/2007 8:14 PM
Víctor Paesa
2007-03-14 14:35:40 UTC
Permalink
Hi,
Post by Dennis Meuwissen
Because it's part of an automated process that can handle more than one
audio stream, hence the -map parameters (together with -newaudio when
more than one audio stream is muxed). In the case of muxing any dvd
-target is indeed equal to -f dvd, but I used -target for consistency's
sake.
Please avoid top-posting, it makes hard to follow your case history.

Notice that order of ffmpeg options is relevant, try:

ffmpeg -i "0.0.m2v" -i "0.0.ac3" -target ntsc-dvd \
-vcodec copy -acodec copy "title0.vob" -map 0:0 -map 1:0
Post by Dennis Meuwissen
Post by herve.flores
Post by Dennis Meuwissen
http://members.home.nl/meuwissenth/3gp.3gp that was converted to
audio plus video using
ffmpeg -i "3gp.3gp" -ab 64 -ac 1 -acodec ac3 -target ntsc-dvd -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -minrate 3000000 -maxrate 3000000 -b 3000000 -me
log -sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -target
ntsc-dvd -an "0.0.m2v"
http://members.home.nl/meuwissenth/0.0.ac3
http://members.home.nl/meuwissenth/0.0.m2v
I do them separately because they're part of an automated process
that might also concatenate two or more converted video files.
They were muxed together using
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -target
ntsc-dvd "title0.vob" -map 0:0 -map 1:0
you encode elementary streams, then you mux them (with a lot of
"complicated" parameters: map, target)
why did you only mux them like this?
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -f dvd
"title0.vob"
PS: works great with dvdauthor (and the framerate or size is include
in the m2v, no problem)
Regards,
V?ctor
Dennis Meuwissen
2007-03-14 15:18:31 UTC
Permalink
Post by Víctor Paesa
Hi,
Post by Dennis Meuwissen
Because it's part of an automated process that can handle more than one
audio stream, hence the -map parameters (together with -newaudio when
more than one audio stream is muxed). In the case of muxing any dvd
-target is indeed equal to -f dvd, but I used -target for consistency's
sake.
Please avoid top-posting, it makes hard to follow your case history.
ffmpeg -i "0.0.m2v" -i "0.0.ac3" -target ntsc-dvd \
-vcodec copy -acodec copy "title0.vob" -map 0:0 -map 1:0
Reordering the options makes no difference unfortunately.
Post by Víctor Paesa
Post by Dennis Meuwissen
Post by herve.flores
Post by Dennis Meuwissen
http://members.home.nl/meuwissenth/3gp.3gp that was converted to
audio plus video using
ffmpeg -i "3gp.3gp" -ab 64 -ac 1 -acodec ac3 -target ntsc-dvd -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -minrate 3000000 -maxrate 3000000 -b 3000000 -me
log -sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -target
ntsc-dvd -an "0.0.m2v"
http://members.home.nl/meuwissenth/0.0.ac3
http://members.home.nl/meuwissenth/0.0.m2v
I do them separately because they're part of an automated process
that might also concatenate two or more converted video files.
They were muxed together using
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -target
ntsc-dvd "title0.vob" -map 0:0 -map 1:0
you encode elementary streams, then you mux them (with a lot of
"complicated" parameters: map, target)
why did you only mux them like this?
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -f dvd
"title0.vob"
PS: works great with dvdauthor (and the framerate or size is include
in the m2v, no problem)
Víctor Paesa
2007-03-14 23:00:44 UTC
Permalink
Hi,
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Because it's part of an automated process that can handle more than one
audio stream, hence the -map parameters (together with -newaudio when
more than one audio stream is muxed). In the case of muxing any dvd
-target is indeed equal to -f dvd, but I used -target for consistency's
sake.
Please avoid top-posting, it makes hard to follow your case history.
ffmpeg -i "0.0.m2v" -i "0.0.ac3" -target ntsc-dvd \
-vcodec copy -acodec copy "title0.vob" -map 0:0 -map 1:0
Reordering the options makes no difference unfortunately.
Try also to reorder your preparation commands like this:
ffmpeg -i "3gp.3gp" -target ntsc-dvd -ab 64k -ac 1 -acodec ac3 -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -target ntsc-dvd \
-minrate 3000000 -maxrate 3000000 -b 3000000 -me log \
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an "0.0.m2v"

And could you please post ffmpeg's output messages
(in the 3 command lines)?
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Post by herve.flores
Post by Dennis Meuwissen
http://members.home.nl/meuwissenth/3gp.3gp that was converted to
audio plus video using
ffmpeg -i "3gp.3gp" -ab 64 -ac 1 -acodec ac3 -target ntsc-dvd -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -minrate 3000000 -maxrate 3000000 -b 3000000 -me
log -sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -target
ntsc-dvd -an "0.0.m2v"
http://members.home.nl/meuwissenth/0.0.ac3
http://members.home.nl/meuwissenth/0.0.m2v
I do them separately because they're part of an automated process
that might also concatenate two or more converted video files.
They were muxed together using
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -target
ntsc-dvd "title0.vob" -map 0:0 -map 1:0
you encode elementary streams, then you mux them (with a lot of
"complicated" parameters: map, target)
why did you only mux them like this?
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -f dvd
"title0.vob"
PS: works great with dvdauthor (and the framerate or size is include
in the m2v, no problem)
Regards,
V?ctor
Dennis Meuwissen
2007-03-15 07:08:57 UTC
Permalink
Post by Víctor Paesa
Hi,
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Because it's part of an automated process that can handle more than one
audio stream, hence the -map parameters (together with -newaudio when
more than one audio stream is muxed). In the case of muxing any dvd
-target is indeed equal to -f dvd, but I used -target for consistency's
sake.
Please avoid top-posting, it makes hard to follow your case history.
ffmpeg -i "0.0.m2v" -i "0.0.ac3" -target ntsc-dvd \
-vcodec copy -acodec copy "title0.vob" -map 0:0 -map 1:0
Reordering the options makes no difference unfortunately.
ffmpeg -i "3gp.3gp" -target ntsc-dvd -ab 64k -ac 1 -acodec ac3 -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -target ntsc-dvd \
-minrate 3000000 -maxrate 3000000 -b 3000000 -me log \
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an "0.0.m2v"
And could you please post ffmpeg's output messages
(in the 3 command lines)?
Again, no difference in output.

Audio:
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"c:\documents and settings\dennis\bureaublad\dvdflick\samples\3gp.3gp"
-target ntsc-dvd -ab 64k -ac 1 -acodec ac3 -vn "e:\woodvd\0.0.0.ac3"
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\documents and
settings\dennis\bureaublad\dvdflick\samples\3gp.3gp':
Duration: 00:00:38.2, start: 0.000000, bitrate: 89 kb/s
Stream #0.0(jpn): Video: h263, yuv420p, 176x144, 29.97 fps(r)
Stream #0.1(jpn): Audio: amr_nb, 8000 Hz, mono
Output #0, dvd, to 'e:\woodvd\0.0.0.ac3':
Stream #0.0: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 88kB time=11.0 bitrate= 65.7kbits/s
size= 176kB time=22.0 bitrate= 65.6kbits/s
size= 270kB time=34.0 bitrate= 65.1kbits/s
size= 306kB time=38.2 bitrate= 65.7kbits/s

video:0kB audio:298kB global headers:0kB muxing overhead 2.598491%


Video:
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"c:\documents and settings\dennis\bureaublad\dvdflick\samples\3gp.3gp"
-target ntsc-dvd -minrate 3000000 -maxrate 3000000 -b 3000000 -me log
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an
"e:\woodvd\0.0.m2v"
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\documents and
settings\dennis\bureaublad\dvdflick\samples\3gp.3gp':
Duration: 00:00:38.2, start: 0.000000, bitrate: 89 kb/s
Stream #0.0(jpn): Video: h263, yuv420p, 176x144, 29.97 fps(r)
Stream #0.1(jpn): Audio: amr_nb, 8000 Hz, mono
Output #0, dvd, to 'e:\woodvd\0.0.m2v':
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 16 q=2.0 size= 214kB time=0.4 bitrate=4041.5kbits/s
frame= 38 q=4.4 size= 470kB time=1.2 bitrate=3296.9kbits/s
<..snip..>
frame= 1127 q=2.5 size= 14104kB time=37.5 bitrate=3080.7kbits/s
frame= 1137 q=2.5 Lsize= 14262kB time=37.9 bitrate=3082.3kbits/s

video:6114kB audio:0kB global headers:0kB muxing overhead 133.280914%


Muxing:
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"e:\woodvd\0.0.m2v" -i "e:\woodvd\0.0.ac3" -target ntsc-dvd -vcodec copy
-acodec copy "e:\woodvd\title0.vob" -map 0:0 -map 1:0
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Input #0, mpeg, from 'e:\woodvd\0.0.m2v':
Duration: 00:00:37.2, start: 0.500000, bitrate: 3140 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 3000 kb/s,
29.97 fps(r)
Input #1, mpeg, from 'e:\woodvd\0.0.ac3':
Duration: 00:00:07.5, start: 0.500000, bitrate: 330 kb/s
Stream #1.0[0x80]: Audio: ac3, 48000 Hz, mono, 64 kb/s
Output #0, dvd, to 'e:\woodvd\title0.vob':
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
frame= 900 q=0.0 size= 11312kB time=30.0 bitrate=3089.3kbits/s
frame= 1137 q=159952.3 Lsize= 14318kB time=37.9 bitrate=3094.4kbits/s

video:13842kB audio:298kB global headers:0kB muxing overhead 1.258463%
Post by Víctor Paesa
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Post by herve.flores
Post by Dennis Meuwissen
http://members.home.nl/meuwissenth/3gp.3gp that was converted to
audio plus video using
ffmpeg -i "3gp.3gp" -ab 64 -ac 1 -acodec ac3 -target ntsc-dvd -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -minrate 3000000 -maxrate 3000000 -b 3000000 -me
log -sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -target
ntsc-dvd -an "0.0.m2v"
http://members.home.nl/meuwissenth/0.0.ac3
http://members.home.nl/meuwissenth/0.0.m2v
I do them separately because they're part of an automated process
that might also concatenate two or more converted video files.
They were muxed together using
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -target
ntsc-dvd "title0.vob" -map 0:0 -map 1:0
you encode elementary streams, then you mux them (with a lot of
"complicated" parameters: map, target)
why did you only mux them like this?
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -f dvd
"title0.vob"
PS: works great with dvdauthor (and the framerate or size is include
in the m2v, no problem)
Regards,
V?ctor
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at mplayerhq.hu
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Víctor Paesa
2007-03-16 19:39:29 UTC
Permalink
Hi,
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Because it's part of an automated process that can handle more than one
audio stream, hence the -map parameters (together with -newaudio when
more than one audio stream is muxed). In the case of muxing any dvd
-target is indeed equal to -f dvd, but I used -target for
consistency's
sake.
Please avoid top-posting, it makes hard to follow your case history.
ffmpeg -i "0.0.m2v" -i "0.0.ac3" -target ntsc-dvd \
-vcodec copy -acodec copy "title0.vob" -map 0:0 -map 1:0
Reordering the options makes no difference unfortunately.
ffmpeg -i "3gp.3gp" -target ntsc-dvd -ab 64k -ac 1 -acodec ac3 -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -target ntsc-dvd \
-minrate 3000000 -maxrate 3000000 -b 3000000 -me log \
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an "0.0.m2v"
And could you please post ffmpeg's output messages
(in the 3 command lines)?
Again, no difference in output.
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"c:\documents and settings\dennis\bureaublad\dvdflick\samples\3gp.3gp"
-target ntsc-dvd -ab 64k -ac 1 -acodec ac3 -vn "e:\woodvd\0.0.0.ac3"
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\documents and
Duration: 00:00:38.2, start: 0.000000, bitrate: 89 kb/s
Stream #0.0(jpn): Video: h263, yuv420p, 176x144, 29.97 fps(r)
Stream #0.1(jpn): Audio: amr_nb, 8000 Hz, mono
Stream #0.0: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 88kB time=11.0 bitrate= 65.7kbits/s
size= 176kB time=22.0 bitrate= 65.6kbits/s
size= 270kB time=34.0 bitrate= 65.1kbits/s
size= 306kB time=38.2 bitrate= 65.7kbits/s
video:0kB audio:298kB global headers:0kB muxing overhead 2.598491%
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"c:\documents and settings\dennis\bureaublad\dvdflick\samples\3gp.3gp"
-target ntsc-dvd -minrate 3000000 -maxrate 3000000 -b 3000000 -me log
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an
"e:\woodvd\0.0.m2v"
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\documents and
Duration: 00:00:38.2, start: 0.000000, bitrate: 89 kb/s
Stream #0.0(jpn): Video: h263, yuv420p, 176x144, 29.97 fps(r)
Stream #0.1(jpn): Audio: amr_nb, 8000 Hz, mono
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 16 q=2.0 size= 214kB time=0.4 bitrate=4041.5kbits/s
frame= 38 q=4.4 size= 470kB time=1.2 bitrate=3296.9kbits/s
<..snip..>
frame= 1127 q=2.5 size= 14104kB time=37.5 bitrate=3080.7kbits/s
frame= 1137 q=2.5 Lsize= 14262kB time=37.9 bitrate=3082.3kbits/s
video:6114kB audio:0kB global headers:0kB muxing overhead 133.280914%
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"e:\woodvd\0.0.m2v" -i "e:\woodvd\0.0.ac3" -target ntsc-dvd -vcodec copy
-acodec copy "e:\woodvd\title0.vob" -map 0:0 -map 1:0
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Duration: 00:00:37.2, start: 0.500000, bitrate: 3140 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 3000 kb/s,
29.97 fps(r)
Duration: 00:00:07.5, start: 0.500000, bitrate: 330 kb/s
Stream #1.0[0x80]: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
frame= 900 q=0.0 size= 11312kB time=30.0 bitrate=3089.3kbits/s
frame= 1137 q=159952.3 Lsize= 14318kB time=37.9 bitrate=3094.4kbits/s
video:13842kB audio:298kB global headers:0kB muxing overhead 1.258463%
Confirmed, it happens as Paul Curtis said: only a few NAV packets are
created:

$ mpeg2desc < title0.vob|fgrep -c 'pes private2'
Could not read
2

However, I found that adding the genpts flag solves the issue for me:

ffmpeg -fflags genpts -i "0.0.m2v" -i "0.0.ac3" -target ntsc-dvd \
-vcodec copy -acodec copy "title0_genpts.vob" -map 0:0 -map 1:0

FFmpeg version SVN-r8307, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --disable-static --enable-shared --enable-gpl
--enable-swscaler --enable-pthreads --enable-liba52 --enable-avisynth
--enable-libdts --enable-libfaac --enable-libfaad --enable-libgsm
--enable-libmp3lame --enable-libnut --enable-libogg --enable-libtheora
--enable-libvorbis --enable-x264 --enable-xvid --enable-amr_nb
--enable-amr_wb --cpu=pentium4
libavutil version: 49.3.0
libavcodec version: 51.38.0
libavformat version: 51.10.0
built on Mar 9 2007 19:32:28, gcc: 3.4.4 (cygming special, gdc 0.12,
using dmd 0.125)
Input #0, mpeg, from '0.0.m2v':
Duration: 00:00:37.2, start: 0.500000, bitrate: 3140 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 3000 kb/s,
29.97 fps(r)
Input #1, mpeg, from '0.0.ac3':
Duration: 00:00:07.5, start: 0.500000, bitrate: 330 kb/s
Stream #1.0[0x80]: Audio: ac3, 48000 Hz, mono, 64 kb/s
Output #0, dvd, to 'title0_genpts.vob':
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
frame= 1137 q=15.3 Lsize= 14472kB time=37.9 bitrate=3127.7kbits/s
video:13842kB audio:298kB global headers:0kB muxing overhead 2.347567%

$ mpeg2desc < title0_genpts.vob|fgrep -c 'pes private2'
Could not read
96

Could you please try that?
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Post by herve.flores
Post by Dennis Meuwissen
http://members.home.nl/meuwissenth/3gp.3gp that was converted to
audio plus video using
ffmpeg -i "3gp.3gp" -ab 64 -ac 1 -acodec ac3 -target ntsc-dvd -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -minrate 3000000 -maxrate 3000000 -b 3000000 -me
log -sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -target
ntsc-dvd -an "0.0.m2v"
http://members.home.nl/meuwissenth/0.0.ac3
http://members.home.nl/meuwissenth/0.0.m2v
I do them separately because they're part of an automated process
that might also concatenate two or more converted video files.
They were muxed together using
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -target
ntsc-dvd "title0.vob" -map 0:0 -map 1:0
you encode elementary streams, then you mux them (with a lot of
"complicated" parameters: map, target)
why did you only mux them like this?
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -f dvd
"title0.vob"
PS: works great with dvdauthor (and the framerate or size is include
in the m2v, no problem)
Regards,
V?ctor
Dennis Meuwissen
2007-03-16 20:26:31 UTC
Permalink
Post by Víctor Paesa
Hi,
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Because it's part of an automated process that can handle more than one
audio stream, hence the -map parameters (together with -newaudio when
more than one audio stream is muxed). In the case of muxing any dvd
-target is indeed equal to -f dvd, but I used -target for
consistency's
sake.
Please avoid top-posting, it makes hard to follow your case history.
ffmpeg -i "0.0.m2v" -i "0.0.ac3" -target ntsc-dvd \
-vcodec copy -acodec copy "title0.vob" -map 0:0 -map 1:0
Reordering the options makes no difference unfortunately.
ffmpeg -i "3gp.3gp" -target ntsc-dvd -ab 64k -ac 1 -acodec ac3 -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -target ntsc-dvd \
-minrate 3000000 -maxrate 3000000 -b 3000000 -me log \
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an "0.0.m2v"
And could you please post ffmpeg's output messages
(in the 3 command lines)?
Again, no difference in output.
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"c:\documents and settings\dennis\bureaublad\dvdflick\samples\3gp.3gp"
-target ntsc-dvd -ab 64k -ac 1 -acodec ac3 -vn "e:\woodvd\0.0.0.ac3"
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\documents and
Duration: 00:00:38.2, start: 0.000000, bitrate: 89 kb/s
Stream #0.0(jpn): Video: h263, yuv420p, 176x144, 29.97 fps(r)
Stream #0.1(jpn): Audio: amr_nb, 8000 Hz, mono
Stream #0.0: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 88kB time=11.0 bitrate= 65.7kbits/s
size= 176kB time=22.0 bitrate= 65.6kbits/s
size= 270kB time=34.0 bitrate= 65.1kbits/s
size= 306kB time=38.2 bitrate= 65.7kbits/s
video:0kB audio:298kB global headers:0kB muxing overhead 2.598491%
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"c:\documents and settings\dennis\bureaublad\dvdflick\samples\3gp.3gp"
-target ntsc-dvd -minrate 3000000 -maxrate 3000000 -b 3000000 -me log
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an
"e:\woodvd\0.0.m2v"
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\documents and
Duration: 00:00:38.2, start: 0.000000, bitrate: 89 kb/s
Stream #0.0(jpn): Video: h263, yuv420p, 176x144, 29.97 fps(r)
Stream #0.1(jpn): Audio: amr_nb, 8000 Hz, mono
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 16 q=2.0 size= 214kB time=0.4 bitrate=4041.5kbits/s
frame= 38 q=4.4 size= 470kB time=1.2 bitrate=3296.9kbits/s
<..snip..>
frame= 1127 q=2.5 size= 14104kB time=37.5 bitrate=3080.7kbits/s
frame= 1137 q=2.5 Lsize= 14262kB time=37.9 bitrate=3082.3kbits/s
video:6114kB audio:0kB global headers:0kB muxing overhead 133.280914%
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"e:\woodvd\0.0.m2v" -i "e:\woodvd\0.0.ac3" -target ntsc-dvd -vcodec copy
-acodec copy "e:\woodvd\title0.vob" -map 0:0 -map 1:0
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Duration: 00:00:37.2, start: 0.500000, bitrate: 3140 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 3000 kb/s,
29.97 fps(r)
Duration: 00:00:07.5, start: 0.500000, bitrate: 330 kb/s
Stream #1.0[0x80]: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
frame= 900 q=0.0 size= 11312kB time=30.0 bitrate=3089.3kbits/s
frame= 1137 q=159952.3 Lsize= 14318kB time=37.9 bitrate=3094.4kbits/s
video:13842kB audio:298kB global headers:0kB muxing overhead 1.258463%
Confirmed, it happens as Paul Curtis said: only a few NAV packets are
$ mpeg2desc < title0.vob|fgrep -c 'pes private2'
Could not read
2
ffmpeg -fflags genpts -i "0.0.m2v" -i "0.0.ac3" -target ntsc-dvd \
-vcodec copy -acodec copy "title0_genpts.vob" -map 0:0 -map 1:0
FFmpeg version SVN-r8307, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --disable-static --enable-shared --enable-gpl
--enable-swscaler --enable-pthreads --enable-liba52 --enable-avisynth
--enable-libdts --enable-libfaac --enable-libfaad --enable-libgsm
--enable-libmp3lame --enable-libnut --enable-libogg --enable-libtheora
--enable-libvorbis --enable-x264 --enable-xvid --enable-amr_nb
--enable-amr_wb --cpu=pentium4
libavutil version: 49.3.0
libavcodec version: 51.38.0
libavformat version: 51.10.0
built on Mar 9 2007 19:32:28, gcc: 3.4.4 (cygming special, gdc 0.12,
using dmd 0.125)
Duration: 00:00:37.2, start: 0.500000, bitrate: 3140 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 3000 kb/s,
29.97 fps(r)
Duration: 00:00:07.5, start: 0.500000, bitrate: 330 kb/s
Stream #1.0[0x80]: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
frame= 1137 q=15.3 Lsize= 14472kB time=37.9 bitrate=3127.7kbits/s
video:13842kB audio:298kB global headers:0kB muxing overhead 2.347567%
$ mpeg2desc < title0_genpts.vob|fgrep -c 'pes private2'
Could not read
96
Could you please try that?
That did indeed solve the problem, however when I encode the same sample
at a higher bitrate like so:

ffmpeg.exe -i "3gp.3gp" -target ntsc-dvd -minrate 9000000 -maxrate
9000000 -b 9000000 -me log -sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3
-s 720x480 -an "0.0.vob"

And then multiplex again;

ffmpeg.exe -fflags genpts -i "0.0.vob" -i "0.0.ac3" -target ntsc-dvd
-vcodec copy -acodec copy "title0.vob" -map 0:0 -map 1:0

...the symptoms return. Missing NAV packets before a new GOP, no
seeking, etc.
Post by Víctor Paesa
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Post by herve.flores
Post by Dennis Meuwissen
http://members.home.nl/meuwissenth/3gp.3gp that was converted to
audio plus video using
ffmpeg -i "3gp.3gp" -ab 64 -ac 1 -acodec ac3 -target ntsc-dvd -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -minrate 3000000 -maxrate 3000000 -b 3000000 -me
log -sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -target
ntsc-dvd -an "0.0.m2v"
http://members.home.nl/meuwissenth/0.0.ac3
http://members.home.nl/meuwissenth/0.0.m2v
I do them separately because they're part of an automated process
that might also concatenate two or more converted video files.
They were muxed together using
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -target
ntsc-dvd "title0.vob" -map 0:0 -map 1:0
you encode elementary streams, then you mux them (with a lot of
"complicated" parameters: map, target)
why did you only mux them like this?
ffmpeg -vcodec copy -acodec copy -i "0.0.m2v" -i "0.0.ac3" -f dvd
"title0.vob"
PS: works great with dvdauthor (and the framerate or size is include
in the m2v, no problem)
Regards,
V?ctor
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at mplayerhq.hu
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Paul Curtis
2007-03-16 20:23:16 UTC
Permalink
Post by Dennis Meuwissen
Post by Víctor Paesa
Hi,
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Because it's part of an automated process that can handle more than one
audio stream, hence the -map parameters (together with -newaudio when
more than one audio stream is muxed). In the case of muxing any dvd
-target is indeed equal to -f dvd, but I used -target for consistency's
sake.
Please avoid top-posting, it makes hard to follow your case history.
ffmpeg -i "0.0.m2v" -i "0.0.ac3" -target ntsc-dvd \
-vcodec copy -acodec copy "title0.vob" -map 0:0 -map 1:0
Reordering the options makes no difference unfortunately.
ffmpeg -i "3gp.3gp" -target ntsc-dvd -ab 64k -ac 1 -acodec ac3 -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -target ntsc-dvd \
-minrate 3000000 -maxrate 3000000 -b 3000000 -me log \
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an "0.0.m2v"
And could you please post ffmpeg's output messages
(in the 3 command lines)?
Again, no difference in output.
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"c:\documents and settings\dennis\bureaublad\dvdflick\samples\3gp.3gp"
-target ntsc-dvd -ab 64k -ac 1 -acodec ac3 -vn "e:\woodvd\0.0.0.ac3"
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\documents and
Duration: 00:00:38.2, start: 0.000000, bitrate: 89 kb/s
Stream #0.0(jpn): Video: h263, yuv420p, 176x144, 29.97 fps(r)
Stream #0.1(jpn): Audio: amr_nb, 8000 Hz, mono
Stream #0.0: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 88kB time=11.0 bitrate= 65.7kbits/s
size= 176kB time=22.0 bitrate= 65.6kbits/s
size= 270kB time=34.0 bitrate= 65.1kbits/s
size= 306kB time=38.2 bitrate= 65.7kbits/s
video:0kB audio:298kB global headers:0kB muxing overhead 2.598491%
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"c:\documents and settings\dennis\bureaublad\dvdflick\samples\3gp.3gp"
-target ntsc-dvd -minrate 3000000 -maxrate 3000000 -b 3000000 -me log
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an
"e:\woodvd\0.0.m2v"
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\documents and
Duration: 00:00:38.2, start: 0.000000, bitrate: 89 kb/s
Stream #0.0(jpn): Video: h263, yuv420p, 176x144, 29.97 fps(r)
Stream #0.1(jpn): Audio: amr_nb, 8000 Hz, mono
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 16 q=2.0 size= 214kB time=0.4 bitrate=4041.5kbits/s
frame= 38 q=4.4 size= 470kB time=1.2 bitrate=3296.9kbits/s
<..snip..>
frame= 1127 q=2.5 size= 14104kB time=37.5 bitrate=3080.7kbits/s
frame= 1137 q=2.5 Lsize= 14262kB time=37.9 bitrate=3082.3kbits/s
video:6114kB audio:0kB global headers:0kB muxing overhead 133.280914%
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"e:\woodvd\0.0.m2v" -i "e:\woodvd\0.0.ac3" -target ntsc-dvd -vcodec copy
-acodec copy "e:\woodvd\title0.vob" -map 0:0 -map 1:0
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Duration: 00:00:37.2, start: 0.500000, bitrate: 3140 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 3000 kb/s,
29.97 fps(r)
Duration: 00:00:07.5, start: 0.500000, bitrate: 330 kb/s
Stream #1.0[0x80]: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
frame= 900 q=0.0 size= 11312kB time=30.0 bitrate=3089.3kbits/s
frame= 1137 q=159952.3 Lsize= 14318kB time=37.9 bitrate=3094.4kbits/s
video:13842kB audio:298kB global headers:0kB muxing overhead 1.258463%
Confirmed, it happens as Paul Curtis said: only a few NAV packets are
$ mpeg2desc < title0.vob|fgrep -c 'pes private2'
Could not read
2
ffmpeg -fflags genpts -i "0.0.m2v" -i "0.0.ac3" -target ntsc-dvd \
-vcodec copy -acodec copy "title0_genpts.vob" -map 0:0 -map 1:0
FFmpeg version SVN-r8307, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --disable-static --enable-shared --enable-gpl
--enable-swscaler --enable-pthreads --enable-liba52 --enable-avisynth
--enable-libdts --enable-libfaac --enable-libfaad --enable-libgsm
--enable-libmp3lame --enable-libnut --enable-libogg --enable-libtheora
--enable-libvorbis --enable-x264 --enable-xvid --enable-amr_nb
--enable-amr_wb --cpu=pentium4
libavutil version: 49.3.0
libavcodec version: 51.38.0
libavformat version: 51.10.0
built on Mar 9 2007 19:32:28, gcc: 3.4.4 (cygming special, gdc 0.12,
using dmd 0.125)
Duration: 00:00:37.2, start: 0.500000, bitrate: 3140 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 3000 kb/s,
29.97 fps(r)
Duration: 00:00:07.5, start: 0.500000, bitrate: 330 kb/s
Stream #1.0[0x80]: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
frame= 1137 q=15.3 Lsize= 14472kB time=37.9 bitrate=3127.7kbits/s
video:13842kB audio:298kB global headers:0kB muxing overhead 2.347567%
$ mpeg2desc < title0_genpts.vob|fgrep -c 'pes private2'
Could not read
96
Could you please try that?
That did indeed solve the problem, however when I encode the same sample
ffmpeg.exe -i "3gp.3gp" -target ntsc-dvd -minrate 9000000 -maxrate
9000000 -b 9000000 -me log -sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3
-s 720x480 -an "0.0.vob"
And then multiplex again;
ffmpeg.exe -fflags genpts -i "0.0.vob" -i "0.0.ac3" -target ntsc-dvd
-vcodec copy -acodec copy "title0.vob" -map 0:0 -map 1:0
...the symptoms return. Missing NAV packets before a new GOP, no
seeking, etc.
'-genpts' forces the recreation of the packets in the stream, IIRC, so
that should be a method to place the NAV packets back in.

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3233 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-user/attachments/20070316/c721d0ff/attachment.bin>
Víctor Paesa
2007-03-16 22:07:25 UTC
Permalink
Hi,
Post by Paul Curtis
Post by Dennis Meuwissen
Post by Víctor Paesa
Hi,
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Because it's part of an automated process that can handle more
than
one
audio stream, hence the -map parameters (together with -newaudio when
more than one audio stream is muxed). In the case of muxing any dvd
-target is indeed equal to -f dvd, but I used -target for consistency's
sake.
Please avoid top-posting, it makes hard to follow your case history.
ffmpeg -i "0.0.m2v" -i "0.0.ac3" -target ntsc-dvd \
-vcodec copy -acodec copy "title0.vob" -map 0:0 -map 1:0
Reordering the options makes no difference unfortunately.
ffmpeg -i "3gp.3gp" -target ntsc-dvd -ab 64k -ac 1 -acodec ac3 -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -target ntsc-dvd \
-minrate 3000000 -maxrate 3000000 -b 3000000 -me log \
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an "0.0.m2v"
And could you please post ffmpeg's output messages
(in the 3 command lines)?
Again, no difference in output.
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"c:\documents and settings\dennis\bureaublad\dvdflick\samples\3gp.3gp"
-target ntsc-dvd -ab 64k -ac 1 -acodec ac3 -vn "e:\woodvd\0.0.0.ac3"
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\documents and
Duration: 00:00:38.2, start: 0.000000, bitrate: 89 kb/s
Stream #0.0(jpn): Video: h263, yuv420p, 176x144, 29.97 fps(r)
Stream #0.1(jpn): Audio: amr_nb, 8000 Hz, mono
Stream #0.0: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 88kB time=11.0 bitrate= 65.7kbits/s
size= 176kB time=22.0 bitrate= 65.6kbits/s
size= 270kB time=34.0 bitrate= 65.1kbits/s
size= 306kB time=38.2 bitrate= 65.7kbits/s
video:0kB audio:298kB global headers:0kB muxing overhead 2.598491%
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"c:\documents and settings\dennis\bureaublad\dvdflick\samples\3gp.3gp"
-target ntsc-dvd -minrate 3000000 -maxrate 3000000 -b 3000000 -me log
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an
"e:\woodvd\0.0.m2v"
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\documents and
Duration: 00:00:38.2, start: 0.000000, bitrate: 89 kb/s
Stream #0.0(jpn): Video: h263, yuv420p, 176x144, 29.97 fps(r)
Stream #0.1(jpn): Audio: amr_nb, 8000 Hz, mono
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 16 q=2.0 size= 214kB time=0.4 bitrate=4041.5kbits/s
frame= 38 q=4.4 size= 470kB time=1.2 bitrate=3296.9kbits/s
<..snip..>
frame= 1127 q=2.5 size= 14104kB time=37.5 bitrate=3080.7kbits/s
frame= 1137 q=2.5 Lsize= 14262kB time=37.9 bitrate=3082.3kbits/s
video:6114kB audio:0kB global headers:0kB muxing overhead 133.280914%
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"e:\woodvd\0.0.m2v" -i "e:\woodvd\0.0.ac3" -target ntsc-dvd -vcodec copy
-acodec copy "e:\woodvd\title0.vob" -map 0:0 -map 1:0
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Duration: 00:00:37.2, start: 0.500000, bitrate: 3140 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 3000 kb/s,
29.97 fps(r)
Duration: 00:00:07.5, start: 0.500000, bitrate: 330 kb/s
Stream #1.0[0x80]: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
frame= 900 q=0.0 size= 11312kB time=30.0 bitrate=3089.3kbits/s
frame= 1137 q=159952.3 Lsize= 14318kB time=37.9
bitrate=3094.4kbits/s
video:13842kB audio:298kB global headers:0kB muxing overhead 1.258463%
Confirmed, it happens as Paul Curtis said: only a few NAV packets are
$ mpeg2desc < title0.vob|fgrep -c 'pes private2'
Could not read
2
ffmpeg -fflags genpts -i "0.0.m2v" -i "0.0.ac3" -target ntsc-dvd \
-vcodec copy -acodec copy "title0_genpts.vob" -map 0:0 -map 1:0
FFmpeg version SVN-r8307, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --disable-static --enable-shared --enable-gpl
--enable-swscaler --enable-pthreads --enable-liba52 --enable-avisynth
--enable-libdts --enable-libfaac --enable-libfaad --enable-libgsm
--enable-libmp3lame --enable-libnut --enable-libogg --enable-libtheora
--enable-libvorbis --enable-x264 --enable-xvid --enable-amr_nb
--enable-amr_wb --cpu=pentium4
libavutil version: 49.3.0
libavcodec version: 51.38.0
libavformat version: 51.10.0
built on Mar 9 2007 19:32:28, gcc: 3.4.4 (cygming special, gdc 0.12,
using dmd 0.125)
Duration: 00:00:37.2, start: 0.500000, bitrate: 3140 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 3000 kb/s,
29.97 fps(r)
Duration: 00:00:07.5, start: 0.500000, bitrate: 330 kb/s
Stream #1.0[0x80]: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
frame= 1137 q=15.3 Lsize= 14472kB time=37.9 bitrate=3127.7kbits/s
video:13842kB audio:298kB global headers:0kB muxing overhead 2.347567%
$ mpeg2desc < title0_genpts.vob|fgrep -c 'pes private2'
Could not read
96
Could you please try that?
That did indeed solve the problem, however when I encode the same sample
ffmpeg.exe -i "3gp.3gp" -target ntsc-dvd -minrate 9000000 -maxrate
9000000 -b 9000000 -me log -sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3
-s 720x480 -an "0.0.vob"
And then multiplex again;
ffmpeg.exe -fflags genpts -i "0.0.vob" -i "0.0.ac3" -target ntsc-dvd
-vcodec copy -acodec copy "title0.vob" -map 0:0 -map 1:0
...the symptoms return. Missing NAV packets before a new GOP, no
seeking, etc.
'-genpts' forces the recreation of the packets in the stream, IIRC, so
that should be a method to place the NAV packets back in.
Yes, that's the idea of "-fflags genpts", but it doesn't work here for
all video bitrates.

I have been playing with the audio bitrates, and it seems that it gradually
looses NAV packets as "-ab" gets lower.

This keeps 160 NAVs (the same that there are in 0.0.m2v):

ffmpeg -i 3gp.3gp -target ntsc-dvd -ab 224k -ac 1 -acodec ac3 -vn 0.0.ac3
ffmpeg -i 3gp.3gp -target ntsc-dvd \
-minrate 9000000 -maxrate 9000000 -b 9000000 -me log \
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an 0.0.m2v
ffmpeg -i 0.0.m2v -i 0.0.ac3 -target ntsc-dvd \
-vcodec copy -acodec copy title0.vob -map 0:0 -map 1:0

Then -ab 192k keeps 130, 160k keeps 62, 128k or lower keeps 2.
Though I have no idea why.

Regards,
V?ctor
Paul Curtis
2007-03-16 22:44:01 UTC
Permalink
Post by Víctor Paesa
Hi,
Post by Paul Curtis
Post by Dennis Meuwissen
Post by Víctor Paesa
Hi,
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Post by Víctor Paesa
Post by Dennis Meuwissen
Because it's part of an automated process that can handle more
than
one
audio stream, hence the -map parameters (together with -newaudio when
more than one audio stream is muxed). In the case of muxing any dvd
-target is indeed equal to -f dvd, but I used -target for consistency's
sake.
Please avoid top-posting, it makes hard to follow your case history.
ffmpeg -i "0.0.m2v" -i "0.0.ac3" -target ntsc-dvd \
-vcodec copy -acodec copy "title0.vob" -map 0:0 -map 1:0
Reordering the options makes no difference unfortunately.
ffmpeg -i "3gp.3gp" -target ntsc-dvd -ab 64k -ac 1 -acodec ac3 -vn "0.0.ac3"
ffmpeg -i "3gp.3gp" -target ntsc-dvd \
-minrate 3000000 -maxrate 3000000 -b 3000000 -me log \
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an "0.0.m2v"
And could you please post ffmpeg's output messages
(in the 3 command lines)?
Again, no difference in output.
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"c:\documents and settings\dennis\bureaublad\dvdflick\samples\3gp.3gp"
-target ntsc-dvd -ab 64k -ac 1 -acodec ac3 -vn "e:\woodvd\0.0.0.ac3"
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\documents and
Duration: 00:00:38.2, start: 0.000000, bitrate: 89 kb/s
Stream #0.0(jpn): Video: h263, yuv420p, 176x144, 29.97 fps(r)
Stream #0.1(jpn): Audio: amr_nb, 8000 Hz, mono
Stream #0.0: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 88kB time=11.0 bitrate= 65.7kbits/s
size= 176kB time=22.0 bitrate= 65.6kbits/s
size= 270kB time=34.0 bitrate= 65.1kbits/s
size= 306kB time=38.2 bitrate= 65.7kbits/s
video:0kB audio:298kB global headers:0kB muxing overhead 2.598491%
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"c:\documents and settings\dennis\bureaublad\dvdflick\samples\3gp.3gp"
-target ntsc-dvd -minrate 3000000 -maxrate 3000000 -b 3000000 -me log
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an
"e:\woodvd\0.0.m2v"
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\documents and
Duration: 00:00:38.2, start: 0.000000, bitrate: 89 kb/s
Stream #0.0(jpn): Video: h263, yuv420p, 176x144, 29.97 fps(r)
Stream #0.1(jpn): Audio: amr_nb, 8000 Hz, mono
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 16 q=2.0 size= 214kB time=0.4 bitrate=4041.5kbits/s
frame= 38 q=4.4 size= 470kB time=1.2 bitrate=3296.9kbits/s
<..snip..>
frame= 1127 q=2.5 size= 14104kB time=37.5 bitrate=3080.7kbits/s
frame= 1137 q=2.5 Lsize= 14262kB time=37.9 bitrate=3082.3kbits/s
video:6114kB audio:0kB global headers:0kB muxing overhead 133.280914%
C:\Documents and Settings\Dennis\Bureaublad\dvdflick\ffmpeg.exe -i
"e:\woodvd\0.0.m2v" -i "e:\woodvd\0.0.ac3" -target ntsc-dvd -vcodec copy
-acodec copy "e:\woodvd\title0.vob" -map 0:0 -map 1:0
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis
--enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686
--enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Duration: 00:00:37.2, start: 0.500000, bitrate: 3140 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 3000 kb/s,
29.97 fps(r)
Duration: 00:00:07.5, start: 0.500000, bitrate: 330 kb/s
Stream #1.0[0x80]: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
frame= 900 q=0.0 size= 11312kB time=30.0 bitrate=3089.3kbits/s
frame= 1137 q=159952.3 Lsize= 14318kB time=37.9
bitrate=3094.4kbits/s
video:13842kB audio:298kB global headers:0kB muxing overhead 1.258463%
Confirmed, it happens as Paul Curtis said: only a few NAV packets are
$ mpeg2desc < title0.vob|fgrep -c 'pes private2'
Could not read
2
ffmpeg -fflags genpts -i "0.0.m2v" -i "0.0.ac3" -target ntsc-dvd \
-vcodec copy -acodec copy "title0_genpts.vob" -map 0:0 -map 1:0
FFmpeg version SVN-r8307, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --disable-static --enable-shared --enable-gpl
--enable-swscaler --enable-pthreads --enable-liba52 --enable-avisynth
--enable-libdts --enable-libfaac --enable-libfaad --enable-libgsm
--enable-libmp3lame --enable-libnut --enable-libogg --enable-libtheora
--enable-libvorbis --enable-x264 --enable-xvid --enable-amr_nb
--enable-amr_wb --cpu=pentium4
libavutil version: 49.3.0
libavcodec version: 51.38.0
libavformat version: 51.10.0
built on Mar 9 2007 19:32:28, gcc: 3.4.4 (cygming special, gdc 0.12,
using dmd 0.125)
Duration: 00:00:37.2, start: 0.500000, bitrate: 3140 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 3000 kb/s,
29.97 fps(r)
Duration: 00:00:07.5, start: 0.500000, bitrate: 330 kb/s
Stream #1.0[0x80]: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 3000 kb/s,
29.97 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, mono, 64 kb/s
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
frame= 1137 q=15.3 Lsize= 14472kB time=37.9 bitrate=3127.7kbits/s
video:13842kB audio:298kB global headers:0kB muxing overhead 2.347567%
$ mpeg2desc < title0_genpts.vob|fgrep -c 'pes private2'
Could not read
96
Could you please try that?
That did indeed solve the problem, however when I encode the same sample
ffmpeg.exe -i "3gp.3gp" -target ntsc-dvd -minrate 9000000 -maxrate
9000000 -b 9000000 -me log -sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3
-s 720x480 -an "0.0.vob"
And then multiplex again;
ffmpeg.exe -fflags genpts -i "0.0.vob" -i "0.0.ac3" -target ntsc-dvd
-vcodec copy -acodec copy "title0.vob" -map 0:0 -map 1:0
...the symptoms return. Missing NAV packets before a new GOP, no
seeking, etc.
'-genpts' forces the recreation of the packets in the stream, IIRC, so
that should be a method to place the NAV packets back in.
Yes, that's the idea of "-fflags genpts", but it doesn't work here for
all video bitrates.
I have been playing with the audio bitrates, and it seems that it gradually
looses NAV packets as "-ab" gets lower.
ffmpeg -i 3gp.3gp -target ntsc-dvd -ab 224k -ac 1 -acodec ac3 -vn 0.0.ac3
ffmpeg -i 3gp.3gp -target ntsc-dvd \
-minrate 9000000 -maxrate 9000000 -b 9000000 -me log \
-sc_threshold -3500 -bf 2 -dc 9 -aspect 4:3 -s 720x480 -an 0.0.m2v
ffmpeg -i 0.0.m2v -i 0.0.ac3 -target ntsc-dvd \
-vcodec copy -acodec copy title0.vob -map 0:0 -map 1:0
Then -ab 192k keeps 130, 160k keeps 62, 128k or lower keeps 2.
Though I have no idea why.
I do ... IIRC, the code I wrote had a hard number of packets before it
inserted a NAV packets. The coder who picked the code up and modified it
changed the "timing" of when the NAV packets are inserted. The code uses
a FIFO and a threshold rather than a hard counter.

Paul

Continue reading on narkive:
Loading...