PMP Mod v2.02 & PMP Mod AVC v1.02

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
cooleyes
Posts: 123
Joined: Thu May 18, 2006 3:30 pm

Post by cooleyes »

jonny wrote:@cooleyes & uNn99:

mencoder can be also compiled with runtime cpu detection, do you think there is a big speed difference compared to specific builds?
@jonny:

hehe, limit speed difference.
but someone need them, so I build them, :P
jockyw2001
Posts: 339
Joined: Thu Sep 29, 2005 4:19 pm

Post by jockyw2001 »

How much slower is x264 encoding compared to e.g. DIV3 or mp4?
I'm thinking of real-time encoding by VLC in the near future.
And are both video and audio codecs new?
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

hehe, limit speed difference.
but someone need them, so I build them, :P
:)
How much slower is x264 encoding compared to e.g. DIV3 or mp4?
I'm thinking of real-time encoding by VLC in the near future.
And are both video and audio codecs new?
on my athlon xp @2166 i get around 25-30fps (with the suggested settings, and avisynth frameserving dvd source)
i'm sure using a less accurate motion estimation and other options tweeks, could be faster
atm audio is the usual mp3


PS:
i've uploaded a vfw binary+installer on my site, i've also updated the x264 source with the patch i've posted some pages ago
(if someone is interested on building mencoder on another platform, this is the source+patches that should be used)
digihoe
Posts: 108
Joined: Sat May 14, 2005 7:40 pm

Post by digihoe »

Great! I much more enjoy using VirtualDub :-)

Best regards!
yoshaw
Posts: 30
Joined: Thu Jan 05, 2006 7:15 am

Post by yoshaw »

Shonen wrote:Hi yoshaw,

FPS= rate/scale

Thus, for example, 25 fps (PAL) is 25000/1000=25. 25/1 also works.

29.97 (NTSC) is 8000000/333667=29.97

Etc.

You can calculate this with calculator to get the desired framerate within the muxed pmp file. Normally, the muxer detects the .txt file that is created alongside the 264 stream, and correctly enters the rate/scale ratio itself.
I really really appreciate that post but the thing is that it left me super confused. What if I don't have the txt file created and have used some other process like the virtualdub way?

