Discussion:
[Ffmpeg-user] Possible to encode video that is 15fps using mpeg1/2?
chuanjiang lo
2006-09-05 10:40:12 UTC
Permalink
Hi all,

I am trying to encode a video that is of 15fps.

It is showing an error that

[mpeg2video @ 68959000]MPEG1/2 does not support 15/1 fps

Is there another way of doing it?

Thanks
Michel Bardiaux
2006-09-05 11:44:51 UTC
Permalink
Post by chuanjiang lo
Hi all,
I am trying to encode a video that is of 15fps.
It is showing an error that
Is there another way of doing it?
Thanks
*Always* post the command line used and all its output messages. Its
almost impossible to help you without that.
--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
chuanjiang lo
2006-09-05 12:55:10 UTC
Permalink
Post by Michel Bardiaux
*Always* post the command line used and all its output messages. Its
almost impossible to help you without that.
C:\Program Files\FFmpeg>ffmpeg -i input.avi -vcodec mpeg1video output.mpg
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-shared --disable-static --enable-memalign-hack
libavutil version: 49.0.0
libavcodec version: 51.11.0
libavformat version: 50.5.0
built on Aug 30 2006 11:24:34, gcc: 3.4.5 (mingw special)
Input #0, avi, from 'input.avi':
Duration: 00:00:03.0, start: 0.000000, bitrate: 528 kb/s
Stream #0.0: Video: cinepak, yuv420p, 208x176, 15.00 fps(r)
Output #0, mpeg, to 'output.mpg':
Stream #0.0: Video: mpeg1video, yuv420p, 208x176, q=2-31, 200 kb/s, 15.00fps(
c)
Stream mapping:
Stream #0.0 -> #0.0
[mpeg1video @ 68959000]MPEG1/2 does not support 15/1 fps
Error while opening codec for output stream #0.0 - maybe incorrect
parameters su
ch as bit_rate, rate, width or height


Sorry i was in a rush just now..
Michel Bardiaux
2006-09-05 15:44:27 UTC
Permalink
Post by chuanjiang lo
Post by Michel Bardiaux
*Always* post the command line used and all its output messages. Its
almost impossible to help you without that.
C:\Program Files\FFmpeg>ffmpeg -i input.avi -vcodec mpeg1video output.mpg
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-shared --disable-static --enable-memalign-hack
libavutil version: 49.0.0
libavcodec version: 51.11.0
libavformat version: 50.5.0
built on Aug 30 2006 11:24:34, gcc: 3.4.5 (mingw special)
Duration: 00:00:03.0, start: 0.000000, bitrate: 528 kb/s
Stream #0.0: Video: cinepak, yuv420p, 208x176, 15.00 fps(r)
Stream #0.0: Video: mpeg1video, yuv420p, 208x176, q=2-31, 200 kb/s, 15.00fps(
c)
Stream #0.0 -> #0.0
Error while opening codec for output stream #0.0 - maybe incorrect
parameters su
ch as bit_rate, rate, width or height
Plain and simple. The input avi is 15 fps. The default for output is to
keep the fps. But MPEG1 does not support 15 fps. Not a question of
implementation, simply of what the standard accepts.

Try

ffmpeg -i input.avi -vcodec mpeg1video -r 15 output.mpg
Post by chuanjiang lo
Sorry i was in a rush just now..
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at mplayerhq.hu
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
chuanjiang lo
2006-09-05 15:50:24 UTC
Permalink
Post by Michel Bardiaux
Try
ffmpeg -i input.avi -vcodec mpeg1video -r 15 output.mpg
C:\Program Files\FFmpeg>ffmpeg -i input.avi -vcodec mpeg1video -r 15
output.mpg
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-shared --disable-static --enable-memalign-hack
libavutil version: 49.0.0
libavcodec version: 51.11.0
libavformat version: 50.5.0
built on Aug 30 2006 11:24:34, gcc: 3.4.5 (mingw special)
Input #0, avi, from 'input.avi':
Duration: 00:00:03.0, start: 0.000000, bitrate: 528 kb/s
Stream #0.0: Video: cinepak, yuv420p, 208x176, 15.00 fps(r)
Output #0, mpeg, to 'output.mpg':
Stream #0.0: Video: mpeg1video, yuv420p, 208x176, q=2-31, 200 kb/s, 15.00fps(
c)
Stream mapping:
Stream #0.0 -> #0.0
[mpeg1video @ 68959000]MPEG1/2 does not support 15/1 fps
Error while opening codec for output stream #0.0 - maybe incorrect
parameters su
ch as bit_rate, rate, width or height

