Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th November 2013, 23:25   #1  |  Link
cr0n=0sTT88
Registered User
 
cr0n=0sTT88's Avatar
 
Join Date: Aug 2013
Posts: 61
tool for join videos in batch mode?

Hi,

Does anyone know a tool for join videos in batch mode? I don't want re-enconde. I only want join doing direct stream copy.

I have 400 videos in avi format and each video it's splitted in 20 parts. I know how to join the videos one by one but is too much work.

does anyone can help me?

All parts of each video have the same characteristics. But not all videos have the same characteristics.
The file-names of the videos it's similar, for example:

video-1-01.avi
video-1-02.avi
video-1-03.avi
video-1-04.avi
...
video-2-01.avi
video-2-02.avi
video-2-03.avi
video-2-04.avi
...



Thank you!

Last edited by cr0n=0sTT88; 20th November 2013 at 23:39.
cr0n=0sTT88 is offline   Reply With Quote
Old 21st November 2013, 00:49   #2  |  Link
setarip_old
Registered User
 
setarip_old's Avatar
 
Join Date: Aug 2005
Posts: 16,267
Hi!

Please clarify - Do you want to create ONE video comprised of 8,000 joined video parts (20x400), or do you want to recreate 400 videos so that they are the same as your original 400 .AVI videos?
setarip_old is offline   Reply With Quote
Old 21st November 2013, 00:53   #3  |  Link
cr0n=0sTT88
Registered User
 
cr0n=0sTT88's Avatar
 
Join Date: Aug 2013
Posts: 61
Quote:
Originally Posted by setarip_old View Post
Hi!

Please clarify - Do you want to create ONE video comprised of 8,000 joined video parts (20x400), or do you want to recreate 400 videos so that they are the same as your original 400 .AVI videos?
I want re-create 400 videos in avi (I don't want re-encode, only join). the original videos have been divided into several parts each one. Sorry for my poor english!

Last edited by cr0n=0sTT88; 21st November 2013 at 00:58.
cr0n=0sTT88 is offline   Reply With Quote
Old 21st November 2013, 01:53   #4  |  Link
setarip_old
Registered User
 
setarip_old's Avatar
 
Join Date: Aug 2005
Posts: 16,267
Quote:
the original videos have been divided into several parts each one.
So why don't you just batch copy your 400 original files/videos? (I won't ask why you split them before copying them...)
setarip_old is offline   Reply With Quote
Old 21st November 2013, 02:16   #5  |  Link
cr0n=0sTT88
Registered User
 
cr0n=0sTT88's Avatar
 
Join Date: Aug 2013
Posts: 61
Quote:
Originally Posted by setarip_old View Post
So why don't you just batch copy your 400 original files/videos? (I won't ask why you split them before copying them...)
I'm sorry, but I don't understand what is your question. I have a set of videos and each video is divided into several parts. I don't have the complete videos, I only have the parts of this videos. I want to get the full videos. To get the full videos from the parts I want to join such parties.

That is, I have this:

video-1-01.avi
video-1-02.avi
video-1-03.avi
video-1-04.avi

And I want to get this (adding each part):

video-1.avi

I want do it this for the 400 avi's videos.

It's simple. Do you understand what I want to do? Sorry for my poor english, i'm spanish speaker.

Thank you friend!
cr0n=0sTT88 is offline   Reply With Quote
Old 21st November 2013, 04:00   #6  |  Link
therube
Registered User
 
Join Date: Aug 2013
Posts: 191
Various methods with FFmepg, How to concatenate (join, merge) media files.

Video to Video Converter.
Tools | Join Video Files | Add... -> OK, then choose Direct Stream Copy, make sure your container is what you want, then OK, & in a few seconds it should be complete.

You would have to do each 20-file set separately.
And it assumes that they all have the same characteristics...
It will then losslessly go about joining them.

Do verify that they playback correctly when you're done, no glitches at the joined spots, that they seek as expected...

