Endcoding tests
From Deptford.TV
- best result for .mp4 files (x.264 encoded) for 4:3 aspect ratio:
ffmpeg -y -i "in-clip-file-name" -acodec libfaac -ab 64k -ac 1 -vcodec libx264 -b 500k -bt 500k -threads 0 -vpre libx264-hq -s 320x240 -aspect 4:3 -r 25 -g 25 -keyint_min 25 "out-clip-file-name"
- for 16:9 aspect ratio:
ffmpeg -y -i "in-clip-file-name" -acodec libfaac -ab 64k -ac 1 -vcodec libx264 -b 500k -bt 500k -threads 0 -vpre libx264-hq -s 320x180 -aspect 16:9 -r 25 -g 25 -keyint_min 25 "out-clip-file-name"
- best result for .ogv files with premiere .AVI files then ffmpeg2theora -p padma filename (problem how to get premiere dv .avi files on linux?)
ffmpeg2theora
http://en.linuxreviews.org/Ffmpeg2theora http://linuxreviews.org/man/ffmpeg2theora/
adnan@tati:~$ ffmpeg2theora -p info v2v presets:
preview Video: 320x240 if fps ~ 30, 384x288 otherwise
Quality 5 - Sharpness 2
Audio: Max 2 channels - Quality 1
pro Video: 720x480 if fps ~ 30, 720x576 otherwise
Quality 7 - Sharpness 0
Audio: Max 2 channels - Quality 3
videobin Video: 512x288 for 16:9 material, 448x336 for 4:3 material
Bitrate 600kbs
Audio: Max 2 channels - Quality 3
padma Video: 640x360 for 16:9 material, 640x480 for 4:3 material
Quality 5 - Sharpness 0
Audio: Max 2 channels - Quality 3
padma-stream Video: 128x72 for 16:9 material, 128x96 for 4:3 material
Audio: mono quality -1
transcoding tests on clip 1'17
ffmpeg2theora -p pro 090511_group1_3.ASF Input #0, asf, from '090511_group1_3.ASF':
Duration: 00:00:00.00, start: 0.001000, bitrate: -2147483 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 320x240, 29.97 tb(r)
Stream #0.1: Audio: adpcm_ms, 44100 Hz, mono, 177 kb/s
Resize: 320x240 => 720x480
0:01:13.22 audio: 65kbps video: 16868kbps, time elapsed: 00:13:55
147.6 MB
ffmpeg2theora -p preview 090511_group1_3.ASF Input #0, asf, from '090511_group1_3.ASF':
Duration: 00:00:00.00, start: 0.001000, bitrate: -2147483 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 320x240, 29.97 tb(r)
Stream #0.1: Audio: adpcm_ms, 44100 Hz, mono, 177 kb/s
Resize: 320x240 => 384x288
0:01:13.22 audio: 58kbps video: 5449kbps, time elapsed: 00:04:49
48 MB
ffmpeg2theora -x 320 -y 240 090511_group1_3.ASF Input #0, asf, from '090511_group1_3.ASF':
Duration: 00:00:00.00, start: 0.001000, bitrate: -2147483 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 320x240, 29.97 tb(r)
Stream #0.1: Audio: adpcm_ms, 44100 Hz, mono, 177 kb/s
Resize: 320x240
0:01:13.22 audio: 58kbps video: 4282kbps, time elapsed: 00:03:03
37.8 MB
ffmpeg2theora -p padma 090511_group1_3.ASF Input #0, asf, from '090511_group1_3.ASF':
Duration: 00:00:00.00, start: 0.001000, bitrate: -2147483 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 320x240, 29.97 tb(r)
Stream #0.1: Audio: adpcm_ms, 44100 Hz, mono, 177 kb/s
Pixel Aspect Ratio: 1.00/1 Frame Aspect Ratio: 1.33/1
Resize: 320x240
0:01:13.22 audio: 65kbps video: 4282kbps, time elapsed: 00:03:02
37.9 MB
ffmpeg2theora -x 640 -y 480 090511_group1_3.ASF Input #0, asf, from '090511_group1_3.ASF':
Duration: 00:00:00.00, start: 0.001000, bitrate: -2147483 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 320x240, 29.97 tb(r)
Stream #0.1: Audio: adpcm_ms, 44100 Hz, mono, 177 kb/s
Resize: 320x240 => 640x480
0:01:13.22 audio: 58kbps video: 11643kbps, time elapsed: 00:12:09
102 MB
not working in cinelerra the following method with gstreamer (only picture in viewer not in timeline):
oneliner with gestreamer to produce .ogv out of .ASF 640x480
gst-launch-0.10 filesrc location=test.ASF ! decodebin2 name=d oggmux name=m ! filesink location=/tmp/asf2.ogv d. ! queue ! videorate ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=640,height=480,pixel-aspect-ratio=1/1 ! theoraenc ! queue ! m. d. ! queue ! audiorate ! audioconvert ! audioresample ! vorbisenc ! queue ! m.
oneliner with gestreamer to produce .ogv out of .ASF size as original file
gst-launch-0.10 filesrc location=640x480.wmv ! decodebin2 name=d oggmux name=m ! filesink location=/tmp/asf2.ogv d. ! queue ! videorate ! ffmpegcolorspace ! theoraenc ! queue ! m. d. ! queue ! audiorate ! audioconvert ! audioresample ! vorbisenc ! queue ! m.
- irc openvideo chat about using gstreamer
[21:36:33] robc | hey ahadzi ??? r1
[21:36:58] robc | gonna make some dinner so lets do that script stuff later on ok? ??? reiko
[21:37:43] <-- mistik1 (n=mistik1@port0204-ahb-adsl.cwjamaica.com) has quit ("Lost terminal") ??? rexbron
[21:47:21] <-- mistik1_ (n=mistik1@port0204-ahb-adsl.cwjamaica.com) has quit (Read error: 110 (Connection timed ??? robc
out)) ??? SimAV
[22:19:26] <-- raffa (n=raffa@212.45.157.238) has quit (Remote closed the connection) ??? tonsofpcs
[22:39:31] --> mistik1 (n=mistik1@port0204-ahb-adsl.cwjamaica.com) has joined #openvideo ??? Velmont
[22:59:28] <-- schock (n=sasha@cpe-75-82-182-206.socal.res.rr.com) has quit () ??? Zta
[23:21:06] --> _paco_ (n=cem@unaffiliated/paco/x-456320) has joined #openvideo ???
[23:22:08] _paco_ | Hi. sony dv cam + pci->firewire + cinelerra + dvdauthor + k3b = video dvd/cd ? is that right ? ???
[23:22:32] ahadzi | hey robc ???
[23:28:30] <-- mistik1 (n=mistik1@port0204-ahb-adsl.cwjamaica.com) has quit (Read error: 60 (Operation timed ???
out)) ???
[23:29:48] --> mistik1 (n=mistik1@port0249-adb-adsl.cwjamaica.com) has joined #openvideo ???
[23:54:32] <-- mistik1 (n=mistik1@port0249-adb-adsl.cwjamaica.com) has quit ("Lost terminal") ???
Day changed to Fri, 22 May 2009 ???
[00:25:20] <-- _paco_ (n=cem@unaffiliated/paco/x-456320) has quit (Remote closed the connection) ???
[00:44:56] <-- elex (n=elex@p4FE99CBF.dip0.t-ipconnect.de) has quit (Read error: 113 (No route to host)) ???
[03:54:24] <-- dextorb (n=edgar@p5B275776.dip.t-dialin.net) has quit (Remote closed the connection) ???
[08:51:46] --> SimAV (n=SimAV@p50997e25.dip0.t-ipconnect.de) has joined #openvideo ???
[09:01:03] --> bilboed (n=bilboed@89.129.128.148) has joined #openvideo ???
[09:15:35] <-- AkhIL (n=akhilman@95-190-55-210-xdsl-dynamic.kuzbass.net) has quit (Nick collision from services.) ???
[09:15:47] --> AkhIL (n=akhilman@95-190-37-238-xdsl-dynamic.kuzbass.net) has joined #openvideo ???
[09:44:51] <-- j^ (n=j@82.113.106.157) has quit ("cable cut") ???
[09:53:44] --> j^ (n=j@82.113.106.156) has joined #openvideo ???
[10:45:28] <-- bilboed (n=bilboed@89.129.128.148) has quit ("No! Don't pull that plu...") ???
[10:56:09] --> bilboed-pi (n=bilboed@74.Red-80-24-4.staticIP.rima-tde.net) has joined #openvideo ???
[11:41:48] ahadzi | ok tried to get this codec transition going last night ???
[11:42:04] ahadzi | but was not very successful ???
[11:42:18] robc | ahadzi: from what to what? ???
[11:42:52] ahadzi | yesterday i managed to produce a small .ogv file from an adobe premiere dv .avi file ???
[11:42:57] ahadzi | one minute around 6MB ???
[11:43:09] ahadzi | with the command ffmpeg2theora - p padma ???
[11:43:15] ahadzi | using the padma presets ???
[11:43:32] ahadzi | which produces a nice 640x480 sized file
[11:43:32] ahadzi | which produces a nice 640x480 sized file ??? ahadzi
[11:43:44] ahadzi | as said 1min around 6MB ??? aindilis
[11:43:54] ahadzi | trying to reproduce that now on linux ??? AkhIL
[11:44:06] ahadzi | and basically coming from an .ASF file ??? bilboed-pi
[11:44:12] ahadzi | which is this windows container ??? cehteh
[11:44:23] ahadzi | containing a h.264 codec ??? gisle
[11:44:37] ahadzi | this i try to transcode into an .ogv ??? goibhniu
[11:45:07] ahadzi | ffmpeg2theora -p padma $file.ASF gives me a 60MB file for a minute ??? j^
[11:45:39] ahadzi | so i tried to first transcode the .ASF into .dv and then to run ffmpeg2theora on the file ??? madsdyd
[11:46:38] ahadzi | transcoded the .ASF with ffmpeg -i myfile.avi -target dv /tmp/myfile.dv ??? manut
[11:46:47] ahadzi | got a nice .dv file ??? r1
[11:47:04] ahadzi | & then run ffmpeg2theora -p padma on this file ??? reiko
[11:47:14] ahadzi | but again i received 60MB per minute ??? rexbron
[11:47:19] ahadzi | researched a bit more ??? robc
[11:47:38] ahadzi | & found out that the kino .dv & the premiere dv .avi are not really compatible ??? SimAV
[11:48:10] ahadzi | researched into how to get the kino .dv into the premiere transcoded on linux ??? tonsofpcs
[11:48:23] ahadzi | found this command ??? Velmont
[11:48:25] ahadzi | sudo ffmpeg -i test.dv -vcodec xvid -acodec mp3 -b 2000k -ac 2 -ab 128k -vtag DX50 -qmin 5 test.avi ??? Zta
[11:48:36] ahadzi | strangely it's xvid and mp3? ???
[11:48:47] ahadzi | but to say the command did not work on my system ???
[11:48:59] ahadzi | found it in this forum ???
[11:49:00] ahadzi | http://forums.whirlpool.net.au/forum-replies-archive.cfm/847520.html ???
[11:49:05] ahadzi | not sure that it's right ???
[11:49:32] ahadzi | now i'm wondering if there's a direct way to transcode .ASF into .ogv getting the nice 6MB filesize ???
[11:49:33] robc | ahadzi: so you want to get to ASF to ogv in one step ???
[11:49:38] ahadzi | yup ???
[11:49:42] ahadzi | that would be best ???
[11:49:57] robc | and ffmppeg2theora gives you a tupidly big file for some reason? ???
[11:50:07] robc | stupidly ???
[11:50:08] ahadzi | yup 10 times bigger ???
[11:50:17] robc | which makes no sense ???
[11:50:35] ahadzi | maybe there needs to be some more setting of flags or stuff? ???
[11:51:07] robc | and when you try and playback the ogv does it tell you that it is longer than it actually is? ???
[11:51:32] ahadzi | in smplayer it does yes ???
[11:51:42] ahadzi | but for both files ???
[11:51:54] ahadzi | the one encoded from the premiere dv .avi ???
[11:52:06] ahadzi | and the one encoded from the kino .dv ???
[11:52:43] robc | the ASF reports incorrect duration? ???
[11:52:58] ahadzi | moment ???
[11:54:49] ahadzi | in smplayer either nothing ???
[11:54:52] ahadzi | or correct ???
[11:55:34] ahadzi | and sometimes also in hours ???
[11:55:41] ahadzi | so inconsistent really ???
[11:56:48] ahadzi | but in avidemux alway correct ???
[11:57:27] ahadzi | maybe that's a smplayer bug
[11:58:15] robc | VIDEO: [M4S2] 320x240 24bpp 1000.000 fps 0.0 kbps ( 0.0 kbyte/s) ??? aindilis
[11:58:34] robc | that is the output i get regarding the info on one of your asf files ??? AkhIL
[11:58:51] robc | the 1000fps is a little strange no? ??? bilboed-pi
[11:59:04] bilboed-pi | 1000fps means 'unspecified fps' ??? cehteh
[11:59:14] robc | ahh ??? gisle
[11:59:25] bilboed-pi | yes, bloody obvious.. *NOT* ??? goibhniu
[11:59:43] ahadzi | :-) ??? j^
[11:59:45] robc | bilboed-pi: do you have any clue about how to get this ASF file into an ofv? ??? madsdyd
[11:59:49] robc | ogv ??? manut
[12:00:19] bilboed-pi | using pitivi or one of the other transcoders (like Arista or Transmageddon) ??? r1
[12:00:27] bilboed-pi | sorry, gstreamer guy speaking :) ??? reiko
[12:00:41] robc | well a gstreamer oneliner would do ?) ??? rexbron
[12:00:48] robc | :) ??? robc
[12:00:50] bilboed-pi | errr.. I can give you the basics, yes ??? SimAV
[12:00:59] bilboed-pi | one second ??? tonsofpcs
[12:05:02] bilboed-pi | gst-launch-0.10 filesrc location=640x480.wmv ! decodebin2 name=d oggmux name=m ! filesink ??? Velmont
location=/tmp/asf2.ogv d. ! queue ! videorate ! ffmpegcolorspace ! theoraenc ! queue ! m. d. ! ??? Zta
queue ! audiorate ! audioconvert ! audioresample ! vorbisenc ! queue ! m. ???
[12:05:14] bilboed-pi | replace 640x480.wmv and /tmp/asf2.ogv with your input/output files ???
[12:05:38] bilboed-pi | as for the theoraenc/vorbisenc components, use 'gst-inspect-0.10 vorbisenc' for ex to see the ???
properties you can modify ???
[12:06:11] bilboed-pi | for ex, if you want to have a keyframe every 12 frames, " .. ! theoraenc keyframe-force=12 ! .." ???
[12:07:27] bilboed-pi | and it should also work if you have theora thusnelda ???
[12:07:59] bilboed-pi | robc, tell me if it works for you ???
[12:08:17] robc | bilboed-pi: nice :) i'll give it a spin ???
[12:08:27] ahadzi | cheers ???
[12:08:45] bilboed-pi | that will not modify the video size btw (it'll stay in the original width/height) ???
[12:12:21] bilboed-pi | although it's rather trivial to do that by inserting a videoscale element : " ... ! ???
ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=320,height=240,pixel-aspect-ratio=1/1 ! ???
theoraenc ! ..." ???
[12:12:40] bilboed-pi | that will resize it to 320x240 (with a PAR of 1/1) ???
[12:15:48] ahadzi | nice ???
[12:17:05] bilboed-pi | oh, and that pipeline will work for *any* file supported by gstreamer btw ???
[12:17:08] bilboed-pi | not just asf :) ???
[12:19:57] ahadzi | testing... ???
[12:20:45] robc | bilboed-pi: thats great! ???
[12:20:57] robc | i really must learn gstreamer ???
[12:21:01] robc | seems to be the future ???
[12:21:07] robc | -rwxr-xr-x 1 rob rob 33M 2009-05-22 11:54 test.ASF ???
[12:21:09] robc | -rw-r--r-- 1 rob rob 24M 2009-05-22 12:13 /tmp/asf2.ogv ???
[12:21:16] robc | ahadzi: that seems more like it no ???
[12:21:41] robc | ahadzi: i try the file in cinelerra now and see if we get the keyframe errors still ???
[12:22:15] bilboed-pi | the trick here was to use videorate... to guarantee a constant framerate ???
[12:22:46] bilboed-pi | which you absolutely need with theora
[12:23:00] robc | to stop the keyframe errors in cinelerra?? ??? aindilis
[12:23:20] bilboed-pi | I don't know about that specific cinelerra issue ??? AkhIL
[12:23:29] bilboed-pi | but I'm just saying that without videorate... the resulting file will be crap ??? bilboed-pi
[12:23:41] bilboed-pi | because you're giving it non-constant-framerate ... and theora pukes on that ??? cehteh
[12:24:03] bilboed-pi | so unless ffmpeg actually does that (duplicate/drop frames to get a continuous constant framerate) ??? gisle
... it would screw up massively ??? goibhniu
[12:24:13] robc | ahh i see - and you have set this in the above gstreamer onliner? ??? j^
[12:24:23] bilboed-pi | yes, by inserting the videorate element ??? madsdyd
[12:24:29] robc | i see ??? manut
[12:25:02] bilboed-pi | you can, for fun, remove videorate from that pipeline and look at the resulting file... it might ??? r1
not quite be what you expect :) ??? reiko
[12:25:22] robc | i cant figure out why cinelerra plays some ogg files without the keyframe error and some with the ??? rexbron
error ??? robc
[12:25:29] robc | bilboed-pi: hehe i might try that ??? SimAV
[12:25:48] bilboed-pi | <rant>use pitivi !</rant> :) ??? tonsofpcs
[12:26:54] robc | bilboed-pi: how mature is that now? ??? Velmont
[12:27:02] bilboed-pi | we've just done a pre-release ??? Zta
[12:27:07] bilboed-pi | available in a PPA ???
[12:27:13] bilboed-pi | way way way more stable/reliable ???
[12:27:25] bilboed-pi | still doesn't have all the bells and whistles of a full fledged editor ???
[12:27:42] bilboed-pi | but all the reviews/comments I've seen so far on that pre-release are positive ???
[12:27:55] robc | bilboed-pi: we are kind of committed to cinelerra for this current project .. but will check out ???
pitivi for sure....right now in fact... ???
[12:28:23] bilboed-pi | robc, it was a friendly rant :) I'm not expecting people to switch to pitivi right now for ???
production usage ???
[12:28:41] bilboed-pi | robc, but we're getting there, and it can already do a lot of the mundane tasks (like what you're ???
trying to do) ???
[12:29:35] robc | bilboed-pi: i am trying it now ???
[12:29:38] ahadzi | bilboed-pi: interesting. in what format do you store the project files in pitivi? as xml? ???
[12:29:48] bilboed-pi | ahadzi, xml-like project yes ???
[12:29:51] robc | seems to be choking on the .ogv we just created :( ???
[12:29:57] bilboed-pi | robc, argh ???
[12:30:09] bilboed-pi | ahadzi, and we can easily add support for other formats ???
[12:30:20] robc | bilboed-pi: but i'm using a deb so its no doubt out of date ???
[12:30:29] bilboed-pi | robc, a deb of what ? ???
[12:30:33] robc | need an svn co i gues ???
[12:30:36] robc | pitivi ???
[12:30:43] bilboed-pi | use the gstreamer-developers PPA ???
[12:30:49] bilboed-pi | https://launchpad.net/~gstreamer-developers/+archive ???
[12:30:57] robc | cool ???
[12:30:59] bilboed-pi | that PPA has the latest gstreamer stuff including pitivi ???
[12:31:04] robc | i'll check that later ???
[12:31:31] bilboed-pi | np ???
[12:32:07] ahadzi | cheers
[12:32:45] bilboed-pi | hmm... I wonder where one can find the specifications of the cinelerra project format ??? aindilis
[12:32:54] bilboed-pi | would be fun to be able to import/export those :) ??? AkhIL
[12:37:34] ahadzi | bilboed-pi: thnx! ??? bilboed-pi
[12:37:42] bilboed-pi | ahadzi, works ? ??? cehteh
[12:37:46] ahadzi | yup ??? gisle
[12:37:49] bilboed-pi | \o/ ??? goibhniu
[12:37:54] ahadzi | & in a great size :-) ??? j^
[12:38:05] ahadzi | speak soon ??? madsdyd
[12:38:08] bilboed-pi | as I said, you can tweak the properties of theoraenc to your liking ??? manut
[12:38:17] ahadzi | yup ??? r1
[12:38:23] bilboed-pi | but if the default settings are good enough for you, it's perfect :) ??? reiko
[12:38:26] ahadzi | & we'll have to check out pitivi ??? rexbron
[12:38:35] ahadzi | need to get in onto my system to play around ??? robc
[12:38:43] bilboed-pi | ahadzi, yah, check out that PPA ??? SimAV
[12:38:51] bilboed-pi | ahadzi, you'll also get the latest of gstreamer ??? tonsofpcs
[12:39:17] ahadzi | :-) ??? Velmont
[12:39:23] ahadzi | now off for coffee ??? Zta
[12:39:29] ahadzi | great session ???
[12:40:03] robc | bilboed-pi: soon as this is nice and stable would be nice to get pitivi into pure:dyne ???
[12:40:22] bilboed-pi | pure ? ???
[12:40:25] robc | bilboed-pi: is the deb maintainer part of your team or someone from debian multimedia? ???
[12:40:37] bilboed-pi | yah ???
[12:40:39] bilboed-pi | it's slomo ???
[12:40:45] bilboed-pi | Sebastien Droge ???
[12:40:47] robc | http://code.goto10.org/projects/puredyne ???
[12:40:56] bilboed-pi | robc, neat ! ???
[12:41:21] bilboed-pi | well latest gstreamer stuff normally ends up within 24 hours of a release in debian ???
experimental/unstable ???
[12:42:33] robc | ok cool - we are based on stable backprting packages from testing ???
[12:42:46] robc | but we can do some pinning to get stuff from unstable ???
[12:42:56] bilboed-pi | right ???
[12:43:06] bilboed-pi | the person to contact for all the gst-related stuff is definitely slomo ???
[12:43:09] -*- bilboed-pi is a gentoo user :) ???
[12:43:24] robc | we have our own debian pbuilder and repository ???
[12:43:27] robc | a gentoo... ???
[12:43:37] robc | oh well ;) ???
[12:43:45] bilboed-pi | I hope your pbuilder/repo is faster than launchpads :) ???
[12:44:24] robc | http://debian.goto10.org/ ???
[12:44:41] robc | ok i better get back to work... ???
[12:44:49] robc | bilboed-pi: thanks for your help ???
[12:44:56] bilboed-pi | np
