FFmpeg Sample Program Collection-git bulk Fetch script

Source: Internet
Author: User

A series of sample programs on FFmpeg were made, which consisted of the FFmpeg sample program collection, which included the following items:
Simplest ffmpeg player: The simplest ffmpeg-based video player
Simplest ffmpeg audio player: The simplest ffmpeg-based sound player
Simplest ffmpeg pic encoder: The simplest ffmpeg-based image encoder
Simplest ffmpeg Video encoder: The simplest ffmpeg-based codec
Simplest FFmpeg Audio encoder: The simplest ffmpeg based codec
Simplest ffmpeg streamer: The simplest ffmpeg-based ejector (push rtmp)
Simplest FFmpeg mem Handler: The simplest example of memory read and write based on FFmpeg
Simplest ffmpeg device: The simplest ffmpeg-based Avdevice example
Simplest ffmpeg format: The simplest example of a ffmpeg-based encapsulation format
Simplest FFmpeg video filter: The simplest ffmpeg-based Avfilter example (watermark overlay)
Simplest ffmpeg Swscale: The simplest example of ffmpeg-based Libswscale
To facilitate future code upgrades, the code for this project is uniformly uploaded to the git code hosting platform (Sourceforge,github, open source China), and several simple scripts have been made to get the code, as listed below:
Clone (simplest_ffmpeg_demos_git_clone_all.sh): Copy the code from the remote to the native (similar to the download).
Update (simplest_ffmpeg_demos_git_pull_all.sh): Update code from remote to native (similar to upgrade).
Reset (simplest_ffmpeg_demos_git_reset_all.sh): Fallback the native code to the previous version (similar to restore).
Archive (simplest_ffmpeg_demos_git_archive_all.sh): Archive The Native project code (for example, package as Zip).

Of these scripts:

"Github" Https://github.com/leixiaohua1020/leixiaohua1020.github.io/tree/master/batch


Cloning
The clone script can "download from one click" (Clone command) source code to this machine, and set up 3 remote warehouses of the local repository (remotes): Sourceforge,github and open source China.
The script has a originstr parameter that needs to be set. This parameter determines where to clone the source code, and has been tested to find that open source China is significantly faster than SourceForge and GitHub.
The simplest_ffmpeg_demos_git_clone_all.sh content is shown below.
echo "=============================================" echo "simplest ffmpeg demos list----git clone all" echo "Lei Xiaohua "Echo" Communication University of China/digital TV Technology "echo" [email protected] "echo" http://blog.csdn.net /leixiaohua1020 "echo" ============================================= "originstr=" GitHub "#3 Kinds of Origins: Githubstr= "GitHub" sourceforgestr= "SourceForge" oscstr= "OSC" #Git clone#github#http://leixiaohua1020.github.com/if ["$originstr" = "$githubstr"]thengit clone https://github.com/leixiaohua1020/simplest_ffmpeg_player.git Simplest_ Ffmpeg_playergit Clone Https://github.com/leixiaohua1020/simplest_ffmpeg_audio_player.git Simplest_ffmpeg_audio_ Playergit Clone Https://github.com/leixiaohua1020/simplest_ffmpeg_picture_encoder.git Simplest_ffmpeg_picture_ Encodergit Clone Https://github.com/leixiaohua1020/simplest_ffmpeg_video_encoder.git Simplest_ffmpeg_video_ Encodergit Clone Https://github.com/leixiaohua1020/simplest_ffmpeg_audio_encoder.git SIMPLEST_FFMPeg_audio_encodergit Clone Https://github.com/leixiaohua1020/simplest_ffmpeg_streamer.git Simplest_ffmpeg_ Streamergit Clone Https://github.com/leixiaohua1020/simplest_ffmpeg_mem_handler.git Simplest_ffmpeg_mem_ Handlergit clone https://github.com/leixiaohua1020/simplest_ffmpeg_device.git Simplest_ffmpeg_devicegit clone HTTPS ://github.com/leixiaohua1020/simplest_ffmpeg_format.git simplest_ffmpeg_formatgit Clone https://github.com/ Leixiaohua1020/simplest_ffmpeg_video_filter.git Simplest_ffmpeg_video_filtergit Clone https://github.com/ Leixiaohua1020/simplest_ffmpeg_swscale.git simplest_ffmpeg_swscale#sourceforge#https://sourceforge.net/u/ Leixiaohua1020/wiki/elif ["$originstr" = "$sourceforgestr"]thengit clone git://git.code.sf.net/p/ Simplestffmpegplayer/code Simplest_ffmpeg_playergit Clone Git://git.code.sf.net/p/simplestffmpegaudioplayer/code Simplest_ffmpeg_audio_playergit Clone Git://git.code.sf.net/p/simplestffmpegpictureencoder/code Simplest_ffmpeg_ Picture_encodergit Clone Git://git. Code.sf.net/p/simplestffmpegvideoencoder/code Simplest_ffmpeg_video_encodergit Clone git://git.code.sf.net/p/ Simplestffmpegaudioencoder/code Simplest_ffmpeg_audio_encodergit Clone git://git.code.sf.net/p/ Simplestffmpegstreamer/code Simplest_ffmpeg_streamergit Clone git://git.code.sf.net/p/simplestffmpegmemhandler/ Code Simplest_ffmpeg_mem_handlergit clone Git://git.code.sf.net/p/simplestffmpegdevice/code Simplest_ffmpeg_ Devicegit clone Git://git.code.sf.net/p/simplestffmpegformat/code Simplest_ffmpeg_formatgit clone git:// Git.code.sf.net/p/simplestffmpegvideofilter/code Simplest_ffmpeg_video_filtergit Clone git://git.code.sf.net/p/ Simplestffmpegswscale/code Simplest_ffmpeg_swscale#osc#http://git.oschina.net/leixiaohua1020elsegit Clone https:/ /git.oschina.net/leixiaohua1020/simplest_ffmpeg_player.git Simplest_ffmpeg_playergit Clone https:// Git.oschina.net/leixiaohua1020/simplest_ffmpeg_audio_player.git Simplest_ffmpeg_audio_playergit Clone https:// Git.oschina.net/leixiaohua1020/simplest_ffmpeg_picture_encoder.git Simplest_ffmpeg_picture_encodergit Clone https://git.oschina.net/leixiaohua1020/ Simplest_ffmpeg_video_encoder.git Simplest_ffmpeg_video_encodergit Clone https://git.oschina.net/leixiaohua1020/ Simplest_ffmpeg_audio_encoder.git Simplest_ffmpeg_audio_encodergit Clone https://git.oschina.net/leixiaohua1020/ Simplest_ffmpeg_streamer.git Simplest_ffmpeg_streamergit Clone Https://git.oschina.net/leixiaohua1020/simplest_ Ffmpeg_mem_handler.git Simplest_ffmpeg_mem_handlergit Clone Https://git.oschina.net/leixiaohua1020/simplest_ Ffmpeg_device.git Simplest_ffmpeg_devicegit Clone Https://git.oschina.net/leixiaohua1020/simplest_ffmpeg_ Format.git Simplest_ffmpeg_formatgit Clone Https://git.oschina.net/leixiaohua1020/simplest_ffmpeg_video_ Filter.git Simplest_ffmpeg_video_filtergit Clone Https://git.oschina.net/leixiaohua1020/simplest_ffmpeg_ Swscale.git Simplest_ffmpeg_swscalefi