Also, the figures remained 25000/1000 regardless of the procedure I was using before(Jonny's custom x264 method which created the txt) but it didn't update the figures when the video was 29fps or more.

Better if just let me know what to write in the place of 25000 if I have a 29.97fps video. Can't we have like a drop down box that simply says 29.97/25fps etc instead of the enduser multiplying it themselves? Ofcourse I'm saying this without knowing if its even possible or not so ignore it if its not.

@Jonny
One question regarding the new x264 installer.

If I already have the regular x264 installed on my system. Would your binary patched version of x264vfw cause any problem if installed over it? You know the wierd stories of installing duplicate codecs, don't you. So that's why I'm asking its safe to install this right?

Also when installed, all I have to do is open a video in virtualdub and choose x264 in the compression option and it'll be your patched vfw right?
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

I really really appreciate that post but the thing is that it left me super confused.
What if I don't have the txt file created and have used some other process like the virtualdub way?
at the moment, you never need to specify those informations manually:

1 - if you use x264 (commandline), the txt file is used
2 - if you use virtualdub, those informations are taken directly from the avi
3 - if you use mencoder, those informations are taken directly from the avi

only someone trying to mux a raw stream, generated by a different method, need to fill those informations manually

Also, the figures remained 25000/1000 regardless of the procedure I was using before(Jonny's custom x264 method which created the txt) but it didn't update the figures when the video was 29fps or more.
it's normal
i search for the txt file only when you start the mux
you'll see a message when the txt file is used
in the last version of the muxer, to avoid confusion, the defaults are blank (leave the values blank, you'll be anyway notified if the muxer is not able to detect the parameters)

Better if just let me know what to write in the place of 25000 if I have a 29.97fps video. Can't we have like a drop down box that simply says 29.97/25fps etc instead of the enduser multiplying it themselves? Ofcourse I'm saying this without knowing if its even possible or not so ignore it if its not.
since the parameters need to be filled only in case of some advanced testing purpose, i guess there is no need to make all more user friendly

If I already have the regular x264 installed on my system. Would your binary patched version of x264vfw cause any problem if installed over it? You know the wierd stories of installing duplicate codecs, don't you. So that's why I'm asking its safe to install this right?
you should uninstall the regular version to use the modified one (i guess the regular version will be simply overwritten if you don't do this)

Also when installed, all I have to do is open a video in virtualdub and choose x264 in the compression option and it'll be your patched vfw right?
there is nothing special in the modified vfw version, it's like the official one, but with some defaults and internals changed





PS: i've updated the demuxer on my site, now supports both normal and avc pmps
mmick
Posts: 4
Joined: Sun Jun 25, 2006 10:23 am

Post by mmick »

I am using a player called PSPlayerMT that allows even XVID or DIVX with MP3 audio (along with almost every video/audio types).

To play a full screen full speed movie/videoclip I just have to (re)encode to 480x272 (or less...I think upper res don´t work) with virtualdub (and I even doesn´t have to reencode audio if it´s in MP3) and with the subtitle plugin if I want subtitles and... voilá. A xvid/divx video playable on PSP and profile can even be the same as in a PC.

With PMPlayerMT I just have to:
- put my avi file & subtitles in virtualdub and final file is completly playable.

I can´t precise but a 2h movie spends about 30-40% of the battery in medium/high brightness. (PMPlayerMT allows zoom, full screen zoom, skip, FF, FW, 2x speed, video position memory, etc)

With PMP as far as I understand (as I never used it), I have to:
- demux a movie in video & audio (which takes a while and space)
- reencode & mux it (more space & time)

Isn´t there a program to encode AVI > AVC directly, simple as drag&drop + choose final res + size on card?
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

mmick wrote:I am using a player called PSPlayerMT that allows even XVID or DIVX with MP3 audio (along with almost every video/audio types).

To play a full screen full speed movie/videoclip I just have to (re)encode to 480x272 (or less...I think upper res don´t work) with virtualdub (and I even doesn´t have to reencode audio if it´s in MP3) and with the subtitle plugin if I want subtitles and... voilá. A xvid/divx video playable on PSP and profile can even be the same as in a PC.

With PMPlayerMT I just have to:
- put my avi file & subtitles in virtualdub and final file is completly playable.

I can´t precise but a 2h movie spends about 30-40% of the battery in medium/high brightness. (PMPlayerMT allows zoom, full screen zoom, skip, FF, FW, 2x speed, video position memory, etc)
Nice you mention PSPlayerMT, but my experiences with it were rather disappointing. Many encodings won't be played back correctly and if they are, highest quality vids are not so smooth.
With PMP as far as I understand (as I never used it), I have to:
- demux a movie in video & audio (which takes a while and space)
- reencode & mux it (more space & time)

Isn´t there a program to encode AVI > AVC directly, simple as drag&drop + choose final res + size on card?
if you choose the normal way, yes, that would be the way to go (though the pmpmuxer also supports avi input now, so it's not 100% correct). The demux/mux part don't take very long though, the most time is spent on the transcoding and that's the same with PSPlayerMT.
However, there are some devs out, that produce nice little converter tools (XVid4PMP,AVI2PMP) which do the same as you do with virtualdub, only with much easier interface.

Then to mention what you get from PMP Mod:
- better performance (PMP Mod 2.01 plays fullscreen XVid encodes up to 1500kbit totally smooth now, not to mention the AVC version)
- luminance boost to avoid ghosting effect
- volume boost
- all your zooms
- FF/FR, 2xFF/2xFR
- all together UMD Quality video at full speed
- PMP Mod 2.01 also supports video sizes up to 720x512 (though these still stutter)

and with my little subtitle mod, you can even skip the step of encoding the subtitles into your video, but read them directly from a MicroDVD subtitle file and display it.

Decide yourself if you want to try out PMP Mod or not.

Greets,
Raphael
Djakku
Posts: 45
Joined: Mon Jan 30, 2006 2:41 am

Post by Djakku »

Wow, after reading your post Raphael, I'm gonna try your Latest PMP Mod AVC subtitle support!

Once again, congratulation jonny, Raphael, MagiK, JiniCho, Jockyw2001, Dickydick1969 And ALL of you for your great Work, you made the PSP worth it!
mmick
Posts: 4
Joined: Sun Jun 25, 2006 10:23 am

Post by mmick »

I think PMP has been developing very well but what I was looking for PSP was a kind all-in-one Media Player.

What I would like is somewhat a breed between PMP Mod (AVC) and PSPlayerMT:
- to be able to read my backuped avi movies without conversion (PSPlayerMT) at any resolution (PMP Mod)
- to be able to read them with subtitles in their original srt/sub file
- to be able to just copy any MPG videoclip of mine, ASF humor clip, 3GP, MP4 video from my SonyEricsson mobile (that also uses MSDUO) and see it (PSPlayer MT)
- to be able to listen MP3 while I see my pictures...

I don´t need 1500kbps playback. My 800-1000kbps xvid files are fantastic and no need for more. But for that I have to use PSPlayerMT and reencode to fit 480x272...

The bottom line of what I´m trying to say is that, without descrediting your fantastic work and most helpful for us and independently of the program I use, I always think that it´s too much trouble and time spent to see a movie on PSP when I would apreciate to be able to copy&play.

Lot´s of people have laptops and <3GHz CPUs and to see a movie on my PSP I have to wait 2h to encode a movie to PMP (PMP player) or 480x272 AVI (PSPlayerMT). PMP Mod only works directly with PMP/AVC files, PSPlayerMT play almost all formats but only accepts up to 480x272 :(
pegasus21
Posts: 8
Joined: Sun Jun 18, 2006 4:24 am

Post by pegasus21 »

It's only a portable device with a 333MHz main processor... Compare that to a 3GHz, you'll realise you're getting quite a bit from the PSP already.

I forgot to mention that on a 333MHz computer, you probably be hard pressed to watch a decent sized clip at full speed with AVC.
optimus
Posts: 9
Joined: Sun Jun 25, 2006 5:14 pm

Post by optimus »

MediaCoder is now able to produce PMP MOD compatible AVC files (based on MEncoder). It also supports producing PMP MOD 2.x files (by choosing video format).

Image

Learn more here
You can get it here. (note to download 0.5.0 pre)

Cheer up Jonny! You are my idol. ^_^
Last edited by optimus on Sun Jun 25, 2006 5:29 pm, edited 4 times in total.
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

What I would like is somewhat a breed between PMP Mod (AVC) and PSPlayerMT:
- to be able to read my backuped avi movies without conversion (PSPlayerMT) at any resolution (PMP Mod)
- to be able to read them with subtitles in their original srt/sub file
- to be able to just copy any MPG videoclip of mine, ASF humor clip, 3GP, MP4 video from my SonyEricsson mobile (that also uses MSDUO) and see it (PSPlayer MT)
- to be able to listen MP3 while I see my pictures...
stop dreaming and wasting forum space with those requests
my position about this is really clear, i don't want to repeat myself again and again every time

EDIT: optimus, nice :)
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

mmick wrote: What I would like is somewhat a breed between PMP Mod (AVC) and PSPlayerMT:
- to be able to read my backuped avi movies without conversion (PSPlayerMT) at any resolution (PMP Mod)
- to be able to read them with subtitles in their original srt/sub file
- to be able to just copy any MPG videoclip of mine, ASF humor clip, 3GP, MP4 video from my SonyEricsson mobile (that also uses MSDUO) and see it (PSPlayer MT)
- to be able to listen MP3 while I see my pictures...
I can only quote jonny there, stop dreaming. This will probably not happen in the next millenium. So you have to take a choice and work with the stuff the devs provide you, or if you think more should be possible, give it a try yourself, maybe you do the revolution :)
Shonen
Posts: 26
Joined: Fri Jun 16, 2006 8:52 pm

Post by Shonen »

mmick wrote:I think PMP has been developing very well but what I was looking for PSP was a kind all-in-one Media Player.

What I would like is somewhat a breed between PMP Mod (AVC) and PSPlayerMT:
- to be able to read my backuped avi movies without conversion (PSPlayerMT) at any resolution (PMP Mod)
- to be able to read them with subtitles in their original srt/sub file
- to be able to just copy any MPG videoclip of mine, ASF humor clip, 3GP, MP4 video from my SonyEricsson mobile (that also uses MSDUO) and see it (PSPlayer MT)
- to be able to listen MP3 while I see my pictures...
Although I agree that from a dev/realistic point of view this is rampant dreaming and very hard or impossible to attain on a PSP, I think it's understandable that end-users have interest in these kind of features. Especially if you see PMP Mod's performance and PSPlayerMT's wide format support. For many people, video is just video, and they have little interest or time to delve into multiple applications, recoding, etc. They still see technology as black boxes with easy in-out operation, with free time spent away from the glow of a computer screen and it not running endlessly through the night recoding.

Personally, I'm just glad we have PMP Mod (especially AVC) and PSPlayerMT: along with Sony's official player, PSP users up to 2.6 (and with the modchip everyone with soldering skills/a friend with soldering skills) can enjoy the PSP, with it's lush screen, as a very capable, stable mediaplayer with some killer homebrew players. Also, please note that guys like jonny, raphael, cooleyes, Jinicho, and kkman (and many others) are all doing it for free and on their own spare time. I just feel very lucky and thankful.

Anyway, enough philosophy.

I've tried Mediacoder 0.5 pre1, looks pretty sweet. I like the fact that the developer kept all the console and option gimmicks.

Edit: Mediacoder didn't work for me on the first run (sceMpegAvcDecode error), although the process with the mux went very smoothly. It's probably because there are too many options listed when the program addresses mencoder. Here's the list:

Code: Select all

".\mplayer\mencoder.exe" "$&#40;SourceFile&#41;" -vf scale=480&#58;272&#58;0&#58;0&#58;&#58;,harddup -of rawvideo -ofps 30000/1001 -ovc x264 -x264encopts qcomp=0.60&#58;level_idc=30&#58;dct_decimate&#58;bframes=0&#58;keyint=250&#58;keyint_min=25&#58;frameref=1&#58;qp_min=10&#58;qp_max=51&#58;qp_step=2&#58;qp_constant=26&#58;cabac&#58;direct_pred=1&#58;noweight_b&#58;i4x4&#58;i8x8&#58;b8x8mv&#58;8x8mv&#58;no4x4mv&#58;8x8dct&#58;mixed_refs&#58;nobrdo&#58;trellis=1&#58;bime&#58;fast_pskip&#58;threads=1&#58;aud&#58;pictiming&#58;me=2&#58;me_range=16&#58;subq=5&#58;crf=20 -nosound -o "$&#40;DestFile&#41;"

".\codecs\lame.exe" "$&#40;SourceFile&#41;" "$&#40;DestFile&#41;" --priority 1 -r -x -s $&#40;SampleRate&#41; --vbr-new -V 5 -k --replaygain-fast --quiet
Has anyone had any success?
mmick
Posts: 4
Joined: Sun Jun 25, 2006 10:23 am

Post by mmick »

jonny wrote:stop dreaming and wasting forum space with those requests
my position about this is really clear, i don't want to repeat myself again and again every time
Raphael wrote: I can only quote jonny there, stop dreaming. This will probably not happen in the next millenium. So you have to take a choice and work with the stuff the devs provide you, or if you think more should be possible, give it a try yourself, maybe you do the revolution :)
LOL Stop Dreaming? In what part?! In case you never tried PSPlayerMT, it does all that but limited to 480x272 and no subtitles because the programmer stopped working on the app due to some links of foreign websites.

I wasn´t rude and no need for you all to be rude. I came here to point you out that you were doing a good job and to make some suggestions as a final user. If you call "garbage" to my posts and "stop dreaming" & "revolution" to what an existing simple program already does but due foreign websites disrespect to the Corean programmer it stopped from going further... well... I just can assume that you aren´t just able to do it so as the Corean programmer show us it is possible.

Sorry for more "garbage". Feel free to delete the post as I already said what I had to. I´ll stick to PSPlayerMT as I can read every kind of files and I just need to reencode (directly, smooth & silk) video track if >480x272 to a good xvid.
yoshaw
Posts: 30
Joined: Thu Jan 05, 2006 7:15 am

Post by yoshaw »

jonny wrote: at the moment, you never need to specify those informations manually:

1 - if you use x264 (commandline), the txt file is used
2 - if you use virtualdub, those informations are taken directly from the avi
3 - if you use mencoder, those informations are taken directly from the avi

only someone trying to mux a raw stream, generated by a different method, need to fill those informations manually

it's normal
i search for the txt file only when you start the mux
you'll see a message when the txt file is used
in the last version of the muxer, to avoid confusion, the defaults are blank (leave the values blank, you'll be anyway notified if the muxer is not able to detect the parameters)

since the parameters need to be filled only in case of some advanced testing purpose, i guess there is no need to make all more user friendly

you should uninstall the regular version to use the modified one (i guess the regular version will be simply overwritten if you don't do this)

there is nothing special in the modified vfw version, it's like the official one, but with some defaults and internals changed

PS: i've updated the demuxer on my site, now supports both normal and avc pmps

THANKS jonny! That was very informative and easy to grasp. The new muxer that leavs those areas blank is great for people like me. Letting the avi stream handle it is awesome! Really appreciate that.

Nothing less from the author of the best MP for PSP! Keep up the good work bro. You ROCK! :)
optimus wrote:MediaCoder is now able to produce PMP MOD compatible AVC files (based on MEncoder). It also supports producing PMP MOD 2.x files (by choosing video format).

Learn more here
You can get it here. (note to download 0.5.0 pre)

Cheer up Jonny! You are my idol. ^_^
When I try playing the encoded file from mediacoder in PMP AVC, all i get is the following error screen.

Error:
"avc_get: sceMpegAvcDecode failed"

Any ideas what's going wrong?
optimus
Posts: 9
Joined: Sun Jun 25, 2006 5:14 pm

Post by optimus »

Oh sorry to have messed something up in the command line options. I've fixed it and will put out an updated version soon. As this is Jonny's thread, for further discussion about MediaCoder you may want to go here.
Last edited by optimus on Mon Jun 26, 2006 12:10 am, edited 1 time in total.
therock003
Posts: 96
Joined: Fri Sep 23, 2005 11:09 pm

Post by therock003 »

I just dloaded 22mb of mediacoder,does that mean i now have to redownload or is it something i can change from the options?
optimus
Posts: 9
Joined: Sun Jun 25, 2006 5:14 pm

Post by optimus »

Simply update the PSP plug-in will make it work. Get it here and put the dev_psp.dll in MediaCoder's plugins folder.
therock003
Posts: 96
Joined: Fri Sep 23, 2005 11:09 pm

Post by therock003 »

thanx for your quick reply,i will try it.
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

LOL Stop Dreaming? In what part?! In case you never tried PSPlayerMT, it does all that but limited to 480x272 and no subtitles because the programmer stopped working on the app due to some links of foreign websites.
well... I just can assume that you aren´t just able to do it so as the Corean programmer show us it is possible
listen me carefully
i don't care what program you use or you like more or you think is better.
the point is that i'm not here to satisfy your curiosity or be friendly or whatever you think i should be.
i have explained my design choices many times, and i don't want to repeat myself once again.
if you want answers, search in this thread.
if you are not interested, use the logout link.

an existing simple program already does but due foreign websites disrespect to the Corean programmer it stopped from going further...
please, no scene drama report here.
Shonen
Posts: 26
Joined: Fri Jun 16, 2006 8:52 pm

Post by Shonen »

optimus wrote:Simply update the PSP plug-in will make it work. Get it here and put the dev_psp.dll in MediaCoder's plugins folder.
Works. Tested it on Tomb Raider Legend E3 Trailer. Super job, mate ^_^
klaatu45
Posts: 2
Joined: Mon Jun 26, 2006 6:17 am

Can't seem to encode properly

Post by klaatu45 »

I can't seem to get rid of those nasty brown streaks from my video files, I am currently testing the AVI to PMP by uNn. It plays great, but I can't get rid of those streaks (ghosting)! Here is the information:

Metal gear 4 trailer (2006)
Original Source.........
FileSize/String : 376 MiB
Format/String : Quicktime
OveralBitRate/String : 3539 Kbps
PlayTime/String : 14mn 51s

Video #0
Codec/String : Sorenson 3
Codec/Info : Sorenson Media Video 3 (Apple QuickTime 5)
BitRate/String : 3223 Kbps
Width : 852
Height : 480
AspectRatio/String : 16/9
FrameRate/String : 29.969 fps
Bits/(Pixel*Frame) : 0.263
PlayTime/String : 14mn 51s

Audio #0
Codec/String : AAC LC
BitRate/String : 192 Kbps
Channel(s)/String : 2 channels
SamplingRate/String : 48 KHz
PlayTime/String : 14mn 51s


Using AVi to PMP settings:
Video Compression...: x264, AVC, const. bitrate, use sharp
Resolution................: 480x272
Target Bitrate...........: 850kbps
FPS.........................: 30
Audio compression...: Mancoder, 44100 Hz, 160kbps

anything I can do? Thanks in advance!
Last edited by klaatu45 on Mon Jun 26, 2006 7:00 am, edited 1 time in total.
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

@mmick:
First of all, I wasn't trying to be offensive, but I really can understand jonny, getting asked for the same features he reasoned not to do again and again.
mmick wrote: LOL Stop Dreaming? In what part?!
People seem to forget that we devs don't code for your pleasure, but mostly for educational purposes, fun, or just for ourselfs (we're cheap egoist bastards, you know?), all that in our spare time for no money and whenever something nice and helpfull comes out of it, we might share it with you. Some are even nice enough to share the complete source (like JiniCho & jonny), so everyone is free to improve things to their own liking, and others - like the PSPlayerMT dev - don't.
So either you're lucky or not. If you have a good idea on what could be improved and we find it interesting to try out ourself - we might try out, but if we already stated that we're not gonna do this&that for some reason, then please just bear it.

what an existing simple program already does but due foreign websites disrespect to the Corean programmer it stopped from going further... well...
If it's already that great, then be happy there is this wonderfull peace of software. If you're not quite happy yet, well... then it can't be helped, since the dev made it impossible to improve his app further, so you're out of luck.
I just can assume that you aren´t just able to do it so as the Corean programmer show us it is possible.
Until here I really was not thinking bad of you, but this sentence shows complete ignorance and impudance. With such comments, you make me wanna stop commiting to the community and just do everything for my own. If you don't like what we do, well... then do better. But never ever again blame someone for something that you're not capable of doing yourself. >:[
Shonen
Posts: 26
Joined: Fri Jun 16, 2006 8:52 pm

Post by Shonen »

klaatu45:

Increase luminescence by tapping R-Trigger.
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

@klaatu45:

usually ghosting, smearing and similar effect are generated by the psp lcd screen (there are already some threads about this if you search in this forum)
you should be able to verify this pausing the video (you should see no artifacts in the paused frame)
like Shonen says, raising luminosity helps in this cases
mmick
Posts: 4
Joined: Sun Jun 25, 2006 10:23 am

Post by mmick »

Raphael wrote:Until here I really was not thinking bad of you, but this sentence shows complete ignorance and impudance. With such comments, you make me wanna stop commiting to the community and just do everything for my own. If you don't like what we do, well... then do better. But never ever again blame someone for something that you're not capable of doing yourself. >:[
First I´m a new user as you can see and I don´t know what Jonny said several times. When I came here talking about things that could be improved the answer was almost as "I´m mighty powerful, damn you, shut up because I can´t be disturbed". The answer could be: please see post X because that was discussed OR that are some ideas but we´re not going that path.

I already stated that you all are doing a good job and the least I expected was an answer as I had. Also, my phrase you quoted was to mean that if you don´t go that path because you can´t make the code to it, just tell because noone is forcing nothing here. Comments/opinions are to make things better because the interest is to all us. If people isn´t interested on other´s opinions, well, you´re in your right. Thnkx
digihoe
Posts: 108
Joined: Sat May 14, 2005 7:40 pm

Post by digihoe »

jonny, do you see any possibilities to use hardware MP3 decoding (as mention here: http://forums.ps2dev.org/viewtopic.php? ... c0d8922883 ) in the future in combination with AVC in a PMP container?

Best regards!
mystic_memories
Posts: 12
Joined: Sun Mar 12, 2006 8:27 am

Re: small HOWTO: AVC pmp on Linux

Post by mystic_memories »

It was a good tutorial, I got it converting in no time with this. But one problem, for some reason the txt file generated by the x264 doesn't contain anything (it's always 0 bytes). Shouldn't it contain info on the video or something? I already applied the two patches before compiling x264 with

Code: Select all

patch -p0 < x264-pictiming-magik.diff
patch -p0 < x264-info_file.diff
I actually changed the path in the x264-info_file.diff file to the right one before calling the above two functions.

Anyone have idea why the .txt file generated is 0 bytes?
606u wrote:As this topic went too long, maybe there is a similar HOWTO in the previous pages...

Step 0: setting-up (once, only):
- install perl, Bit-Vector and Carp-Clan packages;
- unrar pmp_muxer_avc_1_00_source.rar;
- .tar.gz files can be safely deleted;
- convert DOS line-endings to Unix-ones; I've used zip 1.zip *; unzip -a 1.zip; rm 1.zip;
- put the following as a first line in both perl scripts:

Code: Select all

#!/usr/bin/perl -I/path/to/pmp_muxer_avc/dir
- make perl scripts executable (chmod +x *.pl);
- unpack jonny's x264_source.rar, build and install (requires yasm);
- install mplayer/encoder if necessary;

Step 1: encoding video to H264:

Code: Select all

# mkfifo pipe.y4m
# mplayer -benchmark -nosound -quiet -really-quiet \
    -vo yuv4mpeg&#58;file=pipe.y4m -vf scale=480&#58;272 file.avi &
# x264 --crf 25 -A all --level 3 --pictiming --aud --no-psnr \
    --thread-input --output file.264 pipe.y4m
(Optional) Step 2: encoding audio to 44,1KHz MP3 (command-line borrowed from avi2pmp):

Code: Select all

mencoder -quiet -really-quiet file.avi -srate 44100 -oac mp3lame \
    -lameopts vol=0&#58;mode=0&#58;cbr&#58;br=112 -ovc copy -of rawaudio -o file.mp3
Step 4: mux file:

Code: Select all

pmp_muxer_avc -v file.264 -a file.mp3 -o file.pmp \
    -w 480 -h 272 -r 23980 -s 1000
Everything above in a shell-script:

Code: Select all

#!/bin/sh

die &#40;&#41;
&#123;
    echo "$1"
    exit 1
&#125;

&#91; -f "$2.264" &#93; && die "$2.264&#58; file exists"
&#91; -f "$2.mp3" &#93; && die "$2.mp3&#58; file exists"
&#91; -f "$2.pmp" &#93; && die "$2.pmp&#58; file exists"

# set-up here&#58;
WIDTH=480
HEIGHT=272
FPS=23980
H264CRF=24 # up to 51; 18 == XviD' Qf 2

PIPE=/tmp/pipe.y4m

&#91; -n "$1" -a -n "$2" &#93; || die "Usage&#58; $0 in.avi out"
rm -f $PIPE
mkfifo $PIPE || exit 1

mplayer -benchmark -nosound -quiet -really-quiet \
    -vo yuv4mpeg&#58;file=$PIPE -vf scale=$WIDTH&#58;$HEIGHT "$1" &
x264 --crf $H264CRF -A all --level 3 --pictiming --aud --no-psnr \
    --thread-input --output "$2.264" $PIPE

mencoder -quiet -really-quiet "$1" -srate 44100 -oac mp3lame \
    -lameopts vol=0&#58;mode=0&#58;cbr&#58;br=112 -ovc copy -of rawaudio -o "$2.mp3"

pmp_muxer_avc -v "$2.264" -a "$2.mp3" -o "$2.pmp" \
    -w $WIDTH -h $HEIGHT -r $FPS -s 1000
Post Reply