Log in

View Full Version : Can I convert a video (exotic format) to an uncompressed AVI with VLC?


SuperLumberjack
21st April 2020, 18:36
Hello :)

Does somebody know if there is a way to encode a video to an uncompressed AVI (or another lossless format) with VLC please ?

The problem I have is that I need VLC to decode a strange video format (".RoQ") and then convert it to an uncompressed AVI, but I didn't find any lossless codec.

VirtualDub can't open this video, so I absolutely need VLC.

Thanks for your help ! ;)

Klaus1189
21st April 2020, 18:40
Download MediaInfo first. Open the file with and post log here.
https://mediaarea.net/download/binary/mediainfo-gui/20.03/MediaInfo_GUI_20.03_Windows_x64_WithoutInstaller.7z

StainlessS
21st April 2020, 19:17
".roq", apparently used by Quake3 [I presume is a game] :- https://wikimili.com/en/Video_file_format

There are some google hits for ffmpeg and that FourCC, pretty much all source code.

EDIT: Perhaps below worth a try to convert using ffmpeg.

DEMO.BAT

REM https://forum.doom9.org/showthread.php?p=1908619#post1908619
REM We DO NOT LIKE SPACES IN FILE NAMES (REM == REMark ie comment)

setlocal

REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"

REM Where to get INPUT files, No terminating Backslash, "." = current directory (ie same as dir .bat file)
set INDIR="."

REM Where to place OUTPUT files, No terminating Backslash. "." would be same as .bat file, ".\OUT" = OUT folder in same directory as bat file.
set OUTDIR="D:"

REM Below, can add INPUT extensions as eg *.WEBM (SPACE separated, Batch Processes all INPUT type files in INDIR)
FOR %%A IN (*.AVI *.MKV *.MP4 *.MOV *.QT *.3GP *.DVB *.VOB *.MPG *.MPEG *M2P *.PS *.TS *.DIVX *.XVID *.FLV *.WMV *.ASF *.MXF) DO (

REM ****** Un-REM [ie SELECT] ONLY one of below lines, Comment out ie REM the remaining lines.
%FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec huffyuv -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec magicyuv -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec v410 -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec r210 -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec copy -acodec copy "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec copy "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vn -acodec pcm_s16le "%OUTDIR%\%%~nxA.WAV"
REM *****************************************************************************************.

)
Pause

REM ... Above Command lines, What they do if UnREM'ed (and all others REM'ed, UnREM=UnCOMMENT ) :
REM (1) Convert Video to UtVideo lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (2) Convert Video to HuffYUV lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (3) Convert Video to MagicYUV lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (4) Convert Video to v410 Uncompressed 4:4:4 10-bit lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (5) Convert Video to r210 Uncompressed RGB 10-bit lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (6) Remux, copy both video and audio (output MKV - see file extension at the end of the Remux line, ie MKV).
REM (7) Convert Video to UtVideo lossless, copy audio (output MKV).
REM (8) Skip any video, Convert Audio to 16 bit PCM (output WAV).
REM *****************************************************************************************.
REM In the UnREM'ed command Line [ie without a preceding REM]:-
REM '-vcodec utvideo' means convert video using utvideo codec.
REM '-vcodec copy' means copy video rather than convert.
REM '-vn' means no video output, use instead of eg '-vcodec utvideo'
REM '-acodec pcm_s16le' means convert audio using pcm_s16le codec.
REM '-acodec copy' means copy audio rather than convert.
REM '-an' means no audio output, use instead of eg '-acodec pcm_s16le'
REM The file extension at end of the line determines output container, eg '.AVI'
REM
REM From Command line with ffmpeg somewhere in your environment PATH:-
REM 'ffmpeg -codecs >D:\ffmpeg_codecs.txt'
REM Writes a txt file of ffmpeg available codecs to D:\
REM At start of txt file it shows a 'legend' or 'key' for codecs that can be used for video and audio,
REM use only ENCODING SUPPORTED codecs, prefereably LOSSLESS.
REM Supported codecs will vary with ffmpeg version.
REM *****************************************************************************************.

Above is 8 function demo - Updated (Requires HAND EDIT to change functionality, or Make copy, hand edit copy)

EDIT: Add whatever extension it uses in these lines above, eg where ext = ".ROQ"

