huceke / omxplayer

omxplayer
GNU General Public License v2.0
520 stars 502 forks source link

Audio and Video out of sync for dvb-t records #92

Open CFoltin opened 11 years ago

CFoltin commented 11 years ago

Dear omxplayer team,

all my dvb-t recordings have a time shift between audio and video of about one second. This makes omxplayer unuseable as a media player on the raspberry pi. Here some infos about the media stream in question and the pi's debian version:

mediainfo tagesschau.mpg

General Complete name : tagesschau.mpg Format : MPEG-PS File size : 436 MiB Duration : 16mn 0s Overall bit rate : 3 812 Kbps

Video ID : 224 (0xE0) Format : MPEG Video Format version : Version 2 Format profile : Main@Main Format settings, BVOP : Yes Format settings, Matrix : Default Format settings, GOP : M=3, N=12 Duration : 16mn 0s Bit rate mode : Variable Bit rate : 3 545 Kbps Nominal bit rate : 15.0 Mbps Width : 720 pixels Height : 576 pixels Display aspect ratio : 16:9 Frame rate : 25.000 fps Standard : PAL Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan order : Top Field First Compression mode : Lossy Bits/(Pixel*Frame) : 0.342 Stream size : 406 MiB (93%)

Audio ID : 192 (0xC0) Format : MPEG Audio Format version : Version 1 Format profile : Layer 2 Duration : 15mn 59s Bit rate mode : Constant Bit rate : 192 Kbps Channel(s) : 2 channels Sampling rate : 48.0 KHz Compression mode : Lossy Stream size : 22.0 MiB (5%)

and

pi@raspberrypi ~ $ uname -a Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux

Can you please have a look into this? Both vlc and avplayer play the files without shift between audio and video.

By the way: The option to navigate in mpeg-files is not present and would be very helpful...

Best regards,

Chris

CFoltin commented 11 years ago

Hi,

some more infos (as I haven't found a way to get the version of omxplayer, I post the hash value):

pi@raspberrypi ~ $ md5sum /usr/bin/omxplayer.bin c4f6b7859cc0d2ddbbf2b7c1a4a7b700 /usr/bin/omxplayer.bin

pi@raspberrypi ~ $ omxplayer http://brahms/photo/tag/tagesschau.mpg -i file : http://brahms/photo/tag/tagesschau.mpg result 0 format mpeg audio streams 1 video streams 1 chapters 0 subtitles 0

have a nice day ;)

anthonywebb commented 11 years ago

My audio/video is out of sync as well, running the latest raspbian with the latest OMXPlayer, note the video in question is 59.94 FPS, all the 29.9 FPS video files are fine. What is odd is if I play the same movie with XBMC then the video will play fine, they must have done some tweaking, any ideas?:

pi@raspberrypi ~ $ omxplayer -o hdmi http://192.168.1.129:3000/AUSTRALIA.m4v file : http://192.168.1.129:3000/AUSTRALIA.m4v result 0 format mov,mp4,m4a,3gp,3g2,mj2 audio streams 2 video streams 1 chapters 0 subtitles 1 length 9929 Aspect : num 13 den 11 aspect 2.312399 pixel aspect 1.181893 Video codec omx-h264 width 720 height 368 profile 100 fps 59.940060 Audio codec aac channels 2 samplerate 48000 bitspersample 16 Subtitle count: 1, state: off, index: 1, delay: 0

anthonywebb commented 11 years ago

More info: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=38&t=36966&sid=fb76b77083a9077e87981dcb2706e9c0

popcornmix commented 11 years ago

Do all the problematic files play correctly in xbmc?

xbmc has had some work done on timestamps, and it might be worth trying to merge them across to omxplayer.

anthonywebb commented 11 years ago

Yes, all files play perfect in xbmc (RASPBMC build specifically).

Whatever they do seems to work for all my h264 files across the board.

anthonywebb commented 11 years ago

Not sure if any of these fixes to RASPBMC are the reason, their their xmbc can play about anything you throw at it flawlessly: http://www.raspbmc.com/2013/02/raspbmc-improvements-inbound/

Is it possible to borrow some of the optimizations, how would a guy do that?

popcornmix commented 11 years ago

The code is not close enough to make the patching trivial. But I'll have a go when I get a chance.

asclepius commented 11 years ago

59.94 FPS mpeg2 video has issues with losing sync on my pi running OpenElec 3.0 (And prior versions as well). Quite frustrating. Corrects with skip forwards/backward usually. Videos play fine on other hardware.

popcornmix commented 11 years ago

Can you try with recent build (e.g. http://omxplayer.sconde.net/).

CFoltin commented 11 years ago

Hi, thanks for your efforts! I tried with omxplayer_0.3.0~git20130627~b853c39_armhf.deb. Some videos play correctly, but there are still videos with a notable sync problem. Please, tell me, how to provide more information (send a video directly to you or such). TIA, Chris

popcornmix commented 11 years ago

If you have a file with out of sync audio (that plays okay with other players) then post a sample somewhere (e.g. dropbox) and give me a link.

CFoltin commented 11 years ago

Where can I find your email address?

popcornmix commented 11 years ago

popcornmix at gmail dot com.

basvdheijden commented 11 years ago

http://l2cm49be8e1c73005229f513000000.6b6aab72d30b7d86.smoote2a.npostreaming.nl/d/live/npo/tvlive/ned2/ned2.isml/ned2.m3u8

If that URL does not work anymore, go to http://www.npo.nl/live and open up your console and copy the output of the following javascript statement:

npoplayer().videoFile
popcornmix commented 11 years ago

Forbidden You don't have permission to access /d/live/npo/tvlive/ned2/ned2.isml/ned2.m3u8 on this server.