Simple stream selection?
See original GitHub issueI’m trying to do some simple stream selection. Using ffmpeg directly, I’d use the map option. However, when trying to do this using ffmpeg-python, I can’t seem to get it correct. The map argument is getting put into a bracket, which doesn’t work.
>>> import ffmpeg
>>> infile = ffmpeg.input('test.mkv')
>>> stream = infile['1']
>>> outfile = ffmpeg.output(stream, 'test-out.mkv')
>>> ffmpeg.compile(outfile)
['ffmpeg', '-i', 'test.mkv', '-map', '[0:1]', 'test-out.mkv']
This fails with the error Output with label '0:1' does not exist in any defined filter graph, or was already used elsewhere.
What is the proper way to do stream selection when you don’t need complex video graphs?
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Simplestream
Award-winning and best-in-class provider of next-generation TV solutions and OTT services to some of the biggest players in the broadcast, sport, and media ......
Read more >The ultimate live streaming guide for beginners | Livestream
Don't pause your dreams to live stream. Check out our beginner's guide on how to live stream and the equipment you need to...
Read more >Live Streaming Setup: The Only Guide Beginners Will Ever ...
About to make your livestreaming debut? Try Lightstream Studio 2. It's easy to use, no downloads are required, and you'll look professional.
Read more >How to Start Streaming: Ultimate Guide - Restream
Use these tips to promote your live stream. What is a basic streaming setup? Live streaming setup. As a beginner, you need four...
Read more >8 OBS tips to make your stream run smoothly
When NVENC/VCE/QSV is selected this will use your graphics card to do your encoding ... You can set your Video Bitrate in Settings...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@whichken I think your example syntax in the first comment makes the most sense:
And similarly for multiple streams:
I consider it a bug that
-map [0:1]
is produced instead of-map 0:1
. Will try to make a fix soon.Or perhaps eventually this shorthand would make things simpler:
or fluently:
The
[]
operator would basically take either a single identifier (e.g.['v']
) or a list of identifiers (e.g.[[1, 2]]
). This is similar to how a library like Pandas operates.