REM Below, can add extensionas as eg *.WMV (SPACE separated)
FOR %%A IN (*.mp4 *.vob *.mpg *.TS *.ROQ) DO (

EDIT: I Added *.avi to extensions.

SuperLumberjack
21st April 2020, 19:20
I can only have the informations showed in VLC:

Stream 0

Codec: Id RoQ DPCM Audio (RoQa)
Type: Audio
Channels: Stereo
Sample rate: 22050 Hz
Bits per sample: 16

Stream 1

Codec: Id RoQ Video (RoQv)
Type: Video
Video resolution: 512x256
Buffer dimensions: 512x256
Frame rate: 30
Decoded format: Planar 4:4:4 YUV full scale
Orientation: Top left


Or the MediaInfo of the video converted in an AVI with raw streams (that VirtualDub or Media Player Classic can't read) :

General
Complete name : G:\intro.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 50.8 MiB
Duration : 1 min
Overall bit rate : 4 746 kb/s

Video
ID : 0
Format : RoQv
Codec ID : RoQv
Duration : 1 min
Bit rate : 3 844 kb/s
Width : 512 pixels
Height : 256 pixels
Display aspect ratio : 2.000
Frame rate : 30.000 FPS
Bits/(Pixel*Frame) : 0.977
Stream size : 41.1 MiB (81%)

Audio
ID : 1
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : 1
Duration : 1 min
Bit rate mode : Constant
Bit rate : 705.6 kb/s
Channel(s) : 2 channels
Sampling rate : 22.05 kHz
Bit depth : 16 bits
Stream size : 7.55 MiB (15%)
Alignment : Aligned on interleaves


I precise that the audio had to be converted to PCM, because without that no audio stream appears in the MediaInfo.

SuperLumberjack
21st April 2020, 19:29
".roq", apparently used by Quake3 [I presume is a game] :- https://wikimili.com/en/Video_file_format

There are some google hits for ffmpeg and that FourCC, pretty much all source code.

EDIT: Perhaps below worth a try to convert using ffmpeg.

SuperLumbajack.bat

REM We DO NOT LIKE SPACES IN FILE NAMES (REM == REMark ie comment)

setlocal

REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"

REM Where to get input file, No terminating Backslash, "." = current directory (ie same as dir .bat file)
set INDIR="."

REM Where to place output file, No terminating Backslash. "." would be same as .bat file, ".\\OUT" = OUT folder in same directory as bat file.
set OUTDIR="D:"

REM Below, can add extensionas as eg *.WMV (SPACE separated)
FOR %%A IN (*.mp4 *.vob *.mpg *.TS) DO (

REM ****** Un-REM ONLY one of below lines *******.
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec copy -acodec copy "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec copy "%OUTDIR%\%%~nxA.MKV"
%FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM *********************************************.

)

REM ... Above UN-REM'ed lines :
REM (1) Remux, copy both video and audio (output MKV).
REM (2) UtVideo lossless video, copy audio (output MKV).
REM (3) UtVideo lossless video, PCM audio (output AVI).

Pause

Above is 3 function demo

EDIT: Add whatever extension it uses in these lines above, eg where ext = ".ROQ"

REM Below, can add extensionas as eg *.WMV (SPACE separated)
FOR %%A IN (*.mp4 *.vob *.mpg *.TS *.ROQ) DO (


Pfffiou ! It's always challenging with you, but you have skills ! :p

Thank you StainlessS ! ;)

I will try (to understand before I try, because I'm a noob forever) ! :)

StainlessS
21st April 2020, 19:30
Try above Bat file, I added *.avi extension.

You need FFMPEG installed somewhere.

SuperLumberjack
21st April 2020, 19:40
So, if I understand, I need to create a BAT file with this script, that I put in a folder with the RoQ files and then double-click on the BAT file ? :o

That sounds promising ! But for the moment, in didn't work... :p

Because I'm a bit slow I suppose :rolleyes:


Edit : I'm idiot ! I forgot FFMPEG !

Edit 2 :

For the moment I did this :

REM We DO NOT LIKE SPACES IN FILE NAMES (REM == REMark ie comment)

setlocal

REM Where to Find ffmpeg
set FFMPEG="G:\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe"

REM Where to get input file, No terminating Backslash, "." = current directory (ie same as dir .bat file)
set INDIR="."

REM Where to place output file, No terminating Backslash. "." would be same as .bat file, ".\\OUT" = OUT folder in same directory as bat file.
set OUTDIR="."

REM Below, can add extensionas as eg *.WMV (SPACE separated)
FOR %%A IN (*.mp4 *.vob *.mpg *.TS *.AVI) DO (

REM ****** Un-REM ONLY one of below lines *******.
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec copy -acodec copy "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec copy "%OUTDIR%\%%~nxA.MKV"
%FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM *********************************************.

)

REM ... Above UN-REM'ed lines :
REM (1) Remux, copy both video and audio (output MKV).
REM (2) UtVideo lossless video, copy audio (output MKV).
REM (3) UtVideo lossless video, PCM audio (output AVI).

Pause

What is wrong please ?


Edit 3 : It worked ! :p I forgot to add " *RoQ " !

Thank you so much StainlessS ! :thanks:

You are a god ! :D


There was just a " .\intro.RoQ: I/O error ", but it works !

StainlessS
21st April 2020, 21:47
I initially added a " *.RoQ" for you, but then saw this

Complete name : G:\intro.avi

So changed it to " *.AVI" instead.

Seems you changed the name or used same file with different extension.

Anyways, all good. :)

EDIT: By the way, can use same script for other difficult files too, just make sure it has the appropriate extension added.

SuperLumberjack
21st April 2020, 23:14
Yep ! You are the boss ! ;)

But how can you do that ? It looks like you got this out from your magic pocket :D

:thanks:

StainlessS
22nd April 2020, 00:24
Like it says here, for adding *.WMV extension [supports a lot of INPUT container types, ie whatever FFMPEG supports]

REM Below, can add extensionas as eg *.WMV (SPACE separated)
FOR %%A IN (*.mp4 *.vob *.mpg *.TS *.AVI *.WMV) DO (

So with above INPUT Extension settings, will batch convert all the mentioned file types that are in the INDIR directory.

Script mostly stolen from elsewhere. [little bit of tinkering to make it easier to use]

EDIT: Remux line (see the BAT), remux to eg MP4, change below MKV to MP4

%FFMPEG% -i "%INDIR%\%%A" -vcodec copy -acodec copy "%OUTDIR%\%%~nxA.MKV"

Although just because it can put/remux some clip into eg MP4, it dont mean it will play, eg WMV remux into MP4, may not play but may complete remux ok.

EDIT:
Pfffiou ! It's always challenging with you
Wadya mean, I'm adorable https://www.cosgan.de/images/midi/liebe/g0191.gif [Oh dear, maybe a bit more covid headin' this way]

EDIT:
NOTE, Cockup in BAT file COMMENT, should be ".\OUT" = OUT folder NOT ".\\OUT" = OUT folder, Doom 9 posting problem with backslashes.

REM Where to place output file, No terminating Backslash. "." would be same as .bat file, ".\OUT" = OUT folder in same directory as bat file.


I've made a few small changes to posted script, update your copy.
EDIT: Updated again.

SuperLumberjack
22nd April 2020, 11:15
Thanks for all these explanations ! It will be useful for the next time ! ;)

