Quote:
Originally Posted by sebastian
If anyone also knows a command line based app to strip the bytes, please let me know, so I could do the whole process via a batch file. :-)
|
Swiss File Knife is an ideal choice.
Download sfk169.exe from
sourceforge.
Description of the feature that would do the job.
Very crude example of batch file (has little error checking) that uses sfk169.exe to strip the bytes and copy them with the first file to joined.flv.
joinflv.bat:
Code:
rem @echo off
if "%1" gtr "9998" goto :END
if not "%1"=="" goto copy
echo Usage is "%0 lastfilenumber" to join 0001.flv through lastfilenumber.flv
echo and append them with 0000.flv to joined.flv
goto :END
:COPY
copy 0000.flv joined.flv
set /a first=1
set last=%1
set /a last=10000%last% %% 10000
set last=10000%last%
set last=%last:~-4%
:LOOP
set first=10000%first%
sfk169 partcopy %first:~-4%.flv -allfrom 32 joined.flv -append -yes
set /a first+=1
set first=%first:~-4%
if %first% gtr %last% goto :END
goto LOOP
:END
The batch file is hard coded to start with 0001.flv, so you need only to pass the last file number (without the file extension) as a command line parameter;
Code:
joinflv.bat usage:
ex: joinflv lastfilenumber
joinflv 462
-----
Edit:
Check your source files carefully before using this batch file on any non-AVC encoded session, or any session other than:
Code:
h..p://www.be-at.tv/brands/jaarbeurs-utrecht/timewarp-2012/marcel-fengler
as the session may be encoded with vp6, or have a different offset for the start of the 'AVC sequence header', as mentioned by KSV in the post below.
In all cases, this binary file copy method will work, but for some (possibly many) sessions, the offset may need to be changed from 32, to quite often 13, but possibly other values as well..
However, ffmpeg with work with many sessions. All my attempts to maintain sync,
with this session in particular, failed with the concatenate feature of ffmpeg, although this is probably not a problem with ffmpeg itself. Note that due to the source material in these files, it can be difficult to check sync. I checked it by comparison of the waveform segment of the audio and the corresponding video frame, as well as the overall time length of the video.