Question about Wiki (sorry)

Discussion about forum rules, new moderators, website content, website layout, VideoLAN artwork etc..
Forum rules
Please read the forum's rules carefully before posting. This forum should not be used to post VLC usage related questions.
JBdupris
New Cone
New Cone
Posts: 1
Joined: 15 Aug 2019 20:20

Question about Wiki (sorry)

Postby JBdupris » 15 Aug 2019 20:38

Hello everyone,

Sorry for the post but I wanted to update the batch script on the Wiki for converting files (https://wiki.videolan.org/VLC_HowTo/Transcode_multiple_videos/) and attempted to make a user account as suggested on the wiki,
"This website is a Wiki, so please edit it! Please keep content appropriate and useful.
To modify the contents of this wiki, you need to create an account, which is very fast."

I then searched the forums and saw that people were suggesting that the wiki registration was locked as VLC was moving to a Git online repo.

Then I got tired as this is my first time trying to help update something so registered a Forum account and posted here (hope it's the right place).

~~~~~

Proposed WIKI change to: https://wiki.videolan.org/VLC_HowTo/Transcode_multiple_videos/

Under the section: "Unix / Linux", first code block (the bash script) in the for loop when it calls VLC the VLC --sout flag is not evaluated with single quotes (perhaps because I am on a Mac (10.14.6) using VLC version 3.0.7.1) so I updated the bash script to evaluate it and then the script worked. I believe this change does not break anything and should work across bash versions. Specifically, changing the following change resolved the issue for me,

Code: Select all

"$vlc" -I dummy -q "$filename" \ --sout '#transcode{vcodec="$vcodec",vb="$vb",acodec="$acodec",ab="$ab"}:standard{mux="$mux",dst="$filename.transcoded",access=file}' \ vlc://quit

to

Code: Select all

soutvar="#transcode{vcodec="$vcodec",vb="$vb",acodec="$acodec",ab="$ab"}:standard{mux="$mux",dst="$filename.transcoded",access=file}" "$vlc" -I dummy -q "$filename" \ --sout "$soutvar" \ vlc://quit

The code block (bash script) then becomes:

Code: Select all

#!/bin/sh ######################## Transcode the files using ... ######################## vcodec="mp4v" acodec="mp4a" vb="1024" ab="128" mux="mp4" ############################################################################### # Store path to VLC in $vlc if command -pv vlc >/dev/null 2>&1; then # Linux should find "vlc" when searching PATH vlc="vlc" else # macOS seems to need an alias vlc="/Applications/VLC.app/Contents/MacOS/VLC" fi # Sanity check if ! command -pv "$vlc" >/dev/null 2>&1; then printf '%s\n' "Cannot find path to VLC. Abort." >&2 exit 1 fi for filename in *; do printf '%s\n' "=> Transcoding '$filename'... " soutvar="#transcode{vcodec="$vcodec",vb="$vb",acodec="$acodec",ab="$ab"}:standard{mux="$mux",dst="$filename.transcoded",access=file}" "$vlc" -I dummy -q "$filename" \ --sout "$soutvar" \ vlc://quit ls -lh "$filename" "$filename.transcoded" printf '\n' done

Return to “Forum, Website and Artwork discussion”

Who is online

Users browsing this forum: No registered users and 31 guests