forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PMP Mod v2.02 & PMP Mod AVC v1.02
Goto page Previous  1, 2, 3 ... 55, 56, 57 ... 60, 61, 62  Next
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
karnare



Joined: 16 Feb 2006
Posts: 17

PostPosted: Tue Aug 22, 2006 6:47 pm    Post subject: Reply with quote

How can I skip the first frames?
The buffer will be filled by fill_current_and_next_asynchronous_buffer(p, 0, p->file.packet_start, 0) in function pmp_read_open().
I would like to start the pmp at the right point where I stopped. I tried it as follows:
unsigned int packet_position = get_packet_position(p, g_resume_pos);

result = fill_current_and_next_asynchronous_buffer(p, g_resume_pos, packet_position, 1);
(the g_resume_pos is the point I stopped last playing.)

But it failed.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Tue Aug 22, 2006 7:59 pm    Post subject: Reply with quote

Take a look at my PMP Mod AVC 1.02M version. It has a resume function, which was originally done by malloc. It works pretty well.
_________________
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
Back to top
View user's profile Send private message Visit poster's website
karnare



Joined: 16 Feb 2006
Posts: 17

PostPosted: Tue Aug 22, 2006 8:22 pm    Post subject: Reply with quote

The resume function is not exactly what I wanted. It does not skip the first two frames either.
I`d like to realize a streaming playing, and I will save the pmp file header to a file(header.dat for example). So if I want to resume playing, it can read head.dat directly to get the header information, then start playing from the right point.
But it seems I have to save the first two frames too, because it will be needed.
Is there any way to resolve it?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
con



Joined: 22 Aug 2006
Posts: 3

PostPosted: Tue Aug 22, 2006 8:55 pm    Post subject: Reply with quote

Hello!

I have a question about Multipass Mode in VirtuaDub & X264. I am using VirtuaDub Mod with the x246vfw file. I followed the guide which I downloaded from here - but instead of using SinglePass I wanted to test MultiPass because I thought that it would make a slightly better quality.

However - I encoded a movie using "Multipass - First Pass" and set the bitrate to 768. After encoding, I am now stuck with an small avi file and a x264-1.stats file.

What am I supposed to do with those two files now? I searched the forum but I couldn't find an answer to this. Hope you can help me with that ;)

And sorry for my bad english :D
Back to top
View user's profile Send private message
jonny



Joined: 22 Sep 2005
Posts: 351

PostPosted: Tue Aug 22, 2006 9:28 pm    Post subject: Reply with quote

@karnare:

get_packet_position expect current_asynchronous_buffer already filled

try to put this:

p->current_asynchronous_buffer->first_packet = 0;
p->current_asynchronous_buffer->first_packet_position = p->file.packet_start;

before calling get_packet_position in pmp_read_open

it should work


@con:
those are basic encoding questions and will not be answered here, try a video dedicated forum like http://forum.doom9.org
Back to top
View user's profile Send private message Visit poster's website
karnare



Joined: 16 Feb 2006
Posts: 17

PostPosted: Wed Aug 23, 2006 11:26 am    Post subject: Reply with quote

It does work. Thank you , jonny!
Back to top
View user's profile Send private message Send e-mail MSN Messenger
con



Joined: 22 Aug 2006
Posts: 3

PostPosted: Thu Aug 24, 2006 2:43 am    Post subject: Reply with quote

OK, sorry for this ;)

But can I asked for a way to include twopass encoding in your tutorial

Quote:
i can give you a quick, manual tut:

- download/install Avisynth ( http://prdownloads.sourceforge.net/a...6.exe?download )
- with notepad, edit a file called "test.avs" with this inside:

# if "avisource" gives you trouble try to use "directshowsource" instead
avisource("c:\yourdir\your_vid.avi")
killaudio
lanczosresize(480, 272)
converttoyv12()

- open "test.avs" with VirtualDub (if there are no mistakes, you should see the video resized)
- create/edit "encode.bat", with this inside:

x264 --bitrate 512 -A all --level 3 --pictiming --aud --no-psnr --thread-input --progress --output test.264 test.avs

- put test.avs, x264 and encode.bat in the same dir
- double clic on encode.bat, encoding should start
- handle


I really did searched but couldn't find out if there is any way to include 2pass encoding into this tutorial... I hope this is not a basic encoding question...
Back to top
View user's profile Send private message
Sudds



Joined: 09 Jul 2006
Posts: 15
Location: Ireland

PostPosted: Thu Aug 24, 2006 7:30 am    Post subject: Reply with quote

Here you are mate:

x264 --pass 1 --threads 1 --progress --bitrate 550 -A all --level 3 --pictiming --aud --no-psnr --thread-input --output NUL YourMovie.avs

x264 --pass 2 --progress --bitrate 550 -A all --level 3 --pictiming --aud --no-psnr --thread-input --output YourMovie.264 YourMovie.avs
Back to top
View user's profile Send private message Visit poster's website
con



Joined: 22 Aug 2006
Posts: 3

PostPosted: Fri Aug 25, 2006 3:05 am    Post subject: Reply with quote

@Sudds
Thanks for your help ;)
Back to top
View user's profile Send private message
Sudds



Joined: 09 Jul 2006
Posts: 15
Location: Ireland

PostPosted: Fri Aug 25, 2006 3:08 am    Post subject: Reply with quote

No bother Con. ;)
Back to top
View user's profile Send private message Visit poster's website
csuper



Joined: 03 Jan 2006
Posts: 103

PostPosted: Fri Aug 25, 2006 5:58 am    Post subject: Reply with quote

Hye Jonny,

Long time no see...
How are you these days... ?

Hope to see a continuation & new features ;) of your beloved applications !

Ps : PMP Mod AVC is very very great !

Nothing more to say... so

CIAO.
Back to top
View user's profile Send private message
p5p



Joined: 04 Jul 2006
Posts: 3

PostPosted: Sun Aug 27, 2006 11:26 pm    Post subject: Reply with quote

Any change that we ever can play already converted PMP files via NFS (nethost) without using IRShell and without having a streamer running on an external device?

I'm thinking to play my PMPs from an Asus WL-HDD over Wifi.

Would be great to ingetrate USB and NFS support into PMP MOD.

Thanks anyways for this great app!
Back to top
View user's profile Send private message
jonny



Joined: 22 Sep 2005
Posts: 351

PostPosted: Mon Aug 28, 2006 5:58 pm    Post subject: Reply with quote

i'm going into an intense working period, there will be no updates for some time :p
Back to top
View user's profile Send private message Visit poster's website
yoshaw



Joined: 05 Jan 2006
Posts: 30

PostPosted: Sun Sep 03, 2006 12:52 am    Post subject: Reply with quote

Good luck mate :)
Back to top
View user's profile Send private message
wood



Joined: 11 Aug 2005
Posts: 2

PostPosted: Sat Sep 09, 2006 2:14 am    Post subject: "avc_get: sceMpegAvcDecode failed" error Reply with quote

Hi jonny

I use WinMenc 0.61beta to encode PMP AVC
It works well.
But when I download the latest version of mencoder from http://oss.netfarm.it/mplayer-win32.php
replaced the old version in WinMenc and encode PMP AVC again.
I got this error in PSP:
"avc_get: sceMpegAvcDecode failed"
can some one tell me why.
Is there a work around?
Back to top
View user's profile Send private message
wood



Joined: 11 Aug 2005
Posts: 2

PostPosted: Sat Sep 09, 2006 2:35 am    Post subject: avc_get: sceMpegAvcDecode failed Reply with quote

BTW
the profile I used in WinMenc is

[Settings]
VideoEnc=x264
VideoBR=600
AudioEnc=Mp3
AudioHz=44100
AudioBR=96
AudioID=Default
MP3Mode=0
MP3Vol=Default
VideoSize=480:272
Videofps=Original
VolNorm=1
VHQ=0
Xcmd=
Xvc=
Xvf=harddup
Xac=
Xaf=
XExt=muxpmpx264.bat
Back to top
View user's profile Send private message
jonny



Joined: 22 Sep 2005
Posts: 351

PostPosted: Sat Sep 09, 2006 6:35 am    Post subject: Reply with quote

you need a special version of mencoder to produce a compatible streams
a good practice is to search before asking
Back to top
View user's profile Send private message Visit poster's website
enuff4life



Joined: 10 Sep 2006
Posts: 1

PostPosted: Sun Sep 10, 2006 4:50 pm    Post subject: watching MAQXXXXX files Reply with quote

how can i see MAQXXXX files? by using PMP AVC mod?
Back to top
View user's profile Send private message
Sudds



Joined: 09 Jul 2006
Posts: 15
Location: Ireland

PostPosted: Sun Sep 10, 2006 10:21 pm    Post subject: Reply with quote

You cant, as they are encoded with different headers and wrapped in a different container.
You,ll have to encode again to PMP format.
Back to top
View user's profile Send private message Visit poster's website
rzxiao



Joined: 05 Feb 2006
Posts: 13

PostPosted: Thu Sep 14, 2006 12:41 am    Post subject: simple question Reply with quote

hi,all
I wonder whick tool is used to transfer a picture to a byte array (for example:background_8888 in PMP MOD AVC 1.02 source code).

thanks very much!
Back to top
View user's profile Send private message
jonny



Joined: 22 Sep 2005
Posts: 351

PostPosted: Thu Sep 14, 2006 1:04 am    Post subject: Reply with quote

pmpmod/interface/makefile.pl

it's a perl script (i've written a quick&dirty module to read/write tga files - tga.pm)
Back to top
View user's profile Send private message Visit poster's website
JasonV



Joined: 31 Mar 2006
Posts: 5

PostPosted: Fri Sep 15, 2006 3:19 am    Post subject: frame advance Reply with quote

jonny,

In Quicktime and Windows Media Player you can advance single frames of the video, but, in PMP, it seems that you can only advance by larger sections of the video. Is there a way to advance single frames in PMP? In the PMP source, the left/right buttons are hooked up to rewind/advance 1 frame normally and 20 frames while X is held. Are there sub frames that can be manipulated similarly? Thanks!

JasonV
Back to top
View user's profile Send private message Visit poster's website
jonny



Joined: 22 Sep 2005
Posts: 351

PostPosted: Tue Sep 19, 2006 6:51 pm    Post subject: Reply with quote

Quote:

left/right buttons are hooked up to rewind/advance 1 frame normally and 20 frames while X is held.

not frames, but keyframes.
advance it's not hard to do (you need to remove the keyframe check)
for rewind you need to get the first keyframe before the point and decode all the frames until you get the wanted one
Back to top
View user's profile Send private message Visit poster's website
uNn99



Joined: 19 Jan 2006
Posts: 64

PostPosted: Sat Sep 23, 2006 4:42 pm    Post subject: Reply with quote

jonny, i have a question :)
If i encode to avc format with mencoder and set option "no cabac" (Context-Adaptive Binary Arithmetic Coding) then i always get this error in pmp avc player:
"avc_get: scrMpegAvcDecode failed"
But on computer this file plays well (with splitter). I try to get the most possible encoding speed with mencoder and this option has a strong impact on it...
Back to top
View user's profile Send private message
jonny



Joined: 22 Sep 2005
Posts: 351

PostPosted: Sat Sep 23, 2006 6:54 pm    Post subject: Reply with quote

the internal decoder seems to not support CAVLC :(
Back to top
View user's profile Send private message Visit poster's website
option1



Joined: 23 Sep 2006
Posts: 1

PostPosted: Sat Sep 23, 2006 7:23 pm    Post subject: avc_get: sceMpeg error Reply with quote

I have a huge problem: Whenever I try to encode an AVC movie as described on jonnys page I always get the "avc_get: sceMpeg..." error after 4seconds of playback. I can even fast forward some minutes but after the blink of an eye the error shows up. I've already searched in this forum having found a similar problem, but without answear... I encoded with:

x264 --pass 1 --threads 1 --progress --bitrate 420 -A all --level 3 --pictiming --aud --no-psnr --thread-input --output NUL test.avs
x264 --pass 2 --progress --bitrate 420 -A all --level 3 --pictiming --aud --no-psnr --thread-input --output kk.264 test.avs

Is there something wrong? I've already tried other bitrates and parameters, it never worked :-( can anybody help please?
Back to top
View user's profile Send private message
foo



Joined: 25 Sep 2006
Posts: 7

PostPosted: Mon Sep 25, 2006 8:50 pm    Post subject: Reply with quote

Could someone explain the technical reasons why the PMP container must be used? I mean, it's pretty common that videos use xvid for video and mp3 for audio. Why do they have to be put in a PMP container for them to play in PMP mod?

For example, I have an avi video: AVI, 608 x 336, 23.98 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz) 128kbps CBR. All of those specs match the requirements for a video that PMP mod could play, but I still would have to re-encode(or de-mux or whatever:) ) and mux them into a PMP container for it to work.

Will it be possible in the future to play those kinds of videos without re-encoding/re-muxing them beforehand?
Back to top
View user's profile Send private message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Tue Sep 26, 2006 12:17 am    Post subject: Reply with quote

foo wrote:
Could someone explain the technical reasons why the PMP container must be used? I mean, it's pretty common that videos use xvid for video and mp3 for audio. Why do they have to be put in a PMP container for them to play in PMP mod?

For example, I have an avi video: AVI, 608 x 336, 23.98 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz) 128kbps CBR. All of those specs match the requirements for a video that PMP mod could play, but I still would have to re-encode(or de-mux or whatever:) ) and mux them into a PMP container for it to work.

Will it be possible in the future to play those kinds of videos without re-encoding/re-muxing them beforehand?

Please use the search function, this has been answered already several times.
Again in short terms: PMP container is faster (and easier) to parse and hell-lot-a easer to sync audio/video (AVI should be prohibited - IMO as a dev).

PS: Remuxing a already compatible stream inside an .avi/other container is really not that much of a problem, it only takes a couple of minutes at most.
_________________
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
Back to top
View user's profile Send private message Visit poster's website
foo



Joined: 25 Sep 2006
Posts: 7

PostPosted: Wed Sep 27, 2006 3:27 am    Post subject: Reply with quote

I'm having a lot of problems re-encoding avi's into a avc videos, I'm using linux so all windows softwares are sadly out..

ffmpeg loses about 2/3 of frames when using yuv4mpegpipe, I've tried several versions and all seem to be doing this. It works if I save the yuv output straight to a file from ffmpeg and then encode that file with x264, but i dont want to do this as it uses a LOT of diskspace :)

Using mplayer and yuv4mpeg output and named pipe to x264 for some reason produces a h264 with double the fps of the original video (23.98 -> 47.95) and about three times the original size (150MB -> 450MB) even though the resolution is a lot smaller.

And then there is mencoder which I havent been even able to compile. Could someone post some small tutorial on how they got mencoder to produce pmp compliant avc video (./configure parameters etc, what version of mplayer sources, what patches did you use/what changes did you make if any)?

Or if someone has or would be able to compile a mencoder binary with all the patches for RHEL4, I'd be grateful! (Fedora core 3 or Centos 4 should be binary compatible also.)

(And I did use search and read most of this thread, but no help there)
Back to top
View user's profile Send private message
foo



Joined: 25 Sep 2006
Posts: 7

PostPosted: Wed Sep 27, 2006 7:14 am    Post subject: Reply with quote

I finally got it to work! I used ffmpeg and wrote the raw video to a named pipe, and encoded that with x264.

Funnily the fps was still 2x the original, but when I told x264 to encode half the original fps it evened out and worked :)

Code:

mkfifo tmp/pipe.yuv
ffmpeg -i video.avi -y -an -s 480x272 -r 24000/1001 tmp/pipe.yuv
x264 --crf 24 -A all --level 3 --pictiming --aud --no-psnr --thread-input --progress --fps 12000/1001 --output video.avi.264 tmp/pipe.yuv 480x272


Does anyone have any idea why the fps is acting weird?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Goto page Previous  1, 2, 3 ... 55, 56, 57 ... 60, 61, 62  Next
Page 56 of 62

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group