View Single Post
Old 26th February 2019, 18:04   #10  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,904
Quote:
Originally Posted by qyot27 View Post
In honesty, I wouldn't try to run the .m3u8 through AviSynth, or to try to keep the .ts files separate if the end result is just to have them concatenated anyway. I'd combine them using FFmpeg first, and then just use the single input as source to AviSynth rather than 71 of them. And FFmpeg understands *.m3u8 files just fine:
Code:
ffmpeg -i input.m3u8 -vcodec copy -acodec copy -bsf:a aac_adtstoasc output.mp4
(or whatever your desired output container is)
Got it.
I guess you are right.
I'm running them through ffmpeg with the following bat file as it's so much easier:

Code:
@echo off
setlocal disableDelayedExpansion
::
:: first assume normal call, get args from %*
set args=%*
set "dragDrop="
::
:: Now check if drag&drop situation by looking for %0 in !cmdcmdline!
:: if found then set drag&drop flag and get args from !cmdcmdline!
setlocal enableDelayedExpansion
set "cmd=!cmdcmdline!"
set "cmd2=!cmd:*%~f0=!"
if "!cmd2!" neq "!cmd!" (
  set dragDrop=1
  set "args=!cmd2:~0,-1! "
  set "args=!args:* =!"
)
::
:: Process the first argument only
for %%F in (!args!) do (
  if "!!"=="" endlocal & set "dragDrop=%dragDrop%"
  rem ------------------------------------------------
  rem - Your file processing starts here.
  rem - Use %%F wherever you would normally use %1
  rem
  rem Change to drive and directory of input file
  %%~dF
  cd %%~pF
  C:\Encoding\ffmpeg.exe -hwaccel dxva2 -i "%%~nxF" -threads 32 -vcodec copy -acodec copy "C:\Encoding\%%~nF output.mp4" 
  rem
  rem - Your file processing ends here
  rem -------------------------------------------------
)
if defined dragDrop (
  pause
  exit
)
FranceBB is offline   Reply With Quote