wseemann / FFmpegMediaPlayer

FFmpegMediaPlayer can be used to control playback of audio/video files and streams.
675 stars 200 forks source link

Seeking on ogg vorbis file doesn't work #12

Open asdil12 opened 10 years ago

asdil12 commented 10 years ago

When I seek on an ogg vorbis audio file (about 600MB), nothing happens. The file continues to play at the previous position.

File details:

% ogginfo <file>
New logical stream (#1, serial: 6aa921f6): type vorbis
Vorbis headers parsed for stream 1, information follows...
Version: 0
Vendor: Xiph.Org libVorbis I 20120203 (Omnipresent)
Channels: 2
Rate: 44100

Nominal bitrate: 112,000000 kb/s
Upper bitrate not set
Lower bitrate not set
...
Vorbis stream 1:
        Total data length: 683639495 bytes
        Playback length: 1188m:50.488s
        Average bitrate: 76,672907 kb/s
Logical stream 1 ended

The seeking callback returns, and the log reports success, but the seeking has no effect.

08-01 14:51:20.637  14604-14666/my.app V/FFmpegMediaPlayer﹕ isPlaying: 1                                                                                                                    
08-01 14:51:20.647  14604-14666/my.app V/FFmpegMediaPlayer-JNI﹕ isPlaying: 1                                                                                                                
08-01 14:51:20.647  14604-14666/my.app V/FFmpegMediaPlayer-JNI﹕ getCurrentPosition: 3554 (msec)                                                                                             
...                                                                                                                                                                                          08-01 14:51:20.848  14604-14668/my.app V/FFmpegMediaPlayer﹕ MediaPlayer::writeAudio                                                                                                         
08-01 14:51:21.188  14604-14604/my.app V/FFmpegMediaPlayer-JNI﹕ pause                                                                                                                       
08-01 14:51:21.188  14604-14668/my.app V/FFmpegMediaPlayer﹕ MediaPlayer::writeAudio                                                                                                         
08-01 14:51:21.188  14604-14604/my.app V/FFmpegMediaPlayer﹕ pause                                                                                                                           08-01 14:51:21.198  14604-14668/my.app V/FFmpegMediaPlayer﹕ MediaPlayer::writeAudio                                                                                                         
08-01 14:51:21.198  14604-14604/my.app V/FFmpegMediaPlayer-JNI﹕ seekTo: 10800000(msec)                                                                                                      08-01 14:51:21.198  14604-14604/my.app V/FFmpegMediaPlayer﹕ seekTo 10800000                                                                                                                 
08-01 14:51:21.198  14604-14604/my.app V/FFmpegMediaPlayer﹕ getDuration                                                                                                                     
08-01 14:51:21.198  14604-14668/my.app V/FFmpegMediaPlayer﹕ message received msg=4, ext1=0, ext2=0                                                                                          
08-01 14:51:21.198  14604-14668/my.app V/FFmpegMediaPlayer﹕ Received seek complete                                                                                                          
08-01 14:51:21.198  14604-14668/my.app V/FFmpegMediaPlayer﹕ All seeks complete - return to regularly scheduled program                                                                      08-01 14:51:21.198  14604-14668/my.app V/FFmpegMediaPlayer﹕ callback application                                                                                                            
08-01 14:51:21.208  14604-14668/my.app V/FFmpegMediaPlayer-JNI﹕ notify: 4                                                                                                                   08-01 14:51:21.208  14604-14668/my.app V/FFmpegMediaPlayer﹕ back from callback                                                                                                              
08-01 14:51:21.208  14604-14604/my.app E/Player﹕ seek complete                                                                                                                              08-01 14:51:21.218  14604-14604/my.app V/FFmpegMediaPlayer-JNI﹕ start                                                                                                                       
08-01 14:51:21.218  14604-14604/my.app V/FFmpegMediaPlayer﹕ start                                                                                                                           
08-01 14:51:21.218  14604-14604/my.app V/FFmpegMediaPlayer﹕ MediaPlayer::setLooping                                                                                                         
08-01 14:51:21.218  14604-14604/my.app V/FFmpegMediaPlayer﹕ MediaPlayer::setVolume(1.000000, 1.000000)                                                                                      
08-01 14:51:21.218  14604-14604/my.app V/FFmpegMediaPlayer﹕ MediaPlayer::setAuxEffectSendLevel(0.000000)                                                                                    
08-01 14:51:21.228  14604-14668/my.app V/FFmpegMediaPlayer﹕ MediaPlayer::writeAudio                                                                                                         
...                                                                                                                                                                                          
08-01 14:51:21.628  14604-14666/my.app V/FFmpegMediaPlayer﹕ isPlaying: 1                                                                                                                    
08-01 14:51:21.628  14604-14666/my.app V/FFmpegMediaPlayer-JNI﹕ isPlaying: 1                                                                                                                
08-01 14:51:21.628  14604-14666/my.app V/FFmpegMediaPlayer-JNI﹕ getCurrentPosition: 4979 (msec)
wseemann commented 10 years ago

Can you send me a link to the file so I can test?

asdil12 commented 10 years ago

[Sent the file url via email]

asdil12 commented 10 years ago

Btw: I didn't stream the file via http but played it from sdcard.

wseemann commented 10 years ago

Sorry, I'm not avoiding you, just haven't had a chance to look into this yet.