Transcoding a recording

General talk about ARGUS TV
Post Reply
bogerdje1
Posts: 1
Joined: Thu Dec 12, 2013 10:02 pm

Transcoding a recording

Post by bogerdje1 » Fri Dec 13, 2013 6:49 pm

Can someone tell me please how i can transcode a .ts file to a mp4 or divx file with FFmpmeg, using a post processing command, i can't find it on the internet

Thnkx

jtlarson
Posts: 36
Joined: Wed Apr 11, 2012 9:13 pm

Re: Transcoding a recording

Post by jtlarson » Wed Dec 18, 2013 10:02 pm

For me, it worked best to call the ffmpeg process from a batch file. This allowed me to run multiple transcodes simultaneously if there is more than one program waiting for transcode.

1. Set up a post process that executes a batch file like this--name it what you want, and put something like this in the path:

Code: Select all

C:\Transcode\ExeTranscode.bat


2. Set the arguments field to:

Code: Select all

%%file%% %%title%%
3. Now create the ExeTranscode.bat file (or whatever you want to name it) at the patch you use above, and format it as follows (replacing paths as appropriate):

Code: Select all

start "" /B /BELOWNORMAL "C:Path\to\ffmpeg"  -i %1 YourPreferredFFmpegSettingsHere "C:Output\path\%2.mp4"

note: the %1 and %2 correspond to the %%file%% and %%title%% arguments passed from ArgusTV.

If you don't know what ffmpeg command options to use, I'd recommend installing WinFFhttp://winff.org/html_new/ and using that to test your options. WinFF
includes a relatively current version of FFmpeg that you can use directly in the batch file above, and it has an option to show you the full ffmpeg commands used to get the results it produces. Once you are satisfied with the results, you can paste those commands into the batch file above to complete your post-processing script.

alan77ss
Posts: 8
Joined: Tue Dec 04, 2012 4:15 pm

Re: Transcoding a recording

Post by alan77ss » Fri May 16, 2014 12:46 pm

I tried the suggestion above for transcoding files and it all works great except for the naming of the output file. I used "%2.mp4" for the output in the sript and %%FILE%% %%TITLE% in the arguments section but all i get is the first word of the title, not the rest of it and no extension either.

Any ideas what i'm doing wrong?

jtlarson
Posts: 36
Joined: Wed Apr 11, 2012 9:13 pm

Re: Transcoding a recording

Post by jtlarson » Wed Jun 11, 2014 6:56 pm

Yes--but your not doing it wrong so much as your running into limitations of passing arguments to commands--in this case I think it's the fact that your %%TITLE%% argument has spaces, which causes the rest of the title to be treated as separate arguments.

You can try to fix this with quotes, but since those sometimes appear in titles too, that won't always work. So heres what I'd suggest:

1. Change the arguments section of your Argus process to this:

Code: Select all

-i %%file%% YourPreferredFFmpegSettingsHere "C:Output\path\%%title%%.mp4"
And your batch file command to this:

Code: Select all

start "" /B /BELOWNORMAL "C:Path\to\ffmpeg" %*

alan77ss
Posts: 8
Joined: Tue Dec 04, 2012 4:15 pm

Re: Transcoding a recording

Post by alan77ss » Fri Jun 13, 2014 11:58 am

That worked a lot better. Thanks. What does the %* do? Does it copy the entire argument?

jtlarson
Posts: 36
Joined: Wed Apr 11, 2012 9:13 pm

Re: Transcoding a recording

Post by jtlarson » Tue Jun 17, 2014 5:29 pm

%* returns everything after the executable--i.e. all arguments and their corresonding variables located in the 'arguments' field of the ArgusTV post process page.

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests