Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Decrypting

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th October 2008, 00:11   #1  |  Link
aggiemarine07
Registered User
 
Join Date: Oct 2008
Posts: 15
Problems with mplayer and playing m2ts files

not quite sure if this belongs in this section of the website or not but I will post it here and move it to where ever it needs to go if that is the case; by anyhow here is my story:

My system specs are: ubuntu 8.04 with a 3.1ghz intel, 512mb nvidia 7900 bfg, 4gb of pc5400 RAM, 750gb seagate-100gb Maxtor-36gb WD 10000rpm, Pioneer Bluray drive

I have been able to successfully dump Spiderman3 from my bluray drive to the HD using dumphd (took an hour or two and 50gbs but hey it did it successfully) but when I try to play them in mplayer the video is great (really smooth) but the sound is choppy. I built the latest SVN mplayer from source and used the command "mplayer -vc ffvc1 bluraymovie.m2ts"

I then noticed in the terminal that it would give back this output for the ffvc1 codec:

Forced video codec: ffvc1
Cannot find codec matching selected -vo and video format 0x10000005.


When I go back to the terminal and do a mplayer -vc help it spits back this after the command:

ffvc1 ffmpeg problems FFmpeg M$ WVC1 [vc1]

I then also tried to play with just "mplayer 00011.m2ts" it had still had the choppy sound (and oddly enough was in japanese Dont know how that happened.

Any thoughts or outputs needed I will happily provide, I know I am very close to playing bluray on my linux system and would greatly appreciate any help. Thanks!

gw

Last edited by aggiemarine07; 22nd October 2008 at 00:04.
aggiemarine07 is offline   Reply With Quote
Old 8th October 2008, 13:05   #2  |  Link
kkloster21
Registered User
 
Join Date: Jun 2008
Posts: 117
try using mplayer with some flags like:

Code:
mplayer -cache 8192 -demuxer lavf -aid 1 -lavdopts threads=2:fast:skiploopfilter=all -channels 6 00011.m2ts
the cache flag caches 8192 K of data (in this case), the demuxer flag specifies the av demuxer (to be lavf in this case), -aid 1 choses the first audio stream for the movie (if its wrong, you may here the movie in some other language - look at the back of the blu-ray case and check out what audio streams are available. also note that you may have some trouble playing back trueHD or DTS-MA HD streams). you may need to choose one of the other audio streams (-aid 2, -aid 3, etc.) if -aid 1 doesn't work. you can look at the terminal output to see which other ones are available. the lavdopts flag specifies the number of threads (if you have a dual core processor you can set threads=2, quad --> threads=4, 8 is the max number of threads for mplayer right now.) the other options on the -lavdopts flag are more complex options that are supposed to speed up video playback. experiment with all of these to find what works for you. also, there are more options beyond what i've posted here - feel free to check out whatever you can find and post what works for you.

good luck!
kkloster21 is offline   Reply With Quote
Old 8th October 2008, 13:54   #3  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
IMHO neither threads=2 nor skiploopfilter=all works with vc1
roozhou is offline   Reply With Quote
Old 8th October 2008, 15:17   #4  |  Link
Oopho2ei
Guest
 
Posts: n/a
Please play with the 'cache' and 'demuxer' option like kkloster21 suggested. The best demuxer is supposed to be 'lavf' but you can try others as well. When the video plays fine but the audio is 'choppy' as you describe it this is probably a video<-> audio synchronization issue. Did you try to so set the frame rate with '-fps 24000/1001'? If the video plays back at a different speed than the sound then mplayer resynchronizes the sound once a certain threshold (which can also be set by some parameter) is reached. What's your cpu load?

Btw this is actually a playback and not a decryption issue.
  Reply With Quote
Old 8th October 2008, 20:13   #5  |  Link
aggiemarine07
Registered User
 
Join Date: Oct 2008
Posts: 15
Thanks for the quick response! I have not had a chance to mess with it as of late because I had a mid-term today in one of classes. I will give it a shot this afternoon with those flags and try yalls suggestions and I'll post if it works/ doesnt work. Thanks!

Sorry I figured it would either be here or in playback, i thought i might have done something wrong in the decryption, anyways, thanks for the help and I'll post later.
aggiemarine07 is offline   Reply With Quote
Old 8th October 2008, 22:22   #6  |  Link
aggiemarine07
Registered User
 
Join Date: Oct 2008
Posts: 15
ok so i tried kkloster21's original command with all the flags he put in there and it did not work it gave this output:

Playing 00011.m2ts.
Cache fill: 17.29% (1449984 bytes)
libavformat file format detected.

so i then took yalls suggetions and I tried this command (changing the demuxer):

mplayer -cache 8192 -demuxer mpegts -aid 2 -lavdopts threads=2:fast:skiploopfilter=all 00011.m2ts

and i played flawlessly (CPU was always between 45-50%) but there was no audio. Then I tried Oopho2ei's suggestion of the -fps 24000/1001 flag and it spat back this output:

Playing 00011.m2ts.
Cache fill: 17.77% (1490944 bytes)
TS file format detected.
VIDEO H264(pid=4113) NO AUDIO! NO SUBS (yet)! PROGRAM N. 1
FPS seems to be: 23.976025
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
FPS forced to be 23.976 (ftime: 0.042).
Starting playback...
VDec: vo config request - 1920 x 1080 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 1920x1080 => 1920x1080 Planar YV12
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.

Is it a problem with my codecs? Or is something wrong with my m2ts file? Thanks. Let me know if I need to post anything else. Thanks!
aggiemarine07 is offline   Reply With Quote
Old 8th October 2008, 22:31   #7  |  Link
Oopho2ei
Guest
 
Posts: n/a
Try to start at the point where the video playback was good and you only had problems with stuttering sound. Then try to add the -fps parameter and if it helps also add another parameter and so on. You can try the linux version of tsmuxer. It will give you list and description of all streams including the packet IDs which you can pass manually to mplayer with -aid (audio stream id) and -vid (video stream id).
  Reply With Quote
Old 9th October 2008, 00:41   #8  |  Link
aggiemarine07
Registered User
 
Join Date: Oct 2008
Posts: 15
well the video playback is always good when I take out the sound or when (for whatever reason) the sound just doesnt play at all (like the error stated earlier). I used the "mplayer -nosound 00011.m2ts" command it as expected it played flawlessly without the sound.

I tried your command syntax of "mplayer -fps 24000/1001 00011.m2ts" and it is had the choppy audio. I also added other flags such as "-demuxer mpegts" and the "-cache 8192." Every time I try one of these commands (which adds the audio to playback) the video gets slightly choppy. It also throws back this in the terminal:

A: 25.8 V: 24.2 A-V: 1.622 ct: 0.596 300/300 124% 5% 3.6% 40 0 40%
Too many video packets in the buffer: (54 in 8499431 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.

Again thanks for the help.
aggiemarine07 is offline   Reply With Quote
Old 9th October 2008, 02:34   #9  |  Link
Oopho2ei
Guest
 
Posts: n/a
From the output of mplayer i can see that it plays back a H.264 (and not VC-1) compressed video stream.
Code:
Too many video packets in the buffer
I believe it means mplayer is reading the data at the expected rate from the disc but the processing path from the buffer to your monitor (video decompression, scaling, etc...) is too slow.

My theory is with your current configuration your system can't deliver the high framerate at this resolution and hence the synchronization problems when you activate the audio playback which is consequently slightly faster than the video. If you have a multiprocessor system you should try "-lavdopts threads=2" like kkloster21 suggested. For H.264 playback at this resolution and data rate you need a very fast system.

You could also try a different audio output driver. Type 'mplayer -ao help' to get a list. Mplayer blames buggy output driver for most of these issues so you should try that as well.

Last edited by Oopho2ei; 9th October 2008 at 02:36.
  Reply With Quote
Old 9th October 2008, 16:52   #10  |  Link
aggiemarine07
Registered User
 
Join Date: Oct 2008
Posts: 15
I dont know how my system is too slow to play the file I have a 3.0ghz proc, 512mb Nvidia 7900BFG, 4 gig of RAM and 3 SATA II HDDs.

I triied to play the video and the audio in seperate terminals (because the problem always seems to happen when he audio and the video are combined). So I took two terminals and in one I put "mplayer -nosound 00011.m2ts" and in the other I put "mplayer -novideo 00011.m2ts" and the vdeo and the audio played great "(although the audio was about 5 seconds off of the video. So my question is, why would there be so many problems for me when the two are combined? In video terminal, it said it was using 50% of CPU and in the audio terminal it said it was using 1.5% of CPU.

I also tried your suggestions in your post above and it still had the same problem, however it did get about5 secs farther playing the video before the video started to become choppy. At about that same time it started to spit back alot of error messages in the terminal (the same error messages that I posted in my last statement). Sorry that this isnt getting anywhere quick. I think Im going to put an XP partition on my system and see if I can playback this stuff on there. Thanks.
aggiemarine07 is offline   Reply With Quote
Old 9th October 2008, 17:28   #11  |  Link
Oopho2ei
Guest
 
Posts: n/a
Quote:
Originally Posted by aggiemarine07 View Post
So I took two terminals and in one I put "mplayer -nosound 00011.m2ts" and in the other I put "mplayer -novideo 00011.m2ts" and the vdeo and the audio played great "(although the audio was about 5 seconds off of the video. So my question is, why would there be so many problems for me when the two are combined?
This is because most people like to have video and audio synchronized which cannot be achieved if the video output can't keep up with the speed of the audio. If you can remember the sound from >5s ago and resynchronize video and audio in your brain then there really is no problem and you could switch off the synchronization mplayer does with some parameter (i don't know which one).

Quote:
Originally Posted by aggiemarine07 View Post
In video terminal, it said it was using 50% of CPU and in the audio terminal it said it was using 1.5% of CPU.
My guess is this is dual core system and you use only one core hence 50% load.

Did you try a different audio output driver? You can try the "-autosync" switch too.
  Reply With Quote
Old 10th October 2008, 04:50   #12  |  Link
aggiemarine07
Registered User
 
Join Date: Oct 2008
Posts: 15
Well I installed a small partition of XP on my HDD and I can not even playback bluray on it (well I CAN but its choppy) so I am upgrading my proc to a intel 3.6. Single core bc thats all my motherboard can do and its all I can afford right now; the one I have now is a single intel proc 3.0. I should be getting it within the next 3 days.

In the meantime, however I will try your suggestion of the autosync and post it tomorrow sometime

Thanks for all the help youve given me, I appreciate it.
aggiemarine07 is offline   Reply With Quote
Old 10th October 2008, 19:21   #13  |  Link
aggiemarine07
Registered User
 
Join Date: Oct 2008
Posts: 15
Well after tying the autosync option and all of the other "-ao" options (most of which didnt even work) I will have to wait until I get my new proc within the next few days (hpefully by Monday).

It seems as if my system is just on the threshold of being to play this stuff and if I had a little more juice, processor-wise then everything would be great. I'll post back here after I get the new processor in my system (so maybe Monday or Tuesday). If anyone has any other suggestion then i'll try them out in the meantime.
aggiemarine07 is offline   Reply With Quote
Old 10th October 2008, 20:44   #14  |  Link
kkloster21
Registered User
 
Join Date: Jun 2008
Posts: 117
@aggiemarine:

are you running mplayer svn? also, what linux distro are you running? you might try removing mplayer svn and installing mplayer 1.0rc2, the latest stable release. I was using 1.0rc2 and was able to watch blu-rays okay. the only problem is that the sound was stereo copied to 5.1 channels rather than actual 5.1 sound. i switched to mplayer svn and the sound is now actual 5.1 sound but i am having a problem very similar to yours: if i stream multiple files to mplayer, the first file will play smoothly, but the following files will get choppy, as you describe. i am also getting similar errors at the command line to what you are posting.

I am thinking that this is a sound driver issue because, as Oopho2ei said, mplayer blames most issues like this on bad sound output drivers. also, if i specify the -vo null flag, i get the same choppy audio. in other words, i'm not sure that a faster processor will help you (but it may). a cheaper option may be to get a new sound card (though i'm not sure this will help you either). i'll be trying to solve the same problem as you over the next few weeks so be sure to post whatever progress you make. i'll do the same. good luck.
kkloster21 is offline   Reply With Quote
Old 11th October 2008, 18:23   #15  |  Link
fbgd
Registered User
 
