Quantcast FFmpeg: Working KVCD Version on *Nix - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Video Encoding and Conversion

Reply
 
LinkBack Thread Tools
  #1  
09-02-2003, 10:11 AM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Hai all,

Ran some tests and came up with the following:
http://japie.is.dreaming.org/ftp/KVC...vcd-0.3.tar.gz
It uses mplayer-0.9.x and mjpegtools-1.6.1.90:
http://www.mplayerhq.hu/
http://mjpeg.sourceforge.net/

It creates a vbr-vcd-mpeg using:
Variable bitrate with a max. of 1152 (this improves hardware dvd-player compatibility because off limitations to the speed off dvd-drives used in it)
video buffer size of 40
gop size of 24 (maybe improvements can be done by using differents min. and max. size)
audio bitrate of 128 (who needs more, can change it himself)
quantisation scale of 5
and off-course: the beloved kvcd intra and non-intra matrix

The quality is bether than standard vcd and can contain at least 2 hours on one 80min. cdr.

Give it a go, have fun and if you find improvements lett it know.
__________________
Groetjes Japie
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
09-08-2003, 07:33 AM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Released a new version: 1.1

Changelog:
Use filelength to automaticly determine wich quantisize/bitrate combo to use.
Detect movie source type (pal/ntsc) so that will also be the output format.
Detect aspect ratio so widescreen movies will get black borders and fullscreen will stay fullscreen.
In lowest quality one 80 min. disk can contain 2 hours and 10 min. of movie now.

Get it at http://japie.is.dreaming.is.org/ftp/...vcd-1.1.tar.gz
__________________
Groetjes Japie
Reply With Quote
  #3  
09-08-2003, 12:40 PM
buildid buildid is offline
Free Member
 
Join Date: Sep 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to buildid
couldnot download the file ................
Reply With Quote
  #4  
09-08-2003, 12:42 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Welcome buildid

Yep. Neither could I. I guess japie is still "dreaming"

-kwag
Reply With Quote
  #5  
09-08-2003, 12:49 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Try this: http://deserver.kicks-ass.org:59147/ftp/KVCD/

-kwag
Reply With Quote
  #6  
09-08-2003, 12:55 PM
buildid buildid is offline
Free Member
 
Join Date: Sep 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to buildid
thanks
Reply With Quote
  #7  
09-08-2003, 10:53 PM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Think I did a "is" to much
http://japie.is.dreaming.org/ftp/KVCD/mkxvcd-1.1.tar.gz
__________________
Groetjes Japie
Reply With Quote
  #8  
09-08-2003, 11:35 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by japie
You "are" right japie

-kwag
Reply With Quote
  #9  
09-11-2003, 01:25 PM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Minor buxfix:
http://japie.is.dreaming.org/ftp/KVC...d-1.1.1.tar.gz
__________________
Groetjes Japie
Reply With Quote
  #10  
09-15-2003, 07:29 AM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
New version; 1.2

added detection of mjpegtools-version, older versions create xvcd, newer versions create true kvcd.
autodetection of pal/ntsc.
automatic adaption of quality setting related to movie length.
standard setting to add black borders can be overruled by extra option 'fullscreen'.
http://freshmeat.net/projects/mkxvcd/
__________________
Groetjes Japie
Reply With Quote
  #11  
09-24-2003, 10:01 AM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Latest version 1.3 with a lot off changes:

Added 16:9 autodetection again, with question to user if he wants to add black borders or not.
Reorderd encoder lines so that on a hard (CTRL-c) interupt it cleanly shuts down.
Added min and max gop sizes again, for scene change detection.
Added some info about the movie at the status line and safe the same info to a file.
Added -really-quiet to mplayer, keeps the screen more visible.
Added -s to mpeg2enc to make the output usefull for authoring tools.
Fixed 3:2 TELECINE problem.
Fixed problems with odd 24.999 fps divx movies.
Using mplex again over tcmplex.
Lots of minor bugfixes and cleanups.

http://freshmeat.net/projects/mkxvcd/
__________________
Groetjes Japie
Reply With Quote
  #12  
09-24-2003, 12:47 PM
buildid buildid is offline
Free Member
 
Join Date: Sep 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to buildid
hmm hard to get , cannot download the file .

anyway thanks
Reply With Quote
  #13  
09-24-2003, 10:44 PM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Sorry, had some problems, allsswell now
__________________
Groetjes Japie
Reply With Quote
  #14  
09-30-2003, 07:42 AM
zivel zivel is offline
Free Member
 
Join Date: Sep 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
hi japie,

i was testing your script during last few days and here are some thoughts:

if a movie is non standard size (not 4:3 and not 16:9) i'm getting unusable results - the movie is either stretched too much or too narrow. so i tried to experimend with mplayer option -vop expand=x:y. this option i use when i want to display subtitles but i don't want them right inside of the movie but in the black border that is created around the movie. i have a little script on my system that recalculates size of any movie into 4:3 size by adding the black bars. so i implemented this into your script. the line with mplayer looks something like this:

mplayer -really-quiet -vop expand=${width}:$((${width}/4*3)) ......an so on

of course, any movie that you pass onto the script is now 4:3 so you no longer need to decide what type of rescaling method yuvscaler uses because it's allways doing RESAMPLE.