You are our Master to all of us ! :thanks:


Edit :

Just a question for this :

REM ... Above UN-REM'ed lines :
REM (1) Convert Video to UtVideo lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (2) Convert Video to HuffYUV lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (3) Remux, copy both video and audio (output MKV - see file extension at the end of the Remux line, ie MKV).
REM (4) Convert Video to UtVideo lossless, copy audio (output MKV).
REM (5) Skip any video, Convert Audio to 16 bit PCM (output WAV).

How (or where) we choose in the script ? :p Or in fact, it does all of this ? But why is there the HuffYUV in addition ?

StainlessS
22nd April 2020, 14:06
As it say in instructions

The Code lines that perform whatever is required

REM ****** Un-REM ONLY one of below lines *******.
%FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec huffyuv -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec copy -acodec copy "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec copy "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vn -acodec pcm_s16le "%OUTDIR%\%%~nxA.WAV"
REM *********************************************.


Instructions telling what the ABOVE code lines do if Un-REM'ed, [ONLY ONE LINE SHOULD BE UN-REM'ed ie UN-COMMENTED]

REM ... Above UN-REM'ed lines :
REM (1) Convert Video to UtVideo lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (2) Convert Video to HuffYUV lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (3) Remux, copy both video and audio (output MKV - see file extension at the end of the Remux line, ie MKV).
REM (4) Convert Video to UtVideo lossless, copy audio (output MKV).
REM (5) Skip any video, Convert Audio to 16 bit PCM (output WAV).


