Python Forum
Select correct item from list for subprocess command
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Select correct item from list for subprocess command
#2
In the line
subprocess.run(['ffmpeg', '-i', f2, '-ss', '00:00:02', '-vframes', '1', f'{file.name.split(".")[0]}.png'])
file will be the last file asigned in the loop by location as it has not been defined as anything since then.

In the line
f2 = list1[int(f1)]
f2 has been assigned as the chosen item from the list and then nothing is done with it.
Reply


Messages In This Thread
RE: Select correct item from list for subprocess command - by Yoriz - Jul-24-2020, 06:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Get an FFMpeg pass to subprocess.PIPE to treat list as text file? haihal 2 993 Nov-21-2024, 11:48 PM
Last Post: haihal
  Using subprocess to execute complex command with many arguments medatib531 5 8,264 Apr-27-2023, 02:23 PM
Last Post: medatib531
Lightbulb IMAP select command Linh_lee 2 1,796 Aug-19-2022, 09:11 PM
Last Post: Linh_lee
Question Finding string in list item jesse68 8 3,067 Jun-30-2022, 08:27 AM
Last Post: Gribouillis
  select Eof extension files based on text list of filenames with if condition RolanRoll 1 2,144 Apr-04-2022, 09:29 PM
Last Post: Larz60+
  how to easily create a list of already existing item CompleteNewb 15 5,901 Jan-06-2022, 12:48 AM
Last Post: CompleteNewb
  Remove an item from a list contained in another item in python CompleteNewb 19 8,682 Nov-11-2021, 06:43 AM
Last Post: Gribouillis
  use subprocess on linux\pi wwith a "grep " command korenron 2 11,130 Oct-19-2021, 10:52 AM
Last Post: DeaD_EyE
  deleting select items from a list Skaperen 13 6,652 Oct-11-2021, 01:02 AM
Last Post: Skaperen
  count item in list korenron 8 4,812 Aug-18-2021, 06:40 AM
Last Post: naughtyCat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020