VLC Player RTSP Caton solve

Prior wrote an article about compiling on Linux platform android platform VLC player source code, vlc The player is very good and is open source, its core is an open source video codec library ffmpeg. And this player also supports RTSP protocol, this is mainly used open source live555 to achieve, after live555 this library also requires careful study.

A: PC end (Windows platform) VLC player RTSP video delay resolution,

a few days before a long delay when using VLC player RTSP streaming media on the PC platform, there is a delay of about 1s, the effect is not very good, then check the information, It found that the delay time can be modified.

Found Tools -> Preferences, then select the lower left corner of the parameter setting "All", on the left select "Input codec" -> "Network cache" option can be modified according to specific needs, specific see below this value, but not too small, otherwise cache is too small, the process of playing a video will be very slow

if the network environment is good, very good effect within 300ms, better real-time.

Two: PC terminal (Linux platform) VLC player RTSP video delay resolution,

here my test platform is ubuntu, vlc on the linux platform can be run in a command line, and the command line can take parameters, we only need to parameter which specifies the delay time can be, the following is a specific form of the command line, we may need to be adjusted according to each

VLC RTSP: //192.168.1.1: 8556/300 = test.avi --newwork-Caching

RTSP address to according to their own needs to play video address changes, network latency can also be modified according to the needs, the smaller the value, the better the real-time, of course, too small to play will be very slow, or the value of the failure, the general recommendations 100-300 Room

III. Android platform VLC player RTSP video delay resolution

First VLC player on the Android platform like windows UI platform provides a set delay time in this one feature, the second is not on the platform can be run in a command line Linux, we also can not set parameters ways to modify this delay time, how to do it, only the last one way, modify the source code, will delay the time to write died in the source code, set the parameters under the linux platform with the previous experience, you can source inside through grep tool to find the "network-caching", we found many files contain this value, the following is the result of the search

VLC / src / libvlc-module.c: add_integer ( "network-caching", CLOCK_FREQ / 1000,
 
VLC / NEWS: - - Caching-Caching specifies for Network Resources Network,

VLC / modules / GUI / MacOSX / simple_prefs.m: TestCaC ( "Network-Caching", 10/3);

VLC / modules / GUI / MacOSX / simple_prefs.m: CaC2 ( "Network -caching ", 10/3);

VLC / modules / GUI / Qt4 / Components / open_panels.cpp: EMIT methodChanged (qfu (" Network-Caching "));

VLC / modules / GUI / Qt4 / Components / simple_preferences.cpp: TestCaC ( "network-cachi ng ", 10/3);

vlc/modules/gui/qt4/components/simple_preferences.cpp: CaC( "network-caching", 10/3 );

vlc/modules/access/file.c: *pi_64 = var_InheritInteger (p_access, "network-caching");

vlc/modules/access/rtp/rtp.c: *v = INT64_C(1000) * var_InheritInteger (demux, "network-caching");

vlc/modules/access/ftp.c: * var_InheritInteger( p_access, "network-caching" );

vlc/modules/access/live555.cpp: * var_InheritInteger( p_demux, "network-caching" );

vlc/modules/access/http.c: * var_InheritInteger( p_access, "network-caching" );

vlc/modules/access/sftp.c: * var_InheritInteger( p_access, "network-caching" );

vlc/modules/access/udp.c: * var_InheritInteger(p_access, "network-caching");

vlc/modules/access/smb.c: * var_InheritInteger( p_access, "network-caching" );

VLC / modules / Access / TCP.c: * var_InheritInteger (p_access, "Network-Caching");

VLC / modules / Access / RTSP / access.c: * var_InheritInteger (p_access, "Network-Caching");

VLC / modules / Access / MMS / mmsh.c: * var_InheritInteger (p_access, "Network-Caching");

VLC / modules / Access / MMS / mmstu.c: * var_InheritInteger (p_access, "Network-Caching");

VLC / modules / Access / vnc.c: * var_InheritInteger (p_demux, "Network-Caching");

VLC-Android / JNI / libvlcjni.c: libvlc_media_add_option (p_md, ": = Caching Network-1500");
the code number of the files were analyzed, finally found the target in vlc / src / libvlc-module.c this file, then the file line 1832 to modify, as shown below, the CLOCK_FREQ / 1000 to CLOCK_FREQ / 3000, here can be modified according to their needs, the denominator large, the smaller this value is, the better real-time, of course, as with the previously mentioned, not too small

 

1832 // add_integer ( "network-caching ",CLOCK_FREQ / 1000,
 
// NETWORK_CACHING_TEXT 1833, NETWORK_CACHING_LONGTEXT, to true)

1834 add_integer ( "Network-Caching", CLOCK_FREQ / 3000,

1835 NETWORK_CACHING_TEXT, NETWORK_CACHING_LONGTEXT, to true)
and finally compile and run discovery delay time in about 200ms, than before modifying the real time has improved significantly, Real-time is very good, I hope this article provides some help to give relevant information needed friends.

Guess you like

Origin www.cnblogs.com/classics/p/10945383.html