REM (1) tells what the 1st LINE (which above is Un-REM'ed) does.
REM (2) tells what the 2nd LINE (which above is NOT Un-REM'ed) does, IF IT IS Un-REM'ed and all other lines are REM'ed.
etc
You have to Hand edit for whatever you want, you can create separate scripts for each if you like, but as provided is multi-function demo [ie 1 script instead of 5 EDIT: now 8].

Why HuffYUV, dont know, maybe you want it, maybe you dont, just shows how you might want to modify to add some other CODEC, for that see codecs in ffmpeg docs.

EDIT: You could add MagicYUV (or whatever it is called) to the 5 opion lines[and instructions], but would need find whatever ffmpeg codec name it uses from ffmpeg docs.
I dont use MagicYUV and do not know what the codec name to use is. Maybe google search on "ffmpeg utvideo huffyuv magicyuv codec". Good hunting.
Edit: it might just be as simple as 'magicyuv', copy either 'utvideo' of 'huffyuv' line [in blue above] and replace with 'magicyuv' [or whatever it turns out to be] and Un-REM it and
REM all other lines, and try it, maybe works, or maybe dont, if not then 'magicyuv' is wrong codec name. Dont forget to add a comment line to describe it so you know what it is.

EDIT: As it turned out it was 'magicyuv', added another option to the script, script updated.

Results from a Colorbars.avi conversion to MagicYUV (FourCC='M8Y0')

General
Complete name : D:\Clip2.avi.AVI
Format : AVI
Format/Info : Audio Video Interleave
File size : 8.61 MiB
Duration : 3 s 337 ms
Overall bit rate : 21.6 Mb/s
Writing application : Lavf58.3.100

Video
ID : 0
Format : M8Y0
Codec ID : M8Y0
Duration : 3 s 337 ms
Bit rate : 20.1 Mb/s
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate : 29.970 (30000/1001) FPS
Bits/(Pixel*Frame) : 2.180
Stream size : 7.98 MiB (93%)

Audio
ID : 1
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : 1
Duration : 3 s 337 ms
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 626 KiB (7%)
Alignment : Aligned on interleaves
Interleave, duration : 17 ms (0.51 video frame)


For list of ffmpeg codecs [not all are for video nor for encoding], from command line and where ffmpeg somewhere in your environment path,

ffmpeg -codecs >D:\ffmpeg_codecs.txt

Output text file to D:\ffmpeg_codecs.txt
A few video codec entries extracted from the codecs list, not all of them are lossless[S flag] but all can encode[E flag].

Codecs:
D..... = Decoding supported
.E.... = Encoding supported
..V... = Video codec
..A... = Audio codec
..S... = Subtitle codec
...I.. = Intra frame-only codec
....L. = Lossy compression
.....S = Lossless compression
-------
DEVI.S ayuv Uncompressed packed MS 4:4:4:4
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_cuvid ) (encoders: libx264 libx264rgb h264_nvenc nvenc nvenc_h264 )
DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_cuvid ) (encoders: libx265 nvenc_hevc hevc_nvenc )
DEVI.S huffyuv HuffYUV
DEVI.S magicyuv MagicYUV video
DEV.L. mpeg1video MPEG-1 video (decoders: mpeg1video mpeg1_cuvid )
DEV.L. mpeg2video MPEG-2 video (decoders: mpeg2video mpegvideo mpeg2_cuvid )
DEV.L. mpeg4 MPEG-4 part 2 (decoders: mpeg4 mpeg4_cuvid ) (encoders: mpeg4 libxvid )
DEV.L. msvideo1 Microsoft Video 1
DEVIL. prores Apple ProRes (iCodec Pro) (decoders: prores prores_lgpl ) (encoders: prores prores_aw prores_ks )
DEVI.S r210 Uncompressed RGB 10-bit
DEVI.S rawvideo raw video
DEVI.S utvideo Ut Video
DEVI.S v210 Uncompressed 4:2:2 10-bit
DEVI.S v308 Uncompressed packed 4:4:4
DEVI.S v408 Uncompressed packed QT 4:4:4:4
DEVI.S v410 Uncompressed 4:4:4 10-bit
DEVI.S yuv4 Uncompressed packed 4:2:0


