Preparation before concatenation
Moderator: DosItHelp
-
- Posts: 34
- Joined: 17 Feb 2017 02:28
Preparation before concatenation
I have one hundred and twenty m3u8 files that I want to combine into one. Each (?) individual file will open and play in VLC, so I want to make ONE video file from them.
The files are numbered in the extension, instead of in the filename : *.m3u81, *.m3u82, *.m3u83, *.m3u84 etc It seems to me I first need to move the varying digit out of the extension and into the filename : *1.m3u8, *2.m3u8, *3m3u8, *4.m3u8 before I can concatenate them. Am I right ? and if so, is there a BATCH method (or some other better one), rather than a manual one ?
The files are numbered in the extension, instead of in the filename : *.m3u81, *.m3u82, *.m3u83, *.m3u84 etc It seems to me I first need to move the varying digit out of the extension and into the filename : *1.m3u8, *2.m3u8, *3m3u8, *4.m3u8 before I can concatenate them. Am I right ? and if so, is there a BATCH method (or some other better one), rather than a manual one ?
Re: Preparation before concatenation
If file format allows this then you could use
Saso
Code: Select all
copy *.m3u* new_file.m3u
-
- Posts: 34
- Joined: 17 Feb 2017 02:28
Re: Preparation before concatenation
The very thing - thanks so much.
-
- Posts: 34
- Joined: 17 Feb 2017 02:28
Re: Preparation before concatenation
Spoke too soon. Not knowing the components, I incorrectly assumed that because there was a result, it was a good result. So I am back to the request for a batch file to convert filename.ext1 to filename1.ext; filename.ext2 to filename2.ext; filename.ext3 to filename3.ext and so on 120 times. Once that is done, I know how to do the concatination/joining/merging.
Re: Preparation before concatenation
You could try that loop ...
... but I'm afraid this will still not be the solution you are after, depending on how you proceed to merge these files.
Also try ...
Steffen
Code: Select all
for /f "delims=" %%i in ('dir /a-d /b *.m3u8*') do (
set "name=%%~ni"
set "ext=%%~xi"
setlocal EnableDelayedExpansion
move /y "!name!!ext!" "!name!!ext:~5!.m3u8"
endlocal
)
Also try ...
Code: Select all
for /f "delims=" %%i in ('dir /a-d /b *.m3u8*') do (
set "name=%%~ni"
set "ext=%%~xi"
setlocal EnableDelayedExpansion
set /a "n=10000+!ext:~5!"
move /y "!name!!ext!" "!name!!n:~-4!.m3u8"
endlocal
)
-
- Posts: 34
- Joined: 17 Feb 2017 02:28
Re: Preparation before concatenation
The first set of commands did EXACTLY what I asked for. However, whereas Movie Maker joins many file types, it wont join m3u8. But that is a different kind of problem from what I came to this forum for. Thank you very much. I will try other joiners.
Else I will need a batch file that replaces ext1 with ext2, 120 times.
And I have that from a previous attempt at this :
copy /b *.m3u8 fullmovie.m3u8
That gives one long playable movie containing the 120 components - problem solved.
Else I will need a batch file that replaces ext1 with ext2, 120 times.
And I have that from a previous attempt at this :
copy /b *.m3u8 fullmovie.m3u8
That gives one long playable movie containing the 120 components - problem solved.
Re: Preparation before concatenation
What about that:
Steffen
Code: Select all
for /f "delims=" %%i in ('dir /a-d /b *.m3u8*') do (
set "name=%%~ni"
set "ext=%%~xi"
setlocal EnableDelayedExpansion
set /a "n=10000+!ext:~5!"
move /y "!name!!ext!" "!name!!n:~-4!.m3u8"
endlocal
)
>"fullmovie.m3u8" type nul
for /f "delims=" %%i in ('dir /a-d /b /on *.m3u8') do (
copy /b "fullmovie.m3u8" + "%%i"
)
-
- Posts: 34
- Joined: 17 Feb 2017 02:28
Re: Preparation before concatenation
I did need to convert M3U8 so that it would play faultlessly in VLC - and I found that in ONLY Xilisoft Video Converter, so the job is done.
Thank you for yet another another batch file - I understand even less of that than the previous ones, but will keep it handy in the unlikely case such a situation arises again.
Thank you for yet another another batch file - I understand even less of that than the previous ones, but will keep it handy in the unlikely case such a situation arises again.