I tried with the -r option but still getting the same error

So actually mpeg1/2 standard does not support 15fps but we can "force" it to
have 15fps?
Rich Felker
2006-09-05 16:06:12 UTC
Permalink
Post by chuanjiang lo
So actually mpeg1/2 standard does not support 15fps but we can "force" it to
have 15fps?
There is a "strict" option, setting it to -1 will allow you to use
nonstandard framerates that violate the spec by storing them with
common hacks that work in some players. However normally the whole
purpose of using mpeg1 (since it's crap quality) is just to be
compatible with everything, and nonstandard framerates are not very
compatible..

You could just double every frame to get 30 fps too..

Rich
Paul Curtis
2006-09-05 15:57:11 UTC
Permalink
Post by chuanjiang lo
I tried with the -r option but still getting the same error
So actually mpeg1/2 standard does not support 15fps but we can "force" it to
have 15fps?
Probably not. Even if you did "force" the frame rate to 15 fps, how many
standards-based decoders would handle an "illegal" frame rate?

Paul

See http://www.faqs.org/faqs/mpeg-faq/part3/

What frame rates are permitted in MPEG?

A limited set is available for the choosing in MPEG-1 and the currently
defined set of Profiles and Levels of MPEG-2, although "tricks" could
be played with Systems-layer Time Stamps to convey non-standard picture
rates. The set is: 23.976 Hz (3-2 pulldown NTSC), 24 Hz (Film), 25 Hz
(PAL/SECAM or 625/60 video), 29.97 (NTSC), 30 Hz (drop-frame NTSC or
component 525/60), 50 Hz (double-rate PAL), 59.97 Hz (double rate
NTSC), and 60 Hz (double-rate, drop-frame NTSC/component 525/60
video).

Only 23.976, 24, 25, 29.97, and 30 Hz are within the conformance space
of Constrained Parameter Bitstreams and Main Level.
Michel Bardiaux
2006-09-05 16:56:10 UTC
Permalink
Post by chuanjiang lo
Post by Michel Bardiaux
Try
ffmpeg -i input.avi -vcodec mpeg1video -r 15 output.mpg
C:\Program Files\FFmpeg>ffmpeg -i input.avi -vcodec mpeg1video -r 15
output.mpg
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-shared --disable-static --enable-memalign-hack
libavutil version: 49.0.0
libavcodec version: 51.11.0
libavformat version: 50.5.0
built on Aug 30 2006 11:24:34, gcc: 3.4.5 (mingw special)
Duration: 00:00:03.0, start: 0.000000, bitrate: 528 kb/s
Stream #0.0: Video: cinepak, yuv420p, 208x176, 15.00 fps(r)
Stream #0.0: Video: mpeg1video, yuv420p, 208x176, q=2-31, 200 kb/s, 15.00fps(
c)
Stream #0.0 -> #0.0
Error while opening codec for output stream #0.0 - maybe incorrect
parameters su
ch as bit_rate, rate, width or height
I tried with the -r option but still getting the same error
My bad, should have been -r25 or -r30, sorry.
Post by chuanjiang lo
So actually mpeg1/2 standard does not support 15fps but we can "force" it to
have 15fps?
Im not sure that fps *can* be represented in the file. Anyway the file
would not work with most players.
Post by chuanjiang lo
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at mplayerhq.hu
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
chuanjiang lo
2006-09-05 17:04:43 UTC
Permalink
yah i tried and although it can be done but it doesnt play on windows media
player..

