Transcode to avc1 by command line

About encoding, codec settings, muxers and filter usage
Ostsee2
New Cone
New Cone
Posts: 3
Joined: 15 Dec 2023 14:56

Transcode to avc1 by command line

Postby Ostsee2 » 15 Dec 2023 15:10

Hello,
i converted some videos using VLC 3.0.18 Vetinari (using "Media/Conver save/...).
I chose the profile "Video - H.264 + MP3 (MP4)" and did no further changes.

Since I'm lazy I created a Batchfile to convert the files by drag-n-drop and name it as I wish.

Code: Select all

@ECHO OFF REM SETLOCAL ENABLEEXTENSIONS FOR %%A IN (%*) DO ( CALL "%ProgramFiles(x86)%\VideoLan\VLC\vlc.exe" --no-repeat --no-loop -vvv %%A --sout "#transcode {vcodec=h264,vb=1024,acodec=mp4a,ab=192,channels=2,deinterlace}:standard {access=file,mux=ts,dst=%%~dpnA_compressed.mp4}" vlc://quit ) REM PAUSE
When I tried to insert the videos to PowerPoint they behaved differently:
Those from the batch are rejected because of missing codec.
The ones manually converted can be inserted.

I checked the codecs and found a difference:
All videos have the codec shown: "H264 - MPEG-4 AVC (part10)"
the ones manually created have the appendix "(avc1)"; those from the batch "(h264)".
Image
How can I convince the batchfile to do the same thing that I do?

Ostsee2
New Cone
New Cone
Posts: 3
Joined: 15 Dec 2023 14:56

Re: Transcode to avc1 by command line

Postby Ostsee2 » 15 Dec 2023 15:28

I just changed my code from "vcodec=h264" to "vcodec=avc1", but the result is the same.
The codec shown ist "H264 - MPEG-4 AVC (part10) (h264)"

Ostsee2
New Cone
New Cone
Posts: 3
Joined: 15 Dec 2023 14:56

Re: Transcode to avc1 by command line

Postby Ostsee2 » 17 Dec 2023 01:00

I solved the problem.
To see if the codec was known by Windows the Explorer showed the length of the video.
After some testing I found, that removing "mux=ts" in my code was sufficient...and to remove the space character behind transcode to get rid of the quotation marks.

Code: Select all

@ECHO OFF REM SETLOCAL ENABLEEXTENSIONS FOR %%A IN (%*) DO ( CALL "%ProgramFiles(x86)%\VideoLan\VLC\vlc.exe" --no-repeat --no-loop -vvv %%A --sout #transcode{vcodec=h264,vb=1024,acodec=mp4a,ab=192,channels=2,deinterlace}:standard{access=file,dst="%%~dpnA_compressed.mp4"} vlc://quit ) REM PAUSE


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 10 guests