LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-27-2020, 06:17 AM   #1
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,971

Rep: Reputation: 271Reputation: 271Reputation: 271
Using ffmpeg to make a lossless video from still images


I'm trying to use ffmpeg to string together images to make a time-lapse movie. Every attempt has resulted in pixelated images. When I decompose the product movie, its stills are a quarter the size of the originals. They look awful. I've tried every codec that looks like it would work, but they either don't work at all or still compress. I'd appreciate advice.
 
Old 08-27-2020, 11:07 AM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,236

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Posting your ffmpeg command line would have helped, but the way I would do this is to name the image sequences something like image.0001.png, image.0002.png, etc, and then do:

Code:
ffmpeg -i image.%04d.png -libcodec libx264 -vcodec aac -strict -2
See:

https://en.wikibooks.org/wiki/FFMPEG...e_from_a_video
 
1 members found this post helpful.
Old 08-27-2020, 03:21 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,993

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
https://video.stackexchange.com/ques...ideo-in-ffmpeg
 
Old 08-28-2020, 12:38 AM   #4
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,971

Original Poster
Rep: Reputation: 271Reputation: 271Reputation: 271
Thanks. It turned out my problem was misplacement of the vcodec argument. I put it too early on the command line.

Now I have a different problem: the lossless movie on the target machine is 500 MB (9 times the sum of the source images!); a movie encoded from the same source with the same command line on my computer is 16 MB. 500 is just too large. I assume that the target machine lacks some compression libraries. ffmpeg on my machine depends on 190 libraries; on the target machine, 12. Any ideas?

Last edited by RandomTroll; 08-28-2020 at 12:53 AM.
 
Old 08-28-2020, 11:11 AM   #5
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,971

Original Poster
Rep: Reputation: 271Reputation: 271Reputation: 271
I use
Code:
 ffmpeg -framerate 12 -i camera-%04d.jpeg -vcodec ljpeg camera.avi
.

I wrote a script to try all possible codecs on
the target machine. The source files summed to about 43 MB. Here's
the directory:
Quote:
846212974 camera_ayuv.avi
846212974 camera_r210.avi
846212974 camera_v408.avi
846212974 camera_v410.avi
635282542 camera_fits.avi
635110382 camera_dpx.avi
634692894 camera_xwd.avi
634677292 camera_bmp.avi
634667070 camera_ppm.avi
634662766 camera_v308.avi
622742486 camera_sunrast.avi
622382758 camera_sgi.avi
621320522 camera_pcx.avi
600607760 camera_targa.avi
581775214 camera_v210.avi
483369324 camera_zmbv.avi
401945308 camera_apng.avi
401562604 camera_png.avi
400398460 camera_zlib.avi
380044942 camera_flashsv.avi
340989696 camera_jpegls.avi
317342296 camera_pgmyuv.avi
317337454 camera_rawvideo.avi
317337454 camera_y41p.avi
317337454 camera_yuv4.avi
317173208 camera_tiff.avi
251394336 camera_dirac.avi
211566654 camera_pgm.avi
199856120 camera_huffyuv.avi
175480204 camera_ljpeg.avi
169050220 camera_ffvhuff.avi
158906142 camera_xbm.avi
149065062 camera_magicyuv.avi
146957314 camera_utvideo.avi
123212554 camera_ffv1.avi
117058876 camera_jpeg2000.avi
54124956 camera_gif.mp3
26459150 camera_pbm.mp3
2001150 camera_none.mp3
834768 camera_snow.mp3
 
  


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
Best way to lossless reduce the file size of video in raw format fakie_flip Linux - Newbie 2 09-07-2014 02:22 PM
record audio from youtube video with EQ to Lossless format? balsam Linux - Software 7 01-01-2013 03:37 PM
question about using jpegtran for lossless compression of jpegs syssyphus Linux - Software 0 10-09-2006 07:12 PM
Lossless DVD Ripping? Pwcca Linux - Software 3 01-31-2004 01:12 PM
Need to lossless split 20g Win98 hd and fips will not work nbn792 Linux - Software 6 01-05-2004 06:47 PM

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

All times are GMT -5. The time now is 08:50 AM.

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