Page 1 of 1
Streaks and Trails when playing H.264
Posted: 30 Aug 2012 10:20
by robinwei1979
I compiled vlc for android on my ubuntu laptop. Streaks and trails appeared when playing ts(H.264+AAC) files. I noticed fps was set to 25 in modules/demux/mpeg/h264.c. Does it have anything with my problem? It also occurred on vlc for linux.
Re: Streaks and Trails when playing H.264
Posted: 30 Aug 2012 12:54
by edwardw
What is the resolution of your media file, and the specifications of your phone's processor?
Re: Streaks and Trails when playing H.264
Posted: 31 Aug 2012 18:01
by robinwei1979
The m3u8 file is a little bit different. The segment information is like the following---
***********************************************************
#EXTINF:10,
20111109T084638-01-26.ts?zbytes=0-333511
#EXTINF:10,
20111109T084638-01-26.ts?zbytes=333512-667023
***********************************************************
which means segment size does not equal the stream size.
I modified part of of hls_Download() function in modules/stream_filter/httplive.c. It solved part of the problem. Data of every segment can be read correctly. But some error occurred in demux/ts.c. I got an error: "lost synchro". It appeared when starting to play next segment. How could I fix this?
Thanks in advance.
What is the resolution of your media file, and the specifications of your phone's processor?
Re: Streaks and Trails when playing H.264
Posted: 02 Sep 2012 04:08
by robinwei1979
The problem is stream_read() didn't work as I expected. Only the first segment was read successfully. Why stream_t with psz_url in http://*.*.*/12321.ts?zbytes=0-12345 could not work with stream_read() consistently?
Re: Streaks and Trails when playing H.264
Posted: 04 Sep 2012 02:37
by edwardw
Did you try this on the desktop VLC?
Re: Streaks and Trails when playing H.264
Posted: 04 Sep 2012 12:23
by robinwei1979
Yes. It's the same. I fixed it by rewriting hls_download function. Instead of reading a whole ts file into a segment, I first stream_seek to the starting point and then stream_read the data I needed. Now there's a new problem. BandwidthAdaptation made downloading switch between different bit-rates. Actually even for the highest bit-rate, downloading can be finished in due time. Since switching between different bit-rates causes video output to pause, the playing is staggering. So, 01.m3u8(or 02, 03) could each be played fluently, but index.m3u8 couldn't. Is there any bug in BandwidthAdaptation() ?
Re: Streaks and Trails when playing H.264
Posted: 04 Sep 2012 12:44
by edwardw
This isn't Android-specific then, you should ask in the General VLC troubleshooting or on the mailing list for more help.