Creating videos with ffmpeg when FPS is below 25

Support and queries relating to all previous versions of ZoneMinder
ekiboy69
Posts: 101
Joined: Tue Jun 22, 2004 9:26 pm
Location: Kaarina-Finland

Problem temporarily solved with earlier ffmpeg version

Post by ekiboy69 »

Hi,

I managed to solve the issue by downgrading to an earlier version of ffmpeg. So ffmpeg is to blame. 0.4.8 works without the -strict parameter. The end result is MPEG2 compliant.

Phil & James: thank you for guiding me to the right direction.

I still do think having a working method of MPEG2 export is essential :-)

I am going to be away for a day or two. I might be able to test the patch as well after I've come back.

Good night,
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

i Have done more experiemnts on this and yes i can definetly export mpegs but...
The quality is very poor, very blocky how do i imrove this?

James
ekiboy69
Posts: 101
Joined: Tue Jun 22, 2004 9:26 pm
Location: Kaarina-Finland

Post by ekiboy69 »

jameswilson wrote:i Have done more experiemnts on this and yes i can definetly export mpegs but...
The quality is very poor, very blocky how do i imrove this?

James
What is your ffmpeg command line parametres like?

I am using -hq -s cif

I guess the -hq for high quality is the most important thing. Im am getting good video with the previous version of ffmpeg.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I'm trying with the CVS ffmpeg now that I can support it, but not getting anywhere as it's complaing about frame rates still. I'm no video expert but will see if I can figure out a way round. There's 100's of options though!

Phil
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

The -strict option usualy got the 0.4.9_pre1 version to work. Might try that if you haven't already.
Regards,
Cordel
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

good luck phil!
From you previous post would time be better spent (once its working with a version fully (maybe 0.4.8)) to stick with it and only support that version, unless a real huge reason exits to use newer ones. Or is ffmpeg not the best choice. I dont know im just curious.

JAmes

Cordel: It generates whole videos ok (at poor blocky quality) but wont stream though
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I've cracked the issue with ffmpeg CVS. Essentially you have to specify the rate twice once before the input files (giving the input rate) and once afterwards (giving your desired output rate, which you put to say 15). That way it's happy to create valid mpegs no matter what the input rate is.

Unfortunately I've had to change a few other things to support this, in fact I've revamped the whole video generation thing a bit. However if you want to try it yourself then the easiest thing to do is edit zmvideo.pl and add a '-r 25' or similar to the ffmpeg command line near the end of the options and after the -i parameter.

I don't really want to stick to an old version of ffmpeg if possiblae as that prevents improvements in features and speed etc from being able to be used. The CVS version now seems to work ok and I must say it seems pretty speedy to me!

Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

Thanks Phill great news.
Will this edit also make pmeg streaming work or does something else need to be edited? And if i edit this zmvideo.pl stop and start zm will take the new values?

James
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Good show and great find Phil :D

James you don't even have to restart zm.

Off to the packaging.... Mmmm, what should we call it?
ffmpeg-0.4.9-20051001.FC?.ctu.i386.rpm should do it.

Regards,
Cordel
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

isnt that a bit confusing i mean, cmon

rpm, wtf is that

lol

James
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Streaming didn't work, but now it does (!) so I think most things are there. As I said, I've taken this opportunity to revamp the web bit of generating videos so there are a few more options to control ffmpeg as everyone wants to do things slightly differently.

Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

sounds great when can we have it?
lol

James
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Soon hopefully. I'm thinking of just putting out a release with all the bitty stuff I've been doing lately as I'm still not completely done with some of the bigger features.

Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

im drooling, whats coming?

James
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Image
Locked