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

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

Moderators: cheriff, TyRaNiD

Post Reply
karnare
Posts: 17
Joined: Thu Feb 16, 2006 11:40 am

Post by karnare »

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.
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

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
karnare
Posts: 17
Joined: Thu Feb 16, 2006 11:40 am

Post by karnare »

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?
con
Posts: 3
Joined: Tue Aug 22, 2006 8:32 pm

Post by con »

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
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

@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
karnare
Posts: 17
Joined: Thu Feb 16, 2006 11:40 am

Post by karnare »

It does work. Thank you , jonny!
con
Posts: 3
Joined: Tue Aug 22, 2006 8:32 pm

Post by con »

OK, sorry for this ;)

But can I asked for a way to include twopass encoding in your tutorial
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...
Sudds
Posts: 15
Joined: Sun Jul 09, 2006 4:40 am
Location: Ireland
Contact:

Post by Sudds »

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
con
Posts: 3
Joined: Tue Aug 22, 2006 8:32 pm

Post by con »

@Sudds
Thanks for your help ;)
Sudds
Posts: 15
Joined: Sun Jul 09, 2006 4:40 am
Location: Ireland
Contact:

Post by Sudds »

No bother Con. ;)
csuper
Posts: 103
Joined: Tue Jan 03, 2006 6:19 pm

Post by csuper »

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.
p5p
Posts: 3
Joined: Tue Jul 04, 2006 6:31 pm

Post by p5p »

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!
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

i'm going into an intense working period, there will be no updates for some time :p
yoshaw
Posts: 30
Joined: Thu Jan 05, 2006 7:15 am

Post by yoshaw »

Good luck mate :)
wood
Posts: 2
Joined: Thu Aug 11, 2005 5:08 pm

"avc_get: sceMpegAvcDecode failed" error

Post by wood »

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?
wood
Posts: 2
Joined: Thu Aug 11, 2005 5:08 pm

avc_get: sceMpegAvcDecode failed

Post by wood »

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
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

you need a special version of mencoder to produce a compatible streams
a good practice is to search before asking
enuff4life
Posts: 1
Joined: Sun Sep 10, 2006 4:43 pm

watching MAQXXXXX files

Post by enuff4life »

how can i see MAQXXXX files? by using PMP AVC mod?
Sudds
Posts: 15
Joined: Sun Jul 09, 2006 4:40 am
Location: Ireland
Contact:

Post by Sudds »

You cant, as they are encoded with different headers and wrapped in a different container.
You,ll have to encode again to PMP format.
rzxiao
Posts: 13
Joined: Sun Feb 05, 2006 7:55 pm

simple question

Post by rzxiao »

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!
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

pmpmod/interface/makefile.pl

it's a perl script (i've written a quick&dirty module to read/write tga files - tga.pm)
JasonV
Posts: 5
Joined: Fri Mar 31, 2006 5:04 pm
Contact:

frame advance

Post by JasonV »

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
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

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
uNn99
Posts: 64
Joined: Thu Jan 19, 2006 7:27 am

Post by uNn99 »

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...
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

the internal decoder seems to not support CAVLC :(
option1
Posts: 1
Joined: Sat Sep 23, 2006 7:15 pm

avc_get: sceMpeg error

Post by option1 »

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?
foo
Posts: 7
Joined: Mon Sep 25, 2006 8:38 pm

Post by foo »

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?
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

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
foo
Posts: 7
Joined: Mon Sep 25, 2006 8:38 pm

Post by foo »

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)
foo
Posts: 7
Joined: Mon Sep 25, 2006 8:38 pm

Post by foo »

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: Select all

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?
Post Reply