2017-03-28 8 views
5

साथ 264 मैं दो एमपीईजी ts + h.264 वीडियो फ़ाइलों, जो मैं ExoPlayer साथ एक Android डिवाइस (सैमसंग टैब एक 10.1 ") पर पढ़ने के लिए प्रयास किया है:एमपीईजी टीएस ExoPlayer

SimpleExoPlayerView view = new SimpleExoPlayerView(this); 
TrackSelection.Factory videoTrackSelectionFactory = new AdaptiveVideoTrackSelection.Factory(new DefaultBandwidthMeter()); 
TrackSelector trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory); 
SimpleExoPlayer mediaPlayer = ExoPlayerFactory.newSimpleInstance(this, trackSelector, new DefaultLoadControl()); 
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(this, Util.getUserAgent(this, getString(R.string.app_name))); 
ExtractorsFactory extractorsFactory = new DefaultExtractorsFactory(); 
MediaSource source = new ExtractorMediaSource(uri, dataSourceFactory, extractorsFactory, null, null); 
view.setPlayer(mediaPlayer); 
mediaPlayer.setPlayWhenReady(true); 
mediaPlayer.prepare(source); 

पहला एक सफल होता है (छवि सही ढंग से प्रदर्शित होती है) लेकिन दूसरा व्यक्ति विफल रहता है (छवि प्रदर्शित नहीं होती है), हालांकि वे वीडियो विशेषताओं के मामले में बहुत समान हैं। मुझे समझना है कि क्यों

मैंने mediainfo निकालने के लिए उपयोग किया वीडियो एन्कोडिंग विवरण

पहला वीडियो (सफलता ful):

General 
ID          : 0 (0x0) 
Complete name       : 1080i.ts 
Format         : MPEG-TS 
File size        : 56.7 MiB 
Duration         : 47s 456ms 
Overall bit rate mode     : Constant 
Overall bit rate       : 10.0 Mbps 

Video 
ID          : 256 (0x100) 
Menu ID         : 1 (0x1) 
Format         : AVC 
Format/Info        : Advanced Video Codec 
Format profile       : [email protected] 
Format settings, CABAC     : Yes 
Format settings, ReFrames    : 2 frames 
Codec ID         : 27 
Duration         : 47s 282ms 
Bit rate         : 9 185 Kbps 
Width         : 1 920 pixels 
Height         : 1 080 pixels 
Display aspect ratio      : 16:9 
Frame rate        : 29.970 fps 
Color space        : YUV 
Chroma subsampling      : 4:2:0 
Bit depth        : 8 bits 
Scan type        : MBAFF 
Bits/(Pixel*Frame)      : 0.148 
Stream size        : 51.8 MiB (91%) 

दूसरा वीडियो (विफल):

General 
ID          : 1 (0x1) 
Complete name       : fr5.ts 
Format         : MPEG-TS 
File size        : 13.8 MiB 
Duration         : 32s 270ms 
Overall bit rate mode     : Variable 
Overall bit rate       : 3 557 Kbps 

Video 
ID          : 420 (0x1A4) 
Menu ID         : 1045 (0x415) 
Format         : AVC 
Format/Info        : Advanced Video Codec 
Format profile       : [email protected] 
Format settings, CABAC     : Yes 
Format settings, ReFrames    : 4 frames 
Codec ID         : 27 
Duration         : 31s 760ms 
Bit rate         : 3 252 Kbps 
Width         : 1 920 pixels 
Height         : 1 080 pixels 
Display aspect ratio      : 16:9 
Frame rate        : 25.000 fps 
Standard         : Component 
Color space        : YUV 
Chroma subsampling      : 4:2:0 
Bit depth        : 8 bits 
Scan type        : MBAFF 
Bits/(Pixel*Frame)      : 0.063 
Stream size        : 12.3 MiB (89%) 
Color primaries       : BT.709 
Transfer characteristics     : BT.709 
Matrix coefficients      : BT.709 
+0

2 धाराओं के बीच केवल अंतर संदर्भ संदर्भ फ्रेम की संख्या है। यह एक समस्या होने की बहुत संभावना नहीं है क्योंकि खिलाड़ियों के पास सार्वभौमिक डिकोडर होगा लेकिन फिर भी 2 संदर्भ फ्रेम के साथ कुछ अन्य अनुक्रमों को आजमाकर जांच कर सकते हैं? – prashanthns

उत्तर

1

दो फ़ाइलों वही सार्थक सिद्ध के बीच मतभेद बिट दरों रहे हैं। काम करने वाले व्यक्ति की बहुत अधिक बिट दर होती है, और यह स्थिर होती है, जबकि टूटे हुए व्यक्ति के पास उच्च रिज़ॉल्यूशन होता है, लेकिन बहुत कम और परिवर्तनीय बिट दर होती है। प्रदत्त आंकड़ों से अधिक जानने के बिना, मैं वीडियो को एन्कोड करने के लिए उपयोग किए जाने वाले टूल को दोष दूंगा। हो सकता है कि कॉन्फ़िगरेशन के बारे में कुछ एन्कोडर काले फ्रेम को आउटपुट करने का कारण बनता है। क्या आपने एक ही डिवाइस पर एक ही डिवाइस पर कोशिश की है? क्या आप थोड़ा अलग सेटिंग्स के साथ फिर से एन्कोड कर सकते हैं?

+0

मैंने कई अलग-अलग उपकरणों पर कोशिश की और हमेशा एक ही परिणाम प्राप्त करें। पहली फ़ाइल वेब पर मिली एक नमूना फ़ाइल है। दूसरा आईपीटीवी स्ट्रीम से आता है (जिसके लिए मैं कुछ भी कॉन्फ़िगर नहीं कर सकता), और मेरा अंतिम लक्ष्य उस दूसरी स्ट्रीम को पढ़ने में सक्षम होना है। – fiddler

+0

क्या आप लॉग में कोई त्रुटि देख रहे हैं जो इंगित करेगा कि यह किस प्रकार की त्रुटि है? यदि आप एक ऐसी स्ट्रीम खेल रहे हैं जिसका आपके पास स्वामित्व नहीं है, तो यह डीआरएम संरक्षित हो सकता है। – Jschools

संबंधित मुद्दे