Join Date: Mar 2008
Posts: 29
Quote:
Originally Posted by kkloster21 View Post
@aggiemarine:

are you running mplayer svn? also, what linux distro are you running? you might try removing mplayer svn and installing mplayer 1.0rc2, the latest stable release. I was using 1.0rc2 and was able to watch blu-rays okay. the only problem is that the sound was stereo copied to 5.1 channels rather than actual 5.1 sound. i switched to mplayer svn and the sound is now actual 5.1 sound but i am having a problem very similar to yours: if i stream multiple files to mplayer, the first file will play smoothly, but the following files will get choppy, as you describe. i am also getting similar errors at the command line to what you are posting.

I am thinking that this is a sound driver issue because, as Oopho2ei said, mplayer blames most issues like this on bad sound output drivers. also, if i specify the -vo null flag, i get the same choppy audio. in other words, i'm not sure that a faster processor will help you (but it may). a cheaper option may be to get a new sound card (though i'm not sure this will help you either). i'll be trying to solve the same problem as you over the next few weeks so be sure to post whatever progress you make. i'll do the same. good luck.
I think that even if you use -vo null the video will still be decoded. It just won't be displayed. You can do something like -vo null -vc dummy to not decode the video.
fbgd is offline   Reply With Quote
Old 14th October 2008, 00:00   #16  |  Link
aggiemarine07
Registered User
 
