Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 17 Jan 2020, 11:56
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Code to cut video / audio not working in Linux Mint
Post new topic   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
achim

Joined: 13 Apr 2017
Posts: 48
Location: Germany

PostPosted: Sat 06 Apr 2019, 11:47    Post subject:  Code to cut video / audio not working in Linux Mint  

Hello,

I have a code here to cut video or audio files. Unfortunately he is not running correctly. Can someone help me with this?

My system is Linux Mint 18.3 Cinnamon - 64 bit

Thanks in advance.

achim

Code:
#!/bin/bash
INPUT=$(yad --width=600 --height=400 --file-selection --file-filter='*.mp3 *.mp4 *.avi') eval $(yad --width=400 --form --field=start --field=end --field=output:SFL "00:00:00" "00:00:00" "${INPUT/%.*}-out.${INPUT##*.}" | awk -F'|' '{printf "START=%s\nEND=%s\nOUTPUT=\"%s\"\n", $1, $2, $3}') [[ -z $START || -z $END || -z $OUTPUT ]] && exit 1 DIFF=$(($(date +%s --date="$END")-$(date +%s --date="$START"))) OFFSET=""$(($DIFF / 3600)):$(($DIFF / 60 % 60)):$(($DIFF % 60)) ffmpeg -ss "$START" -t "$OFFSET" -i "$INPUT" "$OUTPUT"
Back to top
View user's profile Send private message 
achim

Joined: 13 Apr 2017
Posts: 48
Location: Germany

PostPosted: Sat 06 Apr 2019, 12:12    Post subject: Re: to cut video / audio  

achim wrote:
Hello,

I have a code here to cut video or audio files. Unfortunately he is not running correctly. Can someone help me with this?

My system is Linux Mint 18.3 Cinnamon - 64 bit

Thanks in advance.

achim

Code:
#!/bin/bash
INPUT=$(yad --width=600 --height=400 --file-selection --file-filter='*.mp3 *.mp4 *.avi') eval $(yad --width=400 --form --field=start --field=end --field=output:SFL "00:00:00" "00:00:00" "${INPUT/%.*}-out.${INPUT##*.}" | awk -F'|' '{printf "START=%s\nEND=%s\nOUTPUT=\"%s\"\n", $1, $2, $3}') [[ -z $START || -z $END || -z $OUTPUT ]] && exit 1 DIFF=$(($(date +%s --date="$END")-$(date +%s --date="$START"))) OFFSET=""$(($DIFF / 3600)):$(($DIFF / 60 % 60)):$(($DIFF % 60)) ffmpeg -ss "$START" -t "$OFFSET" -i "$INPUT" "$OUTPUT"


Hello presenters,

Unfortunately, I have positioned this post incorrectly. Please move it to: Programming - YAD - Tips.

Many Thanks.

achim
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 4249
Location: holland

PostPosted: Sat 06 Apr 2019, 13:07    Post subject:  

Hi achim, replied in the YAD - Tips thread : http://murga-linux.com/puppy/viewtopic.php?p=1024471#1024471

Fred

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0282s ][ Queries: 12 (0.0042s) ][ GZIP on ]