(Other similar programs exist to join. If one doesn't work correctly, can't hurt to try another as it may use a different method to go about it. Though I've found Video To Video to be quite adept.)
therube is offline   Reply With Quote
Old 21st November 2013, 15:57   #7  |  Link
cr0n=0sTT88
Registered User
 
cr0n=0sTT88's Avatar
 
Join Date: Aug 2013
Posts: 61
Quote:
Originally Posted by therube View Post
Various methods with FFmepg, How to concatenate (join, merge) media files.

Video to Video Converter.
Tools | Join Video Files | Add... -> OK, then choose Direct Stream Copy, make sure your container is what you want, then OK, & in a few seconds it should be complete.

You would have to do each 20-file set separately.
And it assumes that they all have the same characteristics...
It will then losslessly go about joining them.

Do verify that they playback correctly when you're done, no glitches at the joined spots, that they seek as expected...

(Other similar programs exist to join. If one doesn't work correctly, can't hurt to try another as it may use a different method to go about it. Though I've found Video To Video to be quite adept.)



Hi, thank you for the information! I can do it with the software "video to video converter" but the problem is that this is very much work because I need do it for 400 videos.

I prefer ffmpeg but I don't know how to do the script! :'(

¿does anyone can help me for make the script conversion for ffmpeg? I think that it is simply for anyone that know scriping language code.

I only want join all parts of the videos for each video.

It is. I have 400x20 videos (approximately). I will have 400 videos after of joining.

The name of the each video is different but ALL parts include -01, -02, -03... Any videos have 20 parts, other videos have 3 parts, other videos have N parts.


I have the parts of the videos with this format file-name:

nameofvideo1-01.avi [identical characteristics off all parts]
nameofvideo1-02.avi
nameofvideo1-03.avi
...
nameofvideo1-0N.avi


nameofvideo2-01.avi
nameofvideo2-02.avi
nameofvideo2-03.avi
...
nameofvideo2-0N.avi


...


nameofvideoM-01.avi
nameofvideoM-02.avi
nameofvideoM-03.avi
...
nameofvideoM-0N.avi


I want get this:

nameofvideo1-concatenated.avi
nameofvideo2-concatenated.avi
...
nameofvideoM-concatenated.avi


We assume that each video:

1) is in avi/xvid/mp3 format.
2) i don't want re-encode. I only want join/concatenate the different parts in only one file.
3) all videos are in the same directory.


Anyone with knowledge of scriping language code can help me?

Thanks everyone!!!
cr0n=0sTT88 is offline   Reply With Quote
Old 21st November 2013, 16:11   #8  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
if it doesn't have to be done in a console:
  • start Avi-Mux Gui
  • drag&drop all the file in it
  • select all the files
  • press 'generate data source fomm files'
  • press 'start', enter name of output avi, save
  • wait for 'Process finished'-Popup
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 21st November 2013, 16:30   #9  |  Link
cr0n=0sTT88
Registered User
 
cr0n=0sTT88's Avatar
 
Join Date: Aug 2013
Posts: 61
Quote:
Originally Posted by Selur View Post
if it doesn't have to be done in a console:
  • start Avi-Mux Gui
  • drag&drop all the file in it
  • select all the files
  • press 'generate data source fomm files'
  • press 'start', enter name of output avi, save
  • wait for 'Process finished'-Popup
thank you for the tutorial friend. Avi-mux gui also works fine but the problem is the same. I need do it this for each video and this is very work. I need a script for do it ALL videos automatically. Or I need any soft that do it the same automatically.

Thank you!
cr0n=0sTT88 is offline   Reply With Quote
Old 21st November 2013, 16:35   #10  |  Link
cr0n=0sTT88
Registered User
 
cr0n=0sTT88's Avatar
 
Join Date: Aug 2013
Posts: 61
I will try to make the script. This might work? :P

Code:
@echo off
set "ffmpeg_bin=C:\ffmpeg\ffmpeg-git-b6ff81d-win64-static\bin\ffmpeg.exe"
set "out_path=D:\Bandeja Entrada\Vídeos"
cd /D "D:\Bandeja Entrada\Vídeos"

for %%f in (*.avi) do (
  %ffmpeg_bin% -f concat -i ????
)
cr0n=0sTT88 is offline   Reply With Quote
Old 21st November 2013, 20:40   #11  |  Link
therube
Registered User
 
Join Date: Aug 2013
Posts: 191
Code:
%ffmpeg_bin% -f concat -i ????
You're going to want a '-c copy' in there, or else it will re-encode to the output.
Code:
%ffmpeg_bin% -f concat -i ???? -c copy ...
therube is offline   Reply With Quote
Old 21st November 2013, 21:12   #12  |  Link
cr0n=0sTT88
Registered User
 
cr0n=0sTT88's Avatar
 
Join Date: Aug 2013
Posts: 61
Thanks for the help but if someone don't tell me exactly how to do it I think that I won't be able to do it!



cr0n=0sTT88 is offline   Reply With Quote
Old 21st November 2013, 23:01   #13  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 693
In this case you don't need a batch-script. Just create a text-file:
Code:
file '/path/to/file1.avi'
file '/path/to/file2.avi'
file '/path/to/file3.avi'
...
file '/path/to/file400.avi'
...and run ffmpeg once from commandline:
Code:
ffmpeg.exe -f concat -i filelist.txt -c copy video-concat.avi
Worked for me with a bunch of ts-files.
__________________
My hobby website
Reino is offline   Reply With Quote
Old 22nd November 2013, 11:05   #14  |  Link
cr0n=0sTT88
Registered User
 
cr0n=0sTT88's Avatar
 
Join Date: Aug 2013
Posts: 61
Quote:
Originally Posted by CoRoNe View Post
In this case you don't need a batch-script. Just create a text-file:
Code:
file '/path/to/file1.avi'
file '/path/to/file2.avi'
file '/path/to/file3.avi'
...
file '/path/to/file400.avi'
...and run ffmpeg once from commandline:
Code:
ffmpeg.exe -f concat -i filelist.txt -c copy video-concat.avi
Worked for me with a bunch of ts-files.