Join Date: Oct 2008
Posts: 15
Ok so I got the new proc and it helps it a little bit. The audio is less choppy and the "too many video packets in buffer" error doesnt come back as much. Ive tried using a different "-ao" and that did not help either. I have no idea why I am having issues with playing m2ts files from my HDD. My system is fast enough isnt it? (3.6ghz single core, 10000rpm HDD, 4 gb of RAM, Nvidia with 512mb)

to kkloser - I downloaded the svn version of of the internet (i didnt find one on the website for linux, just windows) i am going to try the svn snapshot tonight on the website just to see if that will fix the problem. But that did nothing to improve the situation. I will try this and hopefully post tonight.
aggiemarine07 is offline   Reply With Quote
Old 14th October 2008, 02:34   #17  |  Link
Oopho2ei
Guest
 
Posts: n/a
Quote:
Originally Posted by aggiemarine07 View Post
I have no idea why I am having issues with playing m2ts files from my HDD. My system is fast enough isnt it? (3.6ghz single core, 10000rpm HDD, 4 gb of RAM, Nvidia with 512mb)
Your system is too slow to playback the movie with the software configuration you use. You can try to offload some of the work to the gpu (Nvidia PureVideo HD or ATI UVD) which is afaik currently not supported in linux. The clock frequency of the cpu not that important. What matters is how many instructions can be executed in a given time and that depends on many things like the processor architecture (amd uses a different architecture than intel), the memory hierarchy (cache performance and size, memory access time/throughput,...) and others.
I am not sure if your movie can be played back on any currently available single processor (single core) system without and tricks like offloading some of the work to the gpu or reducing output quality.
  Reply With Quote
