LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-10-2005, 02:05 PM   #1
mynameisflorian
Member
 
Registered: Jul 2005
Location: Minneapolis, Minnesota
Distribution: Ubuntu
Posts: 35

Rep: Reputation: 15
easy video encoding question


i have a series of images (anim0000.png, anim0001.png, anim0002.png . . . ) that i want to create a video clip out of. What is the easist way to do this?

thank you very much;
Florian
 
Old 08-10-2005, 02:22 PM   #2
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Using MEncoder:

mencoder "mf://*.png" -mf fps=25 -o output.avi -ovc lavc -lavcopts vcodec=mpeg4

This will create an avi movie file "output.avi" of all .png files in your current directory..

KC
 
Old 08-11-2005, 08:52 PM   #3
mynameisflorian
Member
 
Registered: Jul 2005
Location: Minneapolis, Minnesota
Distribution: Ubuntu
Posts: 35

Original Poster
Rep: Reputation: 15
after some tweaking for video quality, it works great. The only problem is, is that the software intentionally skips frames (making the video jerky) and generates a .par file with a list of the frames:
anim0000.png
anim0001.png
anim0001.png
anim0003.png
anim0003.png
anim0005.png
anim0005.png
anim0007.png
anim0007.png
anim0009.png
anim0010.png

and, creates a .pat file that looks like:
IPpPpPpPpPPpPpPpPpPPpPpPpPpPPp...

how can i pass this info to mencoder?

thankyou very much
- Florian
 
Old 08-11-2005, 08:57 PM   #4
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Not sure what your refering too... I have never had that particular problem... How do you mean jerky? maybe adjust the speed on output...

KC
 
Old 08-11-2005, 11:17 PM   #5
mynameisflorian
Member
 
Registered: Jul 2005
Location: Minneapolis, Minnesota
Distribution: Ubuntu
Posts: 35

Original Poster
Rep: Reputation: 15
Jerky, meaning that it jumps, skipping a frame or two. the software that outputs these images does not render if 2 consecutive frames are the same. Given the list of files(the .par file), how could i write a script to copy the files to make a smooth animation?

(for each line in the .par file):
"cp" + (space) + (contents of line) + (space) + "out" + (line#) + ".png"

I'm not shure exactly how to translate this into a working script, but that's what i want to do.

thank you,
Florian
 
Old 08-11-2005, 11:33 PM   #6
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Sorry Florian, You lost me... forgive my ignorance but I still don't know to what you are refering... you have cancatenated your .png files to a video format... are you saying that there are some .png images missing from the output video...?

I just have not run into your specific problem... perhaps someone else has but I am at a loss...

KC
 
Old 08-13-2005, 10:34 AM   #7
mynameisflorian
Member
 
Registered: Jul 2005
Location: Minneapolis, Minnesota
Distribution: Ubuntu
Posts: 35

Original Poster
Rep: Reputation: 15
No, the images are missing from the source. Since it takes quite a while to render each frame, it will not render a frame if the two consecutive frames are the same. My question is, how would i write a script to either copy or link the missing png frames so that the encoder makes a smooth video.

Thank you,
Florian

P.S. I want to know how to write a script that, for each line of the .par file, it executes the following:
"cp" + (space) + (contents of line) + (space) + "out" + (line#) + ".png"
 
Old 08-13-2005, 11:11 AM   #8
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
I think you use a wrong fps, could you try in the image directory :
Code:
mencoder mf://*.png  -mf w=$width:h=$height:fps=12 -ovc lavc -o film.avi
(where $width and $height are the width and height of your images)
 
Old 08-17-2005, 04:57 PM   #9
mynameisflorian
Member
 
Registered: Jul 2005
Location: Minneapolis, Minnesota
Distribution: Ubuntu
Posts: 35

Original Poster
Rep: Reputation: 15
The framerate is not the issue. Source frames are missing. I need to know how to copy them so that the output animation does not jerk around.

thank you,
Florian
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Encoding MP4 Video SolidSnakeX28 Linux - Software 1 07-31-2005 10:15 AM
Easy realaudio web video question? krome Linux - Software 1 01-28-2005 06:05 AM
Video Encoding Software NomadABC Linux - Software 3 01-24-2005 11:23 PM
An easy solution for k3b - error while encoding audio files Ariel A. Linux - Software 0 01-09-2005 10:18 AM
Encoding Video Files help cferris Red Hat 1 11-03-2004 11:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration