Showing posts with label ffmpeg. Show all posts
Showing posts with label ffmpeg. Show all posts

Sunday, October 26, 2014

ffmpeg ntsc-dvd 30000div1001

10moy2014

i threw a video at ubuntu's bombomo to make a dvd and the default results were horrible. When i tried to play it on a dvd player the video kept stuttering and played real choppy.

bombono-dvd uses avconv ffmpegs replacement but some one forgot to tell bombono and ffmpeg to use the correct frame rate [-r 30000/1001].

since the frame rate in avconv was wrong the videos played poorly on a dvd player when burned to dvd.but worked okay on my computer. the only way to really test things was to burn a copy.

In part_3:i used [-qscale 3] to get the video small enough to fit a dvd. and the quality was not that bad for a standerd def tv.

the qblur settings and other settings are because the original source video was a mp4 before i turned it into a avi and then finaly a mpeg2 for a dvd. the blur settings i think are something i have seen in avidemux.

give avconv and bombono a try to make a dvd. ymmv. i like the gui of bombono dvd. your milage may verry.

bombono dvd has a better looking gui than DVDstyler


part 2:::::::::::::::::::::::::::::::::::::::hunger games.
aspect

4:3 tv/crt DVD. aspect
[16:9 lcd] laptop..

CODE:
$ nice -n 19 ffmpeg \
-i unpacked_-_The_Hunger_Games_[2012]_DVDRip_XviD-MAXSPEED-.avi\
-acodec AC3 -async 48000 \
-aspect 16:9 -target ntsc-dvd -r 30000/1001 -ab 192k -maxrate 4224k -b:v 3700k -sc_threshold 40 \
-mbd rd -precmp 0 -cmp 2 -subcmp 2 -qblur 0.5 -qcomp 0.60 -s 720x350 -vf pad=720:480:0:65: -qmin 3 -qmax 5 \
foo_dvd_854SDL_720x350xxi480_dvd_created_newvid.mpg

############
#**** sd standerd dvd is 720x480 def.
####################

ubuntu 14.04 ffmpeg built from source **********fuck ubuntu avconv**********

part3::::::::::::::::::::::::::::::::::::::::::::::::::::::edge of tomorrow.

****---( remove -acodec AC3 )----*****
+++---[ its -acodec ac3 ]------++++++
aspect 4:3 tv/crt DVD.
aspect [16:9 lcd] laptop..
CODE:
$ nice -n 19 ./ffmpeg \
-i unpk,,Edge_of_Tomorrow_[2014]2014_[640x272],,REAL_DVD-plyXD,,gop240[q3,,trell0.AVI \
-taget ntsc-dvd \
-r 30000/1001 \
-acodec ac3 \
-b 6000000 -maxrate 8000000 -minrate 0 -bufsize 1835008 -packetsize 2048 -muxrate 10080000 \
-async 48000 \
-aspect 16:9 -ab 192K -b:v 3700K -sc_threshold 40 \
-mbd rd -precmp 0 -cmp 2 -subcmp 2 -qblur 0.5 -qcomp 0.60 \
-s 720x480 -vf scale=720:364,pad=720:480:0:58:black -qscale 3 \
foo_dvd_854SDL_720x350xxi480_ntsc-dvd_[30000div1001]_vidnew.mpg

#######################

Friday, October 9, 2009

cinelerra is blonkers

cinelerra does a messy job muxing audio and video.

1.....................
demux the video sound with ffmpeg first.
code:
..................................

$ ffmpeg -i source-video.avi -vn -acodec copy sound2.mp3

==================================
use cinellera to do your edits.
then use mplayer to mux every thing back to gather again.
mencoder:

$ mencoder source-video.avi -ovc copy -soundfile sound2.mp3
-o remuxed-output.avi



=================================

Sunday, September 13, 2009

ffmpeg - verizon cell phone video test.

(1.0)
( cellphones .) generic test!
( -t 00:03:13 ) video length!
(1.1)
CODE:





$ ./ffmpeg -i *.wmv -f 3gp -vcodec mpeg4 -b 150000 -s 320x240 -r 18 -acodec libfaac -ab 64000 -ar 24000 -ac 2 test-video-outpute.3gp

-----------------
---------------
(2.)
(smaller file) cellphones.
(-acodec libamr_nb) ; fubar i don't have that codec.
( -t 00:00:20)
(2.1)
CODE:





$ ./ffmpeg -i *.wmv -f 3gp -vcodec h263 -b 100000 -s 128x96 -r 12 -acodec libamr_nb -ab 12200 -ar 8000 -ac 1 -t 00:00:20 smal20second-video-mono-test.3gp


------------------
-----------------
(3)
verizon network.
(-ar 8'000)
(3.1)
CODE:





$ ./ffmpeg -i *.wmv -f 3g2 -vcodec mpeg4 -b 79kb -s 176x144 -r 16.1 -acodec libfaac -ab 12200 -ar 8000 -ac 2 -t 00:03:13 stereo-small-3g2-video-test.3g2

XXXXXXXXXXXXXXXXXXXXXX
[h263 @ 0x97ef850]The specified picture size of 400x226 is not valid for the H.263 codec.
Valid sizes are 128x96, 176x144, 352x288, 704x576, and 1408x1152. Try H.263+.

Xxxxxxxxxxxxxxxxxxxx
XXxxxxxxxxxxxxx
XXXXxxxxx
(4)
CODE:

$
mencoder *.mp4 \
-oac mp3lame -lameopts abr:br=128:vol=0 \
-aid 0 \
-ovc lavc \ -ofps 16000/1001 \
-vf scale=176:144 \

-lavcopts vcodec=mpeg4:trell:mbd=2:sc_threshold=1000000000:cgop:vbitrate=79:aspect=16/9 \

-o "test2.3gp"



test them by sending them out with gmail.
video have to be short are else mms will reject them.

Sunday, July 5, 2009

svcd letterbox matting c-svcd ffmpeg

1.85:1 (the American "flat" ratio)
matting
padded letterbox.
NOTE "640/1.85=345.9459459"
=========================
padded letterbox
matting

./ffmpeg-svn -i *.mkv -target ntsc-svcd \
-mbd rd -trellis -mv0 -cmp 2 -subcmp 2 \
-s 352x346 -padtop 66 -padbottom 66 -aspect 4:3 \
-b 1390kb -ss 00:00:10 -t 00:00:20 preview-ffmpeg-C-svcd-padded-[flat35mm]-2nd.mpg

NOTES.............................
/-vsync 0 and -async 1 optional.
//// http://en.wikipedia.org/wiki/Letterbox
----------------------------------------------------------
NOTES:

////// " mplayer -aspect 1.85:1"
@
////// 1.85:1 (the American "flat" ratio)
*** c-sVCD 640/1.85:1 =345 round up to 346 and then pad .
NOTE:
"480-346=134."
find paddind: 134/2=67 Round up to 68 or down to 66.
end flat section.
-----------------------------------------------------
next
note 640/2.35=275 = ( Panavision's 2.35:1 ratio.)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
2.35:1 ratio. letterboxing
Panavision's 2.35:1 ratio.
scope
anamorphic

./ffmpeg -i *.avi -target ntsc-svcd \
-mbd rd -trellis -mv0 -cmp 2 -subcmp 2 \
-s 352x272 -padtop 104 -padbottom 104 -aspect 4:3 \
-b 1390kb -ss 00:00:10 -t 00:00:20 preview-ffmpeg-C-svcd-letterbox[scope]-2nd.mpg

NOTES...........................
/-vsync 0 and -async 1 optional.
//// http://en.wikipedia.org/wiki/Anamorphic
-----------------------------
THE END.
xxxxxxxxxxxxxxxxxxx
7moy2009

Saturday, July 4, 2009

1.85:1 the American "flat" ratio hell ffmpeg

custom CVD super vcd. apended 7moy2009. -bufsize 917kb option

./ffmpeg -i *.avi \
-target ntsc-svcd \
-mbd rd -trellis -mv0 -cmp 0 -subcmp 2 \
-ss 00:02:00 -s 352x480 -aspect 16:9 \
-b 1390kb -ss 00:01:00 -t 00:01:00 preview-ffmpe-Cvcd-2nd.mpg

==============================
^^^ bitrate: 1287 kb/s == your mileage will very acording to the quant. i did not max out.
^^^ Video: mpeg2video, yuv420p, 352x480
^^^ Audio: mp2, 44100 Hz, stereo, 224 kb/s
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Modified aspect ratio (MAR) 1.33:1 (4:3) fullscreen AND or 1.78:1 (16:9) widecreen

Modified Aspect Ratio is a home cinema term for the aspect ratio
or dimensions in which a film was modified to fit a specific type of screen,
as opposed to original aspect ratio.
Modified aspect ratios are usually either 1.33:1 (historically),
or (with the advent of widescreen television sets) 1.78:1 aspect ratio. ==

.....................
1.33:1 is the modified aspect ratio used historically in VHS format.
A modified aspect ratio transfer is achieved by means of pan and scan or open matte,
the latter meaning removing the cinematic matte from
a 1.85:1 film to open up the full 1.33:1 frame.
====================
//////* ( "1.78:1 ... 15:9 ffmpeg and 5:3 854x480mplayer HD" ). *///
////// 1.78:1 (9:5)
////// 1.78:1 (11:6)
////// 1.78:1 (13:7)
////// 1.78:1 (14:8)
//////1.78:1 (16:9)
////// mplayer aspect 1.78:1
--------------------------------------------------------------
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
***************** 70mm
***********

70 mm standard. Originally developed for Todd-AO in the 1950s. //
2.21:1 is specified for MPEG-2 but not used. //

==============================
Todd-AO is an extremely high definition widescreen film format
developed in the mid 1950s. It was co-developed by Mike Todd,
a Broadway producer, with American Optical Company in Buffalo, New York.
===============================

///////////(2.21:1) " can be used with [ffmpeg as -aspect 3:1] "
=========================
////////// mplayer see it as
////////// [Movie-Aspect is 2.21:1 -
///////// prescaling to correct movie aspect. VO: [xv] 352x480 => 1060x480 ]
/////////( 2.21:1) x7:3x
----------------------------------------------
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*********Univisium. 2.00:1 (2:1)**********
Original SuperScope ratio, also used in Univisium.
Used as a flat ratio for some American studios in the 1950s, abandoned in the 1960s,
but recently popularized by the Red One camera system.
======================
The main proposal

In 1998, cinematographer Vittorio Storaro announced his plans for a new film format,
originally to be called Univision.
======================
As Storaro stated in his written proposal "Recently, any movie - no matter how big or small,
successful or not - will,
after a very short life on the big screen, have a much longer life on an electronic screen.
=====================
Storaro opines that, in the future of cinema,
all films will be photographed in either high-definition video for small,
intimate digital projection theaters, or in 65 mm for "big audience... large screen" films.
[3] In the cinematographer's opinion, as all films will be one of the two formats,
he suggests a common aspect ratio compromise of 2:00:1
(mathematical average of 65 mm 2.21:1 and HD 1.78:1)
be adopted for all films, 65 mm theatrical, HD theatrical and television.
=====================
///////// in other words (2:00:1)
///////// is [ -aspect 2:1] HD when using fmpeg to transcode video.
----------------------------------------------------------
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
******** 1.78:1 Video widescreen standard ***********

Video widescreen standard (16:9), used in high-definition television,
one of three ratios specified for MPEG-2 video compression.
Also used in some personal video cameras.
=====================
Initially the existing 5:3 aspect ratio had been the main candidate,
but due to the influence of widescreen cinema,
the aspect ratio 16:9 (1.78) eventually emerged as being a reasonable
compromise between 5:3 (1.67) and the common 1.85 widescreen cinema format.
(It has been suggested that the 16:9 ratio was chosen as being the geometric mean of 4:3, Academy ratio, and 2.35:1, the widest cinema format in common use,
in order to minimize wasted screen space when displaying content with a variety of aspect ratios.)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
****1.66:1 ************

35 mm Originally a flat ratio invented by Paramount Pictures, now a standard among several European countries; native Super 16 mm frame ratio.
(5:3, sometimes expressed more accurately as "1.67".)
--------------------------------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
**********1.33:1 (4:3)***********

35 mm original silent film ratio, commonly known in TV and video as 4:3.
Also standard ratio for MPEG-2 video compression.
This format is still used in most personal video cameras today.
It is the standard 16 mm and Super 35mm ratio.

//////////// (4:3) box is the standard definition television format,
//////////// which is also widely used in photography.
-----------------------------------------------------------
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1.85:1

35 mm US and UK widescreen standard for theatrical film. Uses approximately 3 perforations
("perfs") of image space per 4 perf frame;
films can be shot in 3-perf to save cost of film stock.

/////// US and UK.
/////// format............film
///////( 2.39:1) and , ( 1.85:1), are common cinematographic formats. their close to (2:1)
///////1.85:1 (the American "flat" ratio),
////////
///////[ Video track ]
===========================
AVI (DIVX) to ..... cVCD (mpg) for 1.85:1 ratio:
////// mplayer -aspect 1.85:1
////// 1.85:1 (the American "flat" ratio)
*** cVCD
640/1.85:1 =345 round up to 346
and then pad 480-346=134.
134/2=67 Round up 2 or down 2 to 68 or 66.
=========================

./ffmpeg-svn -i *.mkv -target ntsc-svcd \
-mbd rd -trellis -mv0 -cmp 2 -subcmp 2 \
-s 352x346 -padtop 68 -padbottom 68 -aspect 4:3 \
-b 1390kb -ss 00:00:10 -t 00:00:20 preview-ffmpeg-Cvcd-padded-[flat]-2nd.mpg

NOTES........................
/// -vsync 0 optional
/// -async 1 optional
----------------------------------------------------------
THE END
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
thats it for now. 7moy2009 read more at http://en.wikipedia.org/wiki/Aspect_ratio_(image)

generic ffmpeg DVD settings. gleemed from winff presets.

DVD setting
...........................................
[ntsc dvd/cDVD (gq) = Full Sceen (4:3) ]
label -- /// NTSC DVD Fullscreen -------///


./ffmpeg -f dvd -vcodec mpeg2video -r 29.97 -s 352x480 -aspect 4:3 -b 4000kb -mbd rd -trellis -mv0 -cmp 2 -subcmp 2 -acodec mp2 -ab 192kb -ar 48000 -ac 2

extension..................mpg
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
ntsc dvd/cDVD (gq) good quality = WS (16:9)

label ---//// NTSC DVD Widescreen ----////

./ffmpeg -f dvd -vcodec mpeg2video -r 29.97 -s 352x480 -aspect 16:9 -b 4000kb -mbd rd -trellis -mv0 -cmp 2 -subcmp 2 -acodec mp2 -ab 192kb -ar 48000 -ac 2

///////// extension...............mpg
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

ntsc dvd (hq) Full Screen (4:3)
label --- //// NTSC DVD HQ Fullscreen --------///

./ffmpeg -f dvd -target ntsc-dvd -r 29.97 -s 720x480 -aspect 4:3 -b 8000kb -mbd rd -trellis -mv0 -cmp 0 -subcmp 2

///////// extension.............mpg
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

ntsc dvd (hq) (WS) = (16:9)
label--//// NTSC DVD HQ Widescreen ----------////

./ffmpeg -f dvd -target ntsc-dvd -r 29.97 -s 720x480 -aspect 16:9 -b 8000kb -g 12 -mbd rd -trellis -mv0 -cmp 0 -subcmp 2

///////////// extension..........mpg
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

ntsc dvd (lq)
label----/// NTSC DVD Fast (LQ) -------////

./ffmpeg -f dvd -target ntsc-dvd -b 5000kb -r 29.97 -s 720x480 -ar 48000 -ab 384kb

///////// extension...........mpg
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

ffmpeg video ratio before 2'000 and after.

some generic winff settings.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Ac3 DVD - 192kbps Stereo-------------------/////

$ ./ffmpeg -i *in.AVI -f ac3 -acodec ac3 -ab 192kb -ar 48000 -ac 2 preview-lowbitrat-dvd.mpg

^^^^^^^^^^^^^^^^^
ac3 -----//// extension
Audio ----/// category
ac3.... dvd .....192
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Ac3 DVD --- 384kbps Stereo -----------------------------//////
==================

$ ./ffmpeg -i *in.AVI -f ac3 -acodec ac3 -ab 384kb -ar 48000 -ac 2 preview-lowbitrat-dvd.mpg

^^^^^^^^^^^^^^^^^^^^^^
ac3 ----///// extension
Audio HQ. ----//// category
Ac3 .... DVD..... 384
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
custom CVD super vcd. apended 7moy2009.

./ffmpeg -i *.avi \
-target ntsc-svcd \
-mbd rd -trellis -mv0 -cmp 0 -subcmp 2 \
-ss 00:02:00 -s 352x480 -aspect 16:9 \
-b 1390kb -ss 00:01:00 -t 00:01:00 preview-ffmpe-Cvcd-2nd.mpg

==============================
^^^ bitrate: 1287 kb/s == your mileage will very acording to the quant. i did not max out.
^^^ Video: mpeg2video, yuv420p, 352x480
^^^ Audio: mp2, 44100 Hz, stereo, 224 kb/s
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Modified aspect ratio (MAR)

Modified Aspect Ratio is a home cinema term for the aspect ratio
or dimensions in which a film was modified to fit a specific type of screen,
as opposed to original aspect ratio.
Modified aspect ratios are usually either 1.33:1 (historically),
or (with the advent of widescreen television sets) 1.78:1 aspect ratio. ==
///* ( "1.78:1 ... 15:9 ffmpeg and 5:3 854x480mplayer HD" ). *///
.....................
1.33:1 is the modified aspect ratio used historically in VHS format.
A modified aspect ratio transfer is achieved by means of pan and scan or open matte,
the latter meaning removing the cinematic matte from
a 1.85:1 film to open up the full 1.33:1 frame.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*****************
***********
XXXXX
70 mm standard. Originally developed for Todd-AO in the 1950s. //
2.21:1 is specified for MPEG-2 but not used. //
(2.21:1) " can be used with [ffmpeg as -aspect 3:1] "
mplayer see it as
[Movie-Aspect is 2.21:1 - prescaling to correct movie aspect.
VO: [xv] 352x480 => 1060x480 ]
==============================
Todd-AO is an extremely high definition widescreen film format
developed in the mid 1950s. It was co-developed by Mike Todd,
a Broadway producer, with American Optical Company in Buffalo, New York.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*********Univisium. 2.00:1 (2:1)**********
Original SuperScope ratio, also used in Univisium.
Used as a flat ratio for some American studios in the 1950s, abandoned in the 1960s,
but recently popularized by the Red One camera system.
======================
The main proposal

In 1998, cinematographer Vittorio Storaro announced his plans for a new film format,
originally to be called Univision.
======================
As Storaro stated in his written proposal "Recently, any movie - no matter how big or small,
successful or not - will,
after a very short life on the big screen, have a much longer life on an electronic screen.
=====================
Storaro opines that, in the future of cinema,
all films will be photographed in either high-definition video for small,
intimate digital projection theaters, or in 65 mm for "big audience... large screen" films.
[3] In the cinematographer's opinion, as all films will be one of the two formats,
he suggests a common aspect ratio compromise of 2:00:1
(mathematical average of 65 mm 2.21:1 and HD 1.78:1)
be adopted for all films, 65 mm theatrical, HD theatrical and television.
----------------------------------------------------------------------------
in other word (2:00:1) is [ -aspect 2:1] HD when using fmpeg to transcode video.

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
******** 1.78:1 Video widescreen standard ***********

Video widescreen standard (16:9), used in high-definition television,
one of three ratios specified for MPEG-2 video compression.
Also used in some personal video cameras.
=====================
Initially the existing 5:3 aspect ratio had been the main candidate,
but due to the influence of widescreen cinema,
the aspect ratio 16:9 (1.78) eventually emerged as being a reasonable
compromise between 5:3 (1.67) and the common 1.85 widescreen cinema format.
(It has been suggested that the 16:9 ratio was chosen as being the geometric mean of 4:3, Academy ratio, and 2.35:1, the widest cinema format in common use,
in order to minimize wasted screen space when displaying content with a variety of aspect ratios.)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
****1.66:1 ************

35 mm Originally a flat ratio invented by Paramount Pictures, now a standard among several European countries; native Super 16 mm frame ratio.
(5:3, sometimes expressed more accurately as "1.67".)
--------------------------------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
**********1.33:1 (4:3)***********

35 mm original silent film ratio, commonly known in TV and video as 4:3.
Also standard ratio for MPEG-2 video compression.
This format is still used in most personal video cameras today.
It is the standard 16 mm and Super 35mm ratio.
------------------------------------------
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
thats it for now. 7moy2009
for more info. read at http://en.wikipedia.org/wiki/Aspect_ratio_(image)