Hi Jakob, the problem is not known to me, so please share the ffmpeg call you are using. Sumo also has a built in video recording feature if you compile it with ffmpeg headers being present. Just check whether it presents the option to save an h264 file when saving the screenshot and if so use that ending to trigger video recording. It is still experimental, though.
Best regards,
Michael
Am 20.06.19 um 10:07 schrieb Jakob Haahr Taankvist:
> Hi
>
> I would like to create a video capture of a simulation, which can be run
> in real time. To do this I use the Traci screenshot function to make a
> screenshot after every step, effectively my script is this:
>
> defrun_simulation():
> step =0
> whiletraci.simulation.getMinExpectedNumber() >0:
> print(f"SIMULATED {step}seconds")
> # Compute and set the next signal setting
> ...
> print(traci.gui.screenshot("View #0",
> "/tmp/sumosim/img{:07d}-{}.jpg".format(step, datetime.datetime.now())))
> traci.simulationStep()
> step +=1
>
> I then generate a video using the extracted frames using ffmpeg.
>
> My problem is that sometimes the extracted frame jumps back in time, see
> e.g. the attached frames, frame 51 jumps back in time in this case. Am I
> doing something wrong? Is there a better way to create a video of a
> simulation?
>
> I have not see the issue happen in the GUI. I run the simulation as fast
> as possible.
>
> Best regards Jakob Taankvist
>
>
>
>
>
> _______________________________________________
> sumo-user mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
signature.asc
Description: OpenPGP digital signature
_______________________________________________ sumo-user mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