Old 14th October 2008, 15:36   #18  |  Link
kkloster21
Registered User
 
Join Date: Jun 2008
Posts: 117
UVD may not be that far away for linux...

http://www.phoronix.com/scan.php?pag...item&px=Njc1Ng

we'll see if we can actually get a piece of software that can use it.
kkloster21 is offline   Reply With Quote
Old 15th October 2008, 23:19   #19  |  Link
aggiemarine07
Registered User
 
Join Date: Oct 2008
Posts: 15
So I made a small partition of WinXp on my HDD and I was able to get bluray to playback (with a minor audio glitch every 5 to 10 seconds ) but the video plays back perfectly. I used the gui version of mplayer for windows and it played fairly well (no audio jerks would be fantastic but hey I'll take this for now). So it actually might be an audio driver think from ASUS (its a P5gd2 deluxe edition). Anyone know of any audio issues with it and the HD 7.1 audio thats onboard with it?
aggiemarine07 is offline   Reply With Quote
Old 16th October 2008, 20:59   #20  |  Link
kkloster21
Registered User
 
Join Date: Jun 2008
Posts: 117
i haven't used mplayer in windows and i haven't used the gui on any platform but is there a way to enable caching the movie (the same way you do with $ mplayer -cache 8192 - )? this might help.
kkloster21 is offline   Reply With Quote
Reply

Tags
bluray, ffvc1, h264, mplayer, vlc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:32.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.