Opened 3 weeks ago

Closed 3 weeks ago

#7509 closed enhancement (wontfix)

split/aplit: don't work with elementary streams

Reported by: msiders Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: split, mpegts, elementary
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

% ffmpeg \
 -f mpegts -i file.ts \
 -filter_complex "[i:100]split[out0][out1];" \
 -map [out0] [out1] -map i:101 \
 -c:0 copy \
 -c:1 copy \
 -c:2 copy \
 -f mpegts file-out.ts

Hi,

In the example above you open one MPEG-TS with two elementary streams: PID 100 with video and PID 101 with audio.

Then if you like to duplicate the video stream without processing it, then you see one error like:

[AVFilterGraph @ 00000253f2dc7500] No such filter: ''

The same if you use the "asplit" with the audio stream.

This isn't the expected behaviour, as when you're copying a valid stream, it has sense to "duplicate" the stream.

Please, can you fix/enhance the filters to support this functionality?
Thank you!

Change History (8)

comment:1 Changed 3 weeks ago by richardpl

  • Resolution set to invalid
  • Status changed from new to closed

Remove unneeded ";"

comment:2 Changed 3 weeks ago by msiders

Sorry for the typo!

% ffmpeg \
 -f mpegts -i file.ts \
 -filter_complex "[i:100]split[out0][out1]" \
 -map [out0] [out1] -map i:101 \
 -c:0 copy \
 -c:1 copy \
 -c:2 copy \
 -f mpegts file-out.ts

However, in this case the error is:

[NULL @ 000001dae94354c0] Unable to find a suitable output format for '[out1]'

comment:3 Changed 3 weeks ago by msiders

Futhermore if you remove the [out1] from the "-map" command, then a new error appears:

Streamcopy requested for output stream 0:0, which is fed from a complex filtergraph. Filtering and streamcopy cannot be used togeth
er.

Please, reopen the ticket, as "duplicate" an Elementary Stream isn't supported at time!

comment:4 Changed 3 weeks ago by Gyan

Your command is invalid. It should be,

  ffmpeg \
 -f mpegts -i file.ts \
 -filter_complex "[i:100]split[out0][out1]" \
 -map [out0] -map [out1] -map i:101 \
 -c:2 copy \
 -f mpegts file-out.ts

A filtered stream cannot be streamcopied. This is not a bug.

comment:5 Changed 3 weeks ago by msiders

  • Resolution invalid deleted
  • Status changed from closed to reopened

comment:6 Changed 3 weeks ago by msiders

Hi Gyan,

With your suggestion:

  ffmpeg \
 -f mpegts -i file.ts \
 -filter_complex "[i:100]split[out0][out1]" \
 -map [out0] -map [out1] -map i:101 \
 -c:2 copy \
 -f mpegts file-out.ts

you only put the audio without processing in the output. The other two video streams are re-encoded!

Regarding the sentence: "A filtered stream cannot be streamcopied".
I know that this is true at time. But it has sense in several scenarios. For example: If you like to do some processing but leave a copy of the original stream in the output.

Please, don't mark this as "invalid". Almost put it as "enhancement".
Thank you!

comment:7 Changed 3 weeks ago by msiders

  • Type changed from defect to enhancement

comment:8 Changed 3 weeks ago by richardpl

  • Resolution set to wontfix
  • Status changed from reopened to closed

This is not user support channel. split/asplit do work with elementary streams.

Note: See TracTickets for help on using tickets.