LINUXTNT Telegram 4450
Forwarded from LpicFarsi
برای یکی کردن چند ویدیو در لینوکس از طریق خط فرمان، ابزار حرفه‌ای و بسیار رایج FFmpeg هست. در ادامه یک روش ساده و استاندارد رو با FFmpeg بهت می‌گم:


---

مرحله ۱: نصب FFmpeg (اگر نصب نیست)

در بیشتر توزیع‌ها:
sudo apt install ffmpeg        # برای Debian/Ubuntu
sudo dnf install ffmpeg # برای Fedora/AlmaLinux
sudo pacman -S ffmpeg # برای Arch

مرحله ۲: ساخت لیست فایل‌ها

یک فایل متنی با نام list.txt بساز که توش مسیر فایل‌های ویدیو به ترتیب مورد نظر باشه:
file 'video1.mp4'
file 'video2.mp4'
file 'video3.mp4'
> فایل‌ها باید فرمت و کدک مشابه داشته باشن (مثلاً همه MP4 با h264 و aac).



مرحله ۳: اجرای دستور ترکیب
ffmpeg -f concat -safe 0 -i list.txt -c copy output.mp4
📌 خروجی می‌شه: output.mp4



⚠️ اگر کدک فایل‌ها متفاوت بود:

در این حالت باید دوباره encode بشن:

ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex "[0:v:0][0:a:0][1:v:0][1:a:0] concat=n=2:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" output.mp4

موفق باشید

@lpicfarsi
14👍2❤‍🔥1



tgoop.com/linuxtnt/4450
Create:
Last Update:

برای یکی کردن چند ویدیو در لینوکس از طریق خط فرمان، ابزار حرفه‌ای و بسیار رایج FFmpeg هست. در ادامه یک روش ساده و استاندارد رو با FFmpeg بهت می‌گم:


---

مرحله ۱: نصب FFmpeg (اگر نصب نیست)

در بیشتر توزیع‌ها:

sudo apt install ffmpeg        # برای Debian/Ubuntu
sudo dnf install ffmpeg # برای Fedora/AlmaLinux
sudo pacman -S ffmpeg # برای Arch

مرحله ۲: ساخت لیست فایل‌ها

یک فایل متنی با نام list.txt بساز که توش مسیر فایل‌های ویدیو به ترتیب مورد نظر باشه:
file 'video1.mp4'
file 'video2.mp4'
file 'video3.mp4'
> فایل‌ها باید فرمت و کدک مشابه داشته باشن (مثلاً همه MP4 با h264 و aac).



مرحله ۳: اجرای دستور ترکیب
ffmpeg -f concat -safe 0 -i list.txt -c copy output.mp4
📌 خروجی می‌شه: output.mp4



⚠️ اگر کدک فایل‌ها متفاوت بود:

در این حالت باید دوباره encode بشن:

ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex "[0:v:0][0:a:0][1:v:0][1:a:0] concat=n=2:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" output.mp4

موفق باشید

@lpicfarsi

BY linuxtnt(linux tips and tricks)


Share with your friend now:
tgoop.com/linuxtnt/4450

View MORE
Open in Telegram


Telegram News

Date: |

To view your bio, click the Menu icon and select “View channel info.” So far, more than a dozen different members have contributed to the group, posting voice notes of themselves screaming, yelling, groaning, and wailing in various pitches and rhythms. How to build a private or public channel on Telegram? The channel also called on people to turn out for illegal assemblies and listed the things that participants should bring along with them, showing prior planning was in the works for riots. The messages also incited people to hurl toxic gas bombs at police and MTR stations, he added. The SUCK Channel on Telegram, with a message saying some content has been removed by the police. Photo: Telegram screenshot.
from us


Telegram linuxtnt(linux tips and tricks)
FROM American