Update
The update script can update the source code of the local library to the latest version. As the FFmpeg API changes and bug fixes in some programs, the project's source code needs to be tweaked with the times. You can use the pull command to "upgrade" the source code of the local library to the latest version.
The simplest_ffmpeg_demos_git_pull_all.sh content is shown below.
echo "=============================================" echo "simplest ffmpeg demos list----git pull all" echo "Lei Xiaohua" echo "Communication University of China/digital TV Technology" echo "[email protected]" echo "Http://blog.csdn.net/leixia Ohua1020 "echo" ============================================= "#remotestr =" GitHub "remotestr=" OSC master "#Git PULLCD Simplest_ffmpeg_playergit Pull $remotestrcd. CD Simplest_ffmpeg_audio_playergit Pull $REMOTESTRCD: CD Simplest_ffmpeg_picture_encodergit Pull $REMOTESTRCD: CD Simplest_ffmpeg_video_encodergit Pull $REMOTESTRCD: CD Simplest_ffmpeg_audio_encodergit Pull $REMOTESTRCD: CD Simplest_ffmpeg_streamergit Pull $REMOTESTRCD: CD Simplest_ffmpeg_mem_handlergit Pull $REMOTESTRCD: CD Simplest_ffmpeg_devicegit Pull $REMOTESTRCD: CD Simplest_ffmpeg_formatgit Pull $REMOTESTRCD: CD Simplest_ffmpeg_video_filtergit Pull $REMOTESTRCD: CD Simplest_ffmpeg_swscalegit Pull $REMOTESTRCD:



Reset
The reset script is used to fallback the source code back to the previous version. The Reset command (reset) is used in two situations:
One situation is to change the code when changed to suddenly found that the code compiled, but it is difficult to revert to the original code can be compiled, this time you can use the Reset command;
Another scenario is when you change the code, and then use the Update command (pull) to prompt for an error, and then use the Reset command before using the Update command.
The simplest_ffmpeg_demos_git_reset_all.sh content is shown below.
echo "=============================================" echo "simplest ffmpeg demos list----git reset All" echo "Lei Xiaohua "Echo" Communication University of China/digital TV Technology "echo" [email protected] "echo" Http://blog.csdn.net/leixi Aohua1020 "echo" ============================================= "#Git pullcd simplest_ffmpeg_playergit reset--HARDCD. CD simplest_ffmpeg_audio_playergit Reset--HARDCD. CD simplest_ffmpeg_picture_encodergit Reset--HARDCD. CD simplest_ffmpeg_video_encodergit Reset--HARDCD. CD simplest_ffmpeg_audio_encodergit Reset--HARDCD. CD simplest_ffmpeg_streamergit Reset--HARDCD. CD simplest_ffmpeg_mem_handlergit Reset--HARDCD. CD simplest_ffmpeg_devicegit Reset--HARDCD. CD simplest_ffmpeg_formatgit Reset--HARDCD. CD simplest_ffmpeg_video_filtergit Reset--HARDCD. CD simplest_ffmpeg_swscalegit Reset--HARDCD.



Archive
The archive script is used to package the local code base as a compressed package (*.zip,*.tar.gz). I personally feel that the biggest difference between the Git archive and the direct compression source folder is that the Git archive uses the ". Gitignore" file, ignoring some irrelevant files.
After the script runs, a folder named "Simplest_ffmpeg_demos_list_{Date}" is generated, and the archived file is saved in, and the file is named "simplest_ffmpeg_player_{Date}". Zip ".
The simplest_ffmpeg_demos_git_archive_all.sh content is shown below.
echo "=============================================" echo "simplest ffmpeg demos list----git archive all" echo "Lei Xiaoh UA "echo" Communication University of China/digital TV Technology "echo" [email protected] "echo"/HTTP/ Blog.csdn.net/leixiaohua1020 "echo" ============================================= "#save in a folder named with date# File suffix#fsuffix= "latest" fsuffix=$ (date +%y%m%d) #folder to save filesarchivefolder= "Simplest_ffmpeg_demos_list_" ${fsuffix}echo "Archive folder:" ${archivefolder} #if Folder not exist, create ITIF [! -D ${archivefolder}]; Then mkdir ${archivefolder}fi#git archiveecho Archive simplest_ffmpeg_player...cd simplest_ffmpeg_playergit archive-o ".. /"${archivefolder}"/simplest_ffmpeg_player_ "${fsuffix}". zip "HEADCD: echo Archive simplest_ffmpeg_audio_player...cd simplest_ffmpeg_audio_playergit archive-o ". /"${archivefolder}"/simplest_ffmpeg_audio_player_ "${fsuffix}". zip "HEADCD: echo Archive simplest_ffmpeg_picture_encoder...cd simplest_ffmpeg_pIcture_encodergit Archive-o ". /"${archivefolder}"/simplest_ffmpeg_picture_encoder_ "${fsuffix}". zip "HEADCD: echo Archive simplest_ffmpeg_video_encoder...cd simplest_ffmpeg_video_encodergit archive-o ". /"${archivefolder}"/simplest_ffmpeg_video_encoder_ "${fsuffix}". zip "HEADCD: echo Archive simplest_ffmpeg_audio_encoder...cd simplest_ffmpeg_audio_encodergit archive-o ". /"${archivefolder}"/simplest_ffmpeg_audio_encoder_ "${fsuffix}". zip "HEADCD: echo Archive simplest_ffmpeg_streamer...cd simplest_ffmpeg_streamergit archive-o ". /"${archivefolder}"/simplest_ffmpeg_streamer_ "${fsuffix}". zip "HEADCD: echo Archive simplest_ffmpeg_mem_handler...cd simplest_ffmpeg_mem_handlergit archive-o ". /"${archivefolder}"/simplest_ffmpeg_mem_handler_ "${fsuffix}". zip "HEADCD: echo Archive simplest_ffmpeg_device...cd simplest_ffmpeg_devicegit archive-o ". /"${archivefolder}"/simplest_ffmpeg_device_ "${fsuffix}". zip "HEADCD: echo Archive simplest_ffmpeg_format...cd simplest_ffmpeg_formatgit ArchIve-o ". /"${archivefolder}"/simplest_ffmpeg_format_ "${fsuffix}". zip "HEADCD: echo Archive simplest_ffmpeg_video_filter...cd simplest_ffmpeg_video_filtergit archive-o ". /"${archivefolder}"/simplest_ffmpeg_video_filter_ "${fsuffix}". zip "HEADCD: echo Archive simplest_ffmpeg_swscale...cd simplest_ffmpeg_swscalegit archive-o ". /"${archivefolder}"/simplest_ffmpeg_swscale_ "${fsuffix}". zip "HEADCD:



FFmpeg Sample Program Collection-git bulk Fetch script

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.