this thing also has side effect that if you encode also subtitles into the movie they are using also the lower black bar, not just the movie (those who don't like it may set it in mplayer with some parameters otherwise, i think)

i haven't tested this into details so there might be some flaw to this whole thing but i think it might give you something to work on. one thing that seems to be problematic is that with the math going on there you can end up with height that is not multiplication of 8 and the encoder crashes then, i think i had some crashes like that but it could have been caused also by other stuff. of course i might be totally mistaken here since my knowledge of video encoding is very limited.

there is also one tiny problem with the script - when you check for mplayer playable extension .mov (quicktime) is not there so you should add it there.

i would also suggest adding option to encode the movie in SVCD resolution. i tried it and i think the results are excellent although encoding time is horrible you may also consider adding option to create ksvcd (mpeg2 kvcd) but i'm no expert in mpeg1/mpeg2 and have no idea if there is any benefit in this. would there be much difference between mpeg2-ksvcd and mpeg1-kvcd with svcd resolution?

that would be about it. sorry for this mess of a message, i just wrote what came into my head
Reply With Quote
  #15  
09-30-2003, 01:24 PM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by zivel
mplayer -really-quiet -vop expand=${width}:$((${width}/4*3)) ......an so on
It sounds fine, I started some day agoo to skip yuvscaler allready and are using the softwarescaler of mplayer now since it's faster and uses less cpu power. This is a nice solution for the WIDE2STD option.
Thnx!
Quote:
Originally Posted by zivel
there is also one tiny problem with the script - when you check for mplayer playable extension .mov (quicktime) is not there so you should add it there.
fixed...
Quote:
Originally Posted by zivel
would there be much difference between mpeg2-ksvcd and mpeg1-kvcd with svcd resolution?
As far as my tests proved mpeg2 looks worse and has a bigger size so I have no plans on supporting svcd/ksvcd. (but your not the first asking for (k)svcd)
__________________
Groetjes Japie
Reply With Quote
  #16  
10-01-2003, 02:44 AM
zivel zivel is offline
Free Member
 
Join Date: Sep 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by japie
It sounds fine, I started some day agoo to skip yuvscaler allready and are using the softwarescaler of mplayer now since it's faster and uses less cpu power. This is a nice solution for the WIDE2STD option.
could you explain what exactly you do? because after reading your comments i tried to combine expand and scale filters (and i just found out that -vop is deprecated in favor of -vf). i was trying to expand first to 4:3 size and then scale to vcd size, something like this:

-vf expand=640:480,scale=352:288

but the result is a corrupted video - the size is correct but the picture is gone and replaced with green blinking mess. strange thing is that i get this only with this particular pair and order of filters. when reversed or used separately there are no problems with green shit.

so please tell me details about what exactly you are doing, i hope you have better results than i do.

thanx, zivel
Reply With Quote
  #17  
10-01-2003, 12:04 PM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by zivel
could you explain what exactly you do?
At the moment I'am typing a reply...
Nothing yet, yust theory
Quote:
Originally Posted by zivel
(and i just found out that -vop is deprecated in favor of -vf). i was trying to expand first to 4:3 size and then scale to vcd size, something like this:
-vf expand=640:480,scale=352:288
-vf starts with the first option and works it's way to the end of comma seperated options and -vop starts at the end and works its way to the first, so you could:
-vf expand=640:480,scale=352:288
and
-vop scale=352:288,expand=640:480
is the same...
But as far as I can tell the scale option itself is enough for scaling and black border adding.
I'am completely rewriting the script so this will appear in a 2.x version, in the meantime ill stick to what I have right now and try to fix the broken xvcd mode first

p.s. Could you please do script related things via email, I hate communicating via web-based thingy's
__________________
Groetjes Japie
Reply With Quote
  #18  
10-01-2003, 12:35 PM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
New release; mkxvcd-1.3.1

Fixed broken mjpegtools-1.6.1 support and added .mov to extensions.

http://japie.is.dreaming.org/ftp/KVC...d-1.3.1.tar.gz
__________________
Groetjes Japie
Reply With Quote
  #19  
10-02-2003, 11:49 AM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by zivel
could you explain what exactly you do? because after reading your comments i tried to combine expand and scale filters (and i just found out that -vop is deprecated in favor of -vf). i was trying to expand first to 4:3 size and then scale to vcd size, something like this:

-vf expand=640:480,scale=352:288

but the result is a corrupted video - the size is correct but the picture is gone and replaced with green blinking mess. strange thing is that i get this only with this particular pair and order of filters. when reversed or used separately there are no problems with green sh*t.

thanx, zivel
Try this:
Code:
-vf expand=0:-(((width/4)*3)-height):0:(((width/4)*3)-height)/2:0,scale=352:240
I didn't test it in the script, but did a dry run with the calculations made in advance, on my 1024 x 576 divx the commant result was:
Code:
mplayer -vf expand=0:-224:0:112:0,scale=352:240 Unzipped/test_video/divx.avi
Have fun, and lett me know...
__________________
Groetjes Japie
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
KVCD: working way to get a decent CQ value? SheffUK26 Video Encoding and Conversion 5 06-23-2004 04:47 AM
FFMPEG: Guide for avi to kvcd using ffmpeg Big2hd Video Encoding and Conversion 15 09-15-2003 03:04 AM
KVCD: Why is it only working with 352x240? big Video Encoding and Conversion 2 02-14-2003 10:41 PM
why kVCD 120min not working when convert from .dat to .mpg? thevuf Video Encoding and Conversion 2 10-03-2002 09:37 AM
KVCD: Pioneer 343 - I think I've got it working now m0rdant Players, DVRs, Media Centers 5 09-04-2002 08:33 PM




 
All times are GMT -5. The time now is 10:59 PM  —  vBulletin © Jelsoft Enterprises Ltd