is this code for join since file1 until file400 in only one video-file?
cr0n=0sTT88 is offline   Reply With Quote
Old 22nd November 2013, 18:40   #15  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 693
Yes it is. I haven't actually tried it on avi-files, but I succesfully joined 38 ts-files together this way.
__________________
My hobby website
Reino is offline   Reply With Quote
Old 22nd November 2013, 21:10   #16  |  Link
cr0n=0sTT88
Registered User
 
cr0n=0sTT88's Avatar
 
Join Date: Aug 2013
Posts: 61
Quote:
Originally Posted by CoRoNe View Post
Yes it is. I haven't actually tried it on avi-files, but I succesfully joined 38 ts-files together this way.
ok, thank you. But I need a different thing for solve the problem.

My problem is join all files at the same time. Not one by one. I need one script that search inside of the directory and analyze the filenames of the videos. After join each video without re-encode.

I explain in the post 7.
cr0n=0sTT88 is offline   Reply With Quote
Old 24th November 2013, 11:34   #17  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 693
To ask for such a batch-script I think you're better off at http://stackoverflow.com or alike.
__________________
My hobby website
Reino is offline   Reply With Quote
Old 25th November 2013, 03:47   #18  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
You can generate the list file with a for loop but this would need to be run once in each directory in which you want to merge all avi files.
Code:
@echo off
set ffmpeg_bin="C:\ffmpeg\ffmpeg-git-b6ff81d-win64-static\bin\ffmpeg.exe"
for %%f in (*.avi) do echo file '%%f'>>mylist.txt
%ffmpeg_bin% -f concat -i mylist.txt -c copy concat.avi

Last edited by Asmodian; 25th November 2013 at 03:57.
Asmodian is offline   Reply With Quote
Old 25th November 2013, 09:50   #19  |  Link
cr0n=0sTT88
Registered User
 
cr0n=0sTT88's Avatar
 
Join Date: Aug 2013
Posts: 61
Quote:
Originally Posted by Asmodian View Post
You can generate the list file with a for loop but this would need to be run once in each directory in which you want to merge all avi files.
Code:
@echo off
set ffmpeg_bin="C:\ffmpeg\ffmpeg-git-b6ff81d-win64-static\bin\ffmpeg.exe"
for %%f in (*.avi) do echo file '%%f'>>mylist.txt
%ffmpeg_bin% -f concat -i mylist.txt -c copy concat.avi
thank you for your script.

one question: do I need create an TXT file for each video for joining process?

do you can modify the script for not need the TXT file? I prefer that the script search inside of the directory each video! is it possible?

all videos have the same format! name1-01.avi, name1-02.avi, name1-03.avi... name1-NN.avi ; name2-01.avi, name2-02.avi, name2-03.avi... name2-NN.avi. Name of the each video is different!

is it very difficult make an script that detect the videos?

Thank you!

Last edited by cr0n=0sTT88; 25th November 2013 at 09:53.
cr0n=0sTT88 is offline   Reply With Quote
Old 25th November 2013, 18:26   #20  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 693
Thx for the script Asmodian. This seems to work when the files are named movie-01.ts, movie-02.ts, movie-03.ts ... movie-38.ts, but mine are named movie-1.ts, movie-2.ts, movie-3.ts ... movie-38.ts, which results in:

Code:
file 'movie-1.ts' 
file 'movie-10.ts' 
file 'movie-11.ts' 
file 'movie-12.ts' 
file 'movie-13.ts' 
file 'movie-14.ts' 
file 'movie-15.ts' 
file 'movie-16.ts' 
file 'movie-17.ts' 
file 'movie-18.ts' 
file 'movie-19.ts' 
file 'movie-2.ts' 
file 'movie-20.ts' 
file 'movie-21.ts' 
file 'movie-22.ts' 
file 'movie-23.ts' 
file 'movie-24.ts' 
file 'movie-25.ts' 
file 'movie-26.ts' 
file 'movie-27.ts' 
file 'movie-28.ts' 
file 'movie-29.ts' 
file 'movie-3.ts' 
file 'movie-30.ts' 
file 'movie-31.ts' 
file 'movie-32.ts' 
file 'movie-33.ts' 
file 'movie-34.ts' 
file 'movie-35.ts' 
file 'movie-36.ts' 
file 'movie-37.ts' 
file 'movie-38.ts' 
file 'movie-4.ts' 
file 'movie-5.ts' 
file 'movie-6.ts' 
file 'movie-7.ts' 
file 'movie-8.ts' 
file 'movie-9.ts'
I've tried the DOS sort command, but without any luck. Do you know how to correct the sorting in this case?

cr0n=0sTT88, you don't have to create a txt-file yourself. The batch-script will do it for you.
Change the path to ffmpeg for your situation, copy the bat-file to the directory with all the movie segments and just run it.
__________________
My hobby website
Reino is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.