so what are the other alternatives other than using mpeg1/2 so that i can
support 15fps?
Post by Michel Bardiaux
Post by chuanjiang lo
Post by Michel Bardiaux
Try
ffmpeg -i input.avi -vcodec mpeg1video -r 15 output.mpg
C:\Program Files\FFmpeg>ffmpeg -i input.avi -vcodec mpeg1video -r 15
output.mpg
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-shared --disable-static --enable-memalign-hack
libavutil version: 49.0.0
libavcodec version: 51.11.0
libavformat version: 50.5.0
built on Aug 30 2006 11:24:34, gcc: 3.4.5 (mingw special)
Duration: 00:00:03.0, start: 0.000000, bitrate: 528 kb/s
Stream #0.0: Video: cinepak, yuv420p, 208x176, 15.00 fps(r)
Stream #0.0: Video: mpeg1video, yuv420p, 208x176, q=2-31, 200 kb/s, 15.00fps(
c)
Stream #0.0 -> #0.0
Error while opening codec for output stream #0.0 - maybe incorrect
parameters su
ch as bit_rate, rate, width or height
I tried with the -r option but still getting the same error
My bad, should have been -r25 or -r30, sorry.
Post by chuanjiang lo
So actually mpeg1/2 standard does not support 15fps but we can "force" it to
have 15fps?
Im not sure that fps *can* be represented in the file. Anyway the file
would not work with most players.
Post by chuanjiang lo
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at mplayerhq.hu
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be
Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at mplayerhq.hu
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Michel Bardiaux
2006-09-06 08:17:50 UTC
Permalink
chuanjiang lo wrote:

Please dont top-post. This is a perfect example of why top-posting is
bad: you say "I tried... it..." but there is no way to be sure WHAT you
tried and WHAT doesnt play.
Post by chuanjiang lo
yah i tried and although it can be done but it doesnt play on windows media
player..
*Please* post the command and messages
Post by chuanjiang lo
so what are the other alternatives other than using mpeg1/2 so that i can
support 15fps?
ffmpeg -i utc_1434.mpg -vcodec msmpeg4 -r 15 15.avi
FFmpeg version SVN-r6125, Copyright (c) 2000-2004 Fabrice Bellard
configuration:
libavutil version: 49.0.0
libavcodec version: 51.11.0
libavformat version: 50.5.0
built on Aug 29 2006 14:44:38, gcc: 3.3.5 (Debian 1:3.3.5-13)
Input #0, mpeg, from 'utc_1434.mpg':
Duration: 00:00:57.0, start: 92564.370489, bitrate: 668 kb/s
Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 352x288, 104857 kb/s,
25.00 fps(r)
Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, mono, 32 kb/s
Output #0, avi, to '15.avi':
Stream #0.0: Video: msmpeg4, yuv420p, 352x288, q=2-31, 200 kb/s,
15.00 fps(c)
Stream #0.1: Audio: mp2, 48000 Hz, mono, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 902 q=20.9 Lsize= 2223kB time=60.0 bitrate= 303.5kbits/s
video:1664kB audio:469kB global headers:0kB muxing overhead 4.212804%

This plays in WMP9
Post by chuanjiang lo
Post by chuanjiang lo
Post by chuanjiang lo
Post by Michel Bardiaux
Try
ffmpeg -i input.avi -vcodec mpeg1video -r 15 output.mpg
C:\Program Files\FFmpeg>ffmpeg -i input.avi -vcodec mpeg1video -r 15
output.mpg
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-shared --disable-static
--enable-memalign-hack
Post by chuanjiang lo
libavutil version: 49.0.0
libavcodec version: 51.11.0
libavformat version: 50.5.0
built on Aug 30 2006 11:24:34, gcc: 3.4.5 (mingw special)
Duration: 00:00:03.0, start: 0.000000, bitrate: 528 kb/s
Stream #0.0: Video: cinepak, yuv420p, 208x176, 15.00 fps(r)
Stream #0.0: Video: mpeg1video, yuv420p, 208x176, q=2-31, 200 kb/s, 15.00fps(
c)
Stream #0.0 -> #0.0
Error while opening codec for output stream #0.0 - maybe incorrect
parameters su
ch as bit_rate, rate, width or height
I tried with the -r option but still getting the same error
My bad, should have been -r25 or -r30, sorry.
Post by chuanjiang lo
So actually mpeg1/2 standard does not support 15fps but we can "force" it to
have 15fps?
Im not sure that fps *can* be represented in the file. Anyway the file
would not work with most players.
--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
chuanjiang lo
2006-09-08 13:07:45 UTC
Permalink
Post by Michel Bardiaux
Please dont top-post.
i apologize for the top posting again. Sorry, its just a convenience for me
to click on reply and just typing into the box and clicking send.
Michel Bardiaux
2006-09-11 08:51:25 UTC
Permalink
Post by chuanjiang lo
Post by Michel Bardiaux
Please dont top-post.
i apologize for the top posting again. Sorry, its just a convenience for me
to click on reply and just typing into the box and clicking send.
And it reduces your chances of receiving useful answers; *that* would be
a major inconvenience!
--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
Loading...