EDIT: Update bat script in post #3. Now 7 option script, added "(4) Convert Video to v410 Uncompressed 4:4:4 10-bit lossless, Convert Audio to 16 bit PCM audio (output AVI)".
EDIT: I was gonna add 'lagarith' but it only has decoder in ffmpeg.
EDIT: Update bat script in post #3. Now 8 option script, added "(5) Convert Video to r210 Uncompressed RGB 10-bit lossless, Convert Audio to 16 bit PCM audio (output AVI)".

EDIT: Added a few more INPUT container types

REM Below, can add INPUT extensionas as eg *.WEBM (SPACE separated, Batch Processes all INPUT type files in INDIR)
FOR %%A IN (*.AVI *.MKV *.MP4 *.MOV *.QT *.3GP *.DVB *.VOB *.MPG *.MPEG *M2P *.PS *.TS *.DIVX *.XVID *.FLV *.WMV *.ASF *.MXF) DO (

SuperLumberjack
22nd April 2020, 16:22
Thanks for your explanations ! ;)

Despire your explanations, it stays a little bit obscure for me ! :p

For the script of the BAT file, if I want for example choose the REM (1), how have I to edit it ?

Another question : for the UtVideo codec, is it always the YV24 colorspace or it chooses the good one according to the colorspace of the source ?

Thanks for your help ! :)

StainlessS
22nd April 2020, 16:58
By default, it is already set for option 1. It does NOT have REM (ie comment) in front of it, the rest do have REM in front of them [commented out, dont do anything]

REM ****** Un-REM ONLY one of below lines *******.
%FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec huffyuv -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec magicyuv -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec v410 -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec r210 -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec copy -acodec copy "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec copy "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vn -acodec pcm_s16le "%OUTDIR%\%%~nxA.WAV"
REM *********************************************.


To choose WAV Audio Only edit like so (last one)


REM ****** Un-REM ONLY one of below lines *******.
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec huffyuv -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec magicyuv -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec v410 -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec r210 -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec copy -acodec copy "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec copy "%OUTDIR%\%%~nxA.MKV"
%FFMPEG% -i "%INDIR%\%%A" -vn -acodec pcm_s16le "%OUTDIR%\%%~nxA.WAV"
REM *********************************************.

Red lines dont do anything, commented out.
Its just a demo how to do it, instead of providing 8 separate files, you can make your own copy and change function by hand.

I've added a few INPUT container types.

REM Below, can add INPUT extensionas as eg *.WEBM (SPACE separated, Batch Processes all INPUT type files in INDIR)
FOR %%A IN (*.AVI *.MKV *.MP4 *.MOV *.QT *.3GP *.DVB *.VOB *.MPG *.MPEG *M2P *.PS *.TS *.DIVX *.XVID *.FLV *.WMV *.ASF *.MXF) DO (


EDIT:
And to eg convert Video to UtVideo and Skip audio, like so, (Add it yourself, + a description line)
EDIT: Maybe change output container from MKV to AVI, at END of line.

%FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -an "%OUTDIR%\%%~nxA.MKV"

-vn means no video, -an means no audio.

EDIT: I usually use a bat version with just the first option line, for UtVideo PCM audio, a lot easier and usually more stable than using ffms2, LSmash or anything else.
UtVideo AVI source with PCM audio is usually very stable and very rarely a problem.
I've Never had to start a thread about how to open a video file (many do, and thread can be active for weeks/months).

EDIT: Sorry,
for the UtVideo codec, is it always the YV24 colorspace
For me, is usual to recieve YV12 via UtVideo, not YV24.
Dont know what else to say, maybe your source was internally YV24 and ffmpeg is being helpfull.
Here's your answer, from your MediaInfo post.
Decoded format: Planar 4:4:4 YUV full scale
So looks like YV24 and at PC Levels 0->255 not TV Levels 16->235..

EDIT: I have more than a dozen bat scripts which are variations of this demo bat and all named differently, this script is simply called DEMO.BAT
My BAT files live in their own directory which I can zip up and copy to another machine.
The BAT I use most has a coulple of UnderScores before the name eg "__MyFavouriteBatFile.Bat", so that it sorts to the top of the list of bat files, easy to find.

SuperLumberjack
22nd April 2020, 19:53
Very good explanations ! :) :thanks:

You are a good professor ! ;) I understood everything (I think) ! :p

This BAT file is very useful ! :goodpost:

It became a very interesting thread ! ;)


Thanks once again !

StainlessS
23rd April 2020, 09:42
Updated post #3 again, final one.

