Hi,.
I would like to create from command line, or any other programming language (for example by using ffmpeg) a mpeg file that contains five frames, with a delay between each from of one minute.
I know how to create a small mpeg file using five frames, but I do not know how to create a delay between each frame...
I do not want to multiply the frames many times, in order to prevent it being a big file.
---
+ Reply to Thread
Results 1 to 12 of 12
-
-
Originally Posted by nighthawk2018Read my blog here.
-
I am a programmer, I programmed an opensource application that can be found on http://mp3slide.sourceforge.net -- I used open tools and some of the tools that I bought from other resources,.
I once checked the muxman, bu tI do not recall whether it is a command line open source tool, or a gui interfaced tool.
Do you know where can I find a tool that preform such a mpeg video, with delay... as I said in the original post, I wouldn't like to multiply the images into every frame, that will produce a huge file... -
Have you tried just setting the frame rate to 1 frame/minute (1/60 frame per sec)?
-
MPEG files seem to all be at standard TV rates, lowest 25 fps.
I tried using HCEnc with a 1 fps file, it said "Error" Invalid MPEG2 frameratre" and exited.
So I think you're going to have to use a normal frame rate.
However, because of all the identical frames, MPEG compression will be very high and the filesize should not be too large.
GuiforDVDAuthor has an "Audio titleset" mode that lets you use an image file to be the background image for an AC3 audio. You could use that to quickly generate a file, using five chapters, each with a one-minute audio and a background image.
You could demux and just have a plain video file afterwards.
You can look at the batch files GfD makes and modify them.
I made this batch file to convert a PNG image and an AC3 file to an MPEG in that way:
Code:@echo off echo Create PAL MPEG from AC3 and PNG (same rootname) echo PNG should be 720x576 echo Usage: ac3-mpg file.ac3 or *.ac3 @if %1X==X goto END :LOOP for %%A in ( %1 ) do ( mkdir "%%~pA\AudioMpg" "P:\GUI4dvdauthor\png2yuv.exe" -n 1 -I p -L 0 -f 25 -j "%%~dpnA.png" | "P:\GUI4dvdauthor\mpeg2enc.exe" -f 8 -q 1 -b 5000 -a 2 -o "%%~pA\AudioMpg\%%~nA.m2v" "P:\GUI4dvdauthor\mplex.exe" -M -f 8 -o "%%~pA\AudioMpg\t%%~nA.mpg" "%%~pA\AudioMpg\%%~nA.m2v" "%%~dpnA.ac3" erase "%%~pA\AudioMpg\%%~nA.m2v" "P:\GUI4dvdauthor\insnav.exe" -o "%%~pA\AudioMpg\%%~nA.mpg" "%%~pA\AudioMpg\t%%~nA.mpg" erase "%%~pA\AudioMpg\t%%~nA.mpg" ) SHIFT @if %1X==X goto END @goto LOOP :END
"P:\GUI4dvdauthor\png2yuv.exe" -n 1 -I p -L 0 -f 25 -j "%%~dpnA.png" | "P:\GUI4dvdauthor\mpeg2enc.exe" -f 8 -q 1 -b 5000 -a 2 -o "%%~pA\AudioMpg\%%~nA.m2v"
might be modifed to do what you want. -
Originally Posted by nighthawk2018
1 = 23.976
2 = 24
3 = 25
4 = 29.97
5 = 30
6 = 50
7 = 59.94
8 = 60
There is no way flagging other frame rates. You're only choice is to repeat your images at one of those rates.
Your resulting file doesn't have to be too huge, MPEG is good at compressing exact duplicate frames. You could use very long GOPs to get even better compression if you don't need DVD player compatibility. -
AlanHK,
I do not know which parameter to change in order to create a delay...?
--- -
Here's an example of a long GOP (not DVD compatible), 720x576, 25 fps, MPEG 2 file:
longgop.m2v
Five different images, 25 seconds, 653 KB, ~200 kbps.
Xvid AVI, similar bitrate:
xvid.avi -
The same video with 15 frame MPEG 2 GOPs is about 1000 kbps.
It's possible to encode a short video (at a normal MPEG 2 frame rate, one picture per frame) then use DVD authoring to repeat individual frames over and over again. -
Originally Posted by nighthawk2018
Code:MPEG2ENC --verbose|-v num Level of verbosity. 0 = quiet, 1 = normal 2 = verbose/debug --format|-f fmt Encoding profile [0 = Generic MPEG1, 1 = standard VCD, 2 = user VCD, 3 = Generic MPEG2, 4 = standard SVCD, 5 = user SVCD, 6 = VCD Stills sequences, 7 = SVCD Stills sequences, 8|9 = DVD, 10 = ATSC 480i, 11 = ATSC 480p, 12 = ATSC 720p, 13 = ATSC 1080i] --display-hsize|-x [32..16383] Set the the display-horizontal-size hint in MPEG-2 output to something other than the encoded image width --display-vsize|-y [32..16383] Set the the display-vertical-size hint in MPEG-2 output to something other than the encoded image height --aspect|-a num Set displayed image aspect ratio image (default: 2 = 4:3) [1 = 1:1, 2 = 4:3, 3 = 16:9, 4 = 2.21:1] --frame-rate|-F num Set playback frame rate of encoded video (default: frame rate of input stream) 0 = Display frame rate code table --video-bitrate|-b num Set Bitrate of compressed video in KBit/sec (default: 1152.0 for VCD, 2500.0 for SVCD, 7500.0 for DVD) --ratecontroller|-A [0..1] (default:0) Specify ratecontrol alorithm --nonvideo-bitrate|-B num Non-video data bitrate to assume for sequence splitting calculations (see also --sequence-length). --quantisation|-q num Image data quantisation factor [1..31] (1 is best quality, no default) When quantisation is set variable bit-rate encoding is activated and the --bitrate value sets an *upper-bound* video data-rate --output|-o pathname Pathname of output file or fifo (REQUIRED!!!) --target-still-size|-T size Size in KB of VCD stills --interlace-mode|-I num Sets MPEG 2 motion estimation and encoding modes: 0 = Progressive (non-interlaced)(Movies) 1 = Interlaced source material (video) 2 = Interlaced source material, per-field-encoding (video) --motion-search-radius|-r num Motion compensation search radius [0..32] (default 16) --reduction-4x4|-4 num Reduction factor for 4x4 subsampled candidate motion estimates [1..4] [1 = max quality, 4 = max. speed] (default: 2) --reduction-2x2|-2 num Reduction factor for 2x2 subsampled candidate motion estimates [1..4] [1 = max quality, 4 = max. speed] (default: 3) --min-gop-size|-g num Minimum size Group-of-Pictures (default depends on selected format) --max-gop-size|-G num Maximum size Group-of-Pictures (default depends on selected format) If min-gop is less than max-gop, mpeg2enc attempts to place GOP boundaries to coincide with scene changes --closed-gop|-c All Group-of-Pictures are closed. Useful for authoring multi-angle DVD --force-b-b-p|-P Preserve two B frames between I/P frames when placing GOP boundaries --quantisation-reduction|-Q num Max. quantisation reduction for highly active blocks [0.0 .. 4.0] (default: 0.0) --quant-reduction-max-var|-X num Luma variance below which quantisation boost (-Q) is used [0.0 .. 2500.0](default: 0.0) --video-buffer|-V num Target decoders video buffer size in KB (default 46) --video-norm|-n n|p|s Tag output to suit playback in specified video norm (n = NTSC, p = PAL, s = SECAM) (default: PAL) --sequence-length|-S num Place a sequence boundary in the video stream so they occur every num Mbytes once the video is multiplexed with audio etc. N.b. --non-video-bitrate is used to the bitrate of the other data that will be multiplexed with this video stream --3-2-pulldown|-p Generate header flags for 3-2 pull down of 24fps movie material --intra_dc_prec|-D [8..11] Set number of bits precision for DC (base colour) of blocks in MPEG-2 --reduce-hf|-N num [0.0..2.0] Reduce hf resolution (increase quantization) by num (default: 0.0) --keep-hf|-H Maximise high-frequency resolution - useful for high quality sources and/or high bit-rates) --sequence-header-every-gop|-s Include a sequence header every GOP if the selected format doesn't do so by default. --no-dummy-svcd-SOF|-d Do not generate dummy SVCD scan-data for the ISO CD image generator "vcdimager" to fill in. --playback-field-order|-z b|t Force setting of playback field order to bottom or top first --multi-thread|-M num Activate multi-threading to optimise throughput on a system with num CPU's [0..32], 0=no multithreading, (default: 0) --correct-svcd-hds|-C Force SVCD horizontal_display_size to be 480 - standards say 540 or 720 But many DVD/SVCD players screw up with these values. --no-constraints Deactivate constraints for maximum video resolution and sample rate. Could expose bugs in the software at very high resolutions! --no-altscan-mpeg2 Deactivate the use of the alternate block pattern for MPEG-2. This is A work-around for a Bug in an obscure hardware decoder. --dualprime-mpeg2 Turn ON use of dual-prime motion compensation. Default is OFF unless this op tion is used --custom-quant-matrices|-K kvcd|tmpgenc|default|hi-res|file=inputfile|help Request custom or userspecified (from a file) quantization matrices --unit-coeff-elim|-E num Skip picture blocks which appear to carry little information because they code to only unit coefficients. The number specifies how aggresively this should be done. A negative value means DC coefficients are included. Reasonable values -40 to 40 --b-per-refframe| -R 0|1|2 The number of B frames to generate between each I/P frame --cbr|-u For MPEG-2 force the use of (suboptimal) ConstantBitRate (CBR) encoding --chapters X[,Y[,...]] Specifies which frames should be chapter points (first frame is 0) Chapter points are I frames on closed GOP's. --help|-? Print this lot out!
mpeg2enc.exe -F 0
Frame-rate codes:
1 - 24000.0/1001.0 (NTSC 3:2 pulldown converted FILM)
2 - 24.0 (NATIVE FILM)
3 - 25.0 (PAL/SECAM VIDEO / converted FILM)
4 - 30000.0/1001.0 (NTSC VIDEO)
5 - 30.0
6 - 50.0 (PAL FIELD RATE)
7 - 60000.0/1001.0 (NTSC FIELD RATE)
8 - 60.0
Similar Threads
-
Free software to split large MPEG-PS file into many small MPEG-PS files?
By videonewbie22 in forum Newbie / General discussionsReplies: 9Last Post: 5th Jul 2018, 19:16 -
decoding mpeg video into frames say I,P,B frames
By abeer in forum ProgrammingReplies: 44Last Post: 6th Oct 2012, 08:24 -
Alternate Method for Creating Poster Frames for Quicktime Movies???
By m021478 in forum MacReplies: 2Last Post: 11th Dec 2011, 16:06 -
Convert mkv to mpeg 2 audio delay.
By Mastertreetop in forum Video ConversionReplies: 1Last Post: 4th Jul 2011, 16:04 -
creating many small clips w/ mpeg ts file
By Funkymoses in forum Newbie / General discussionsReplies: 1Last Post: 6th Sep 2010, 11:53