SuperLumberjack
23rd April 2020, 13:49
Fine ! :thanks:

But it's strange, I have a problem with the BAT file I used, whereas it worked at this moment... :confused:

So I updated th BAT file with your updates, but it still doesn't work :scared:

Here is a copy of the BAT file :

REM https://forum.doom9.org/showthread.php?p=1908619#post1908619
REM We DO NOT LIKE SPACES IN FILE NAMES (REM == REMark ie comment)

setlocal

REM Where to Find ffmpeg
set FFMPEG="G:\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe"

REM Where to get INPUT files, No terminating Backslash, "." = current directory (ie same as dir .bat file)
set INDIR="."

REM Where to place OUTPUT files, No terminating Backslash. "." would be same as .bat file, ".\OUT" = OUT folder in same directory as bat file.
set OUTDIR="."

REM Below, can add INPUT extensions as eg *.WEBM (SPACE separated, Batch Processes all INPUT type files in INDIR)
FOR %%A IN (*.AVI *.MKV *.MP4 *.MOV *.QT *.3GP *.DVB *.VOB *.MPG *.MPEG *M2P *.PS *.TS *.DIVX *.XVID *.FLV *.WMV *.ASF *.MXF *.RoQ) DO (

REM ****** Un-REM [ie SELECT] ONLY one of below lines, Comment out ie REM the remaining lines.
%FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec huffyuv -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec magicyuv -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec v410 -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec r210 -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec copy -acodec copy "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec copy "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vn -acodec pcm_s16le "%OUTDIR%\%%~nxA.WAV"
REM *****************************************************************************************.

)
Pause

REM ... Above Command lines, What they do if UnREM'ed (and all others REM'ed, UnREM=UnCOMMENT ) :
REM (1) Convert Video to UtVideo lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (2) Convert Video to HuffYUV lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (3) Convert Video to MagicYUV lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (4) Convert Video to v410 Uncompressed 4:4:4 10-bit lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (5) Convert Video to r210 Uncompressed RGB 10-bit lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (6) Remux, copy both video and audio (output MKV - see file extension at the end of the Remux line, ie MKV).
REM (7) Convert Video to UtVideo lossless, copy audio (output MKV).
REM (8) Skip any video, Convert Audio to 16 bit PCM (output WAV).
REM *****************************************************************************************.
REM In the UnREM'ed command Line [ie without a preceding REM]:-
REM '-vcodec utvideo' means convert video using utvideo codec.
REM '-vcodec copy' means copy video rather than convert.
REM '-vn' means no video output, use instead of eg '-vcodec utvideo'
REM '-acodec pcm_s16le' means convert audio using pcm_s16le codec.
REM '-acodec copy' means copy audio rather than convert.
REM '-an' means no audio output, use instead of eg '-acodec pcm_s16le'
REM The file extension at end of the line determines output container, eg '.AVI'
REM
REM From Command line with ffmpeg somewhere in your environment PATH:-
REM 'ffmpeg -codecs >G:\ffmpeg_codecs.txt'
REM Writes a txt file of ffmpeg available codecs to G:\
REM At start of txt file it shows a 'legend' or 'key' for codecs that can be used for video and audio,
REM use only ENCODING SUPPORTED codecs, prefereably LOSSLESS.
REM Supported codecs will vary with ffmpeg version.
REM *****************************************************************************************.


The "cmd.exe" shows me this :

the specified path can not be found

SuperLumberjack
23rd April 2020, 13:56
I know why ! It doesn't like accent with the folders name. It works now ! ;)

simonhard
4th February 2022, 17:15
I don't see why you would try to get a code to change the video format instead of just looking online at some pages that can give you all of those options. I remember when it was popular to download videos from youtube to mp4 (https://www.creative.onl/startupsgeek/youtube-to-mp4/), and it was everywhere for free. It was not so long ago, so if it was possible then, when we didn't have so many pages online, so many alternatives, I don't see how you cannot do it right now. It is terrible to convert these videos as you are not stealing anything. It is much easier to profit from one code made by somebody a long time ago, and I am sure you won't be the only one, so search for what you need, and you'll get it.

Katie Boundary
11th March 2022, 20:07
Since when has VLC been a transmuxer/transcoder?

huhn
11th March 2022, 21:17
for like 5-10 years maybe even from the start was not unusual back then look at mplayer.

what so ever for a very very long time.