Fwd: Fifo muxer with ISMV output results in corrupted video

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: Fifo muxer with ISMV output results in corrupted video

Louis Geuten
Hello,

I'm using ffmpeg to transcode vod or live content using h264 through the
ISMV protocol.
I have had a few issues with networking recently, and decided to try to use
the fifo muxer to decouple the output I/O from the encoding.

However it seems that the video packets produced by the muxer are not
valid. The audio seems fine.
Saving the file on disk allow me to probe it, and it fails with the
following error:

[extract_extradata @ 0x48c9900] No start code is found.
bonjour/Stream(v-0-1280): Invalid data found when processing input

I have attached the output logs for both commands.

The *fifo* command, which produces corrupt video files *(Job-7-Run-36.err)*
/usr/local/bin/ffmpeg -nostdin -loglevel trace -probesize 20M
-analyzeduration 10M -y -re -stream_loop -1 -i kuro_demo.mp4 -map 0:0 -vf
"scale=1280:720" -pix_fmt yuv420p -preset veryfast -tune zerolatency
-x264opts no-sliced-threads:nal-hrd=cbr:scenecut=0:qpmax=45:keyint=25
-minrate 2600K -maxrate 2600K -bufsize 5200K -b:v:0 2600K -flags +cgop -g
25 -keyint_min 25 -r 25.000000 -c:v:0 libx264 -an -bsf:v dump_extra -f fifo
-fifo_format ismv -queue_size 200 -drop_pkts_on_overflow 1
-attempt_recovery 1 -recovery_wait_time 1 -restart_with_keyframe 1
-format_opts
frag_duration=1920000:movflags=isml+frag_keyframe:write_prft=wallclock:fflags=+genpts
bonjour/Stream(v-0-1280) -map 0:1 -c:a:0 aac -b:a:0 96K -ac 2
-metadata:s:a:0 language=und -bsf:v dump_extra -f fifo -fifo_format ismv
-queue_size 200 -drop_pkts_on_overflow 1 -attempt_recovery 1
-recovery_wait_time 1 -restart_with_keyframe 1 -format_opts
fflags=+genpts:frag_duration=1920000:movflags=isml+frag_keyframe:write_prft=wallclock
bonjour/Stream(a-0-und)

The same command without using the fifo muxer: (*Job-7-Run-37.err*)
/usr/local/bin/ffmpeg -nostdin -loglevel trace -probesize 20M
-analyzeduration 10M -y -re -stream_loop -1 -i kuro_demo.mp4 -map 0:0 -vf
"scale=1280:720" -pix_fmt yuv420p -preset veryfast -tune zerolatency
-x264opts no-sliced-threads:nal-hrd=cbr:scenecut=0:qpmax=45:keyint=25
-minrate 2600K -maxrate 2600K -bufsize 5200K -b:v:0 2600K -flags +cgop -g
25 -keyint_min 25 -r 25.000000 -c:v:0 libx264 -an -f ismv -movflags
isml+frag_keyframe -write_prft wallclock -fflags +genpts -frag_duration
1920000 bonjour/Stream(v-0-1280) -map 0:1 -c:a:0 aac -b:a:0 96K -ac 2
-metadata:s:a:0 language=und -f ismv -fflags +genpts -frag_duration 1920000
-movflags isml+frag_keyframe -write_prft wallclock bonjour/Stream(a-0-und)

I am using the latest git HEAD commit
(44ce333f03e5daf7883147938f74018cec287aec) built from source.

Is there some option I am missing to make the output ISMV file correct ?
Or is this a bug in the fifo muxer ?

Thanks for the help.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

Job-7-Run-37-0.err (155K) Download Attachment
Job-7-Run-36-0.err (396K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fifo muxer with ISMV output results in corrupted video

Louis Geuten
Hello,

It seems that using the argument "-flags +global_header" with the bitstream
filter "dump_extra" fixes the issue.
Why this isn't needed when directly muxing with ISMV instead of fifo is
beyond me.


On Tue, 23 Jun 2020 at 12:03, Louis Geuten <[hidden email]>
wrote:

> Hello,
>
> I'm using ffmpeg to transcode vod or live content using h264 through the
> ISMV protocol.
> I have had a few issues with networking recently, and decided to try to
> use the fifo muxer to decouple the output I/O from the encoding.
>
> However it seems that the video packets produced by the muxer are not
> valid. The audio seems fine.
> Saving the file on disk allow me to probe it, and it fails with the
> following error:
>
> [extract_extradata @ 0x48c9900] No start code is found.
> bonjour/Stream(v-0-1280): Invalid data found when processing input
>
> I have attached the output logs for both commands.
>
> The *fifo* command, which produces corrupt video files
> *(Job-7-Run-36.err)*
> /usr/local/bin/ffmpeg -nostdin -loglevel trace -probesize 20M
> -analyzeduration 10M -y -re -stream_loop -1 -i kuro_demo.mp4 -map 0:0 -vf
> "scale=1280:720" -pix_fmt yuv420p -preset veryfast -tune zerolatency
> -x264opts no-sliced-threads:nal-hrd=cbr:scenecut=0:qpmax=45:keyint=25
> -minrate 2600K -maxrate 2600K -bufsize 5200K -b:v:0 2600K -flags +cgop -g
> 25 -keyint_min 25 -r 25.000000 -c:v:0 libx264 -an -bsf:v dump_extra -f fifo
> -fifo_format ismv -queue_size 200 -drop_pkts_on_overflow 1
> -attempt_recovery 1 -recovery_wait_time 1 -restart_with_keyframe 1
> -format_opts
> frag_duration=1920000:movflags=isml+frag_keyframe:write_prft=wallclock:fflags=+genpts
> bonjour/Stream(v-0-1280) -map 0:1 -c:a:0 aac -b:a:0 96K -ac 2
> -metadata:s:a:0 language=und -bsf:v dump_extra -f fifo -fifo_format ismv
> -queue_size 200 -drop_pkts_on_overflow 1 -attempt_recovery 1
> -recovery_wait_time 1 -restart_with_keyframe 1 -format_opts
> fflags=+genpts:frag_duration=1920000:movflags=isml+frag_keyframe:write_prft=wallclock
> bonjour/Stream(a-0-und)
>
> The same command without using the fifo muxer: (*Job-7-Run-37.err*)
> /usr/local/bin/ffmpeg -nostdin -loglevel trace -probesize 20M
> -analyzeduration 10M -y -re -stream_loop -1 -i kuro_demo.mp4 -map 0:0 -vf
> "scale=1280:720" -pix_fmt yuv420p -preset veryfast -tune zerolatency
> -x264opts no-sliced-threads:nal-hrd=cbr:scenecut=0:qpmax=45:keyint=25
> -minrate 2600K -maxrate 2600K -bufsize 5200K -b:v:0 2600K -flags +cgop -g
> 25 -keyint_min 25 -r 25.000000 -c:v:0 libx264 -an -f ismv -movflags
> isml+frag_keyframe -write_prft wallclock -fflags +genpts -frag_duration
> 1920000 bonjour/Stream(v-0-1280) -map 0:1 -c:a:0 aac -b:a:0 96K -ac 2
> -metadata:s:a:0 language=und -f ismv -fflags +genpts -frag_duration 1920000
> -movflags isml+frag_keyframe -write_prft wallclock bonjour/Stream(a-0-und)
>
> I am using the latest git HEAD commit
> (44ce333f03e5daf7883147938f74018cec287aec) built from source.
>
> Is there some option I am missing to make the output ISMV file correct ?
> Or is this a bug in the fifo muxer ?
>
> Thanks for the help.
>


--

___________________________________________________
Louis Geuten - Developper
Skype: orygin9

*Freecaster - Belgium sprl*
mobile: +32 494 08 82 80
15 rue des Phlox - 5100 Nannine - Namur, Belgium
VAT: BE0467 231 677

*Freecaster - France sarl*
9 cité du Paradis
75010 Paris, France
TVA: FR32 824 896 575
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Fifo muxer with ISMV output results in corrupted video

Gyan Doshi-2


On 25-06-2020 05:17 pm, Louis Geuten wrote:
> Hello,
>
> It seems that using the argument "-flags +global_header" with the bitstream
> filter "dump_extra" fixes the issue.
> Why this isn't needed when directly muxing with ISMV instead of fifo is
> beyond me.

Each muxer has a list of flags; those relevant to encoders are conveyed
by ffmpeg to that encoder.

The fifo muxer isn't a muxer per-se but an intermediary layer dressed up
as a muxer. It won't necessarily share the relevant flags with the child
muxer, so they have to be manually set by the user.

Gyan
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Fifo muxer with ISMV output results in corrupted video

andrei ka
pretty messy command with a few redundancies,  but the funniest one -an and
-c:a combo

Le jeu. 25 juin 2020 à 14:35, Gyan Doshi <[hidden email]> a écrit :

>
>
> On 25-06-2020 05:17 pm, Louis Geuten wrote:
> > Hello,
> >
> > It seems that using the argument "-flags +global_header" with the
> bitstream
> > filter "dump_extra" fixes the issue.
> > Why this isn't needed when directly muxing with ISMV instead of fifo is
> > beyond me.
>
> Each muxer has a list of flags; those relevant to encoders are conveyed
> by ffmpeg to that encoder.
>
> The fifo muxer isn't a muxer per-se but an intermediary layer dressed up
> as a muxer. It won't necessarily share the relevant flags with the child
> muxer, so they have to be manually set by the user.
>
> Gyan
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Fifo muxer with ISMV output results in corrupted video

Louis Geuten
In reply to this post by Gyan Doshi-2
Hello,

Gyan, I understand the fifo pseudo-muxer doesn't forward everything to the
muxer behind it, but shouldn't this flag be set too when not using fifo ?
Or is it detected somewhere and added directly ?
I had to dive into the source code to find why there wasn't any extradata
populated that the muxer could use properly.

Anyway thanks for your reply.

Louis

On Thu, 25 Jun 2020 at 14:35, Gyan Doshi <[hidden email]> wrote:

>
>
> On 25-06-2020 05:17 pm, Louis Geuten wrote:
> > Hello,
> >
> > It seems that using the argument "-flags +global_header" with the
> bitstream
> > filter "dump_extra" fixes the issue.
> > Why this isn't needed when directly muxing with ISMV instead of fifo is
> > beyond me.
>
> Each muxer has a list of flags; those relevant to encoders are conveyed
> by ffmpeg to that encoder.
>
> The fifo muxer isn't a muxer per-se but an intermediary layer dressed up
> as a muxer. It won't necessarily share the relevant flags with the child
> muxer, so they have to be manually set by the user.
>
> Gyan
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Fifo muxer with ISMV output results in corrupted video

Louis Geuten
In reply to this post by andrei ka
Hello andrei,

I know the command is a bit messy, but this is not a contradiction.
There are two separate outputs, one for video with the -an, and another
with the audio mapping and an audio codec specified.
AFAIK they are not used together.

These commands are generated "on the fly" from my software, and they can be
used quite a lot of use-cases.
If you have any other useful critique of the command here, please go ahead
and I'll improve it.

Regards,
Louis

On Thu, 25 Jun 2020 at 15:05, andrei ka <[hidden email]> wrote:

> pretty messy command with a few redundancies,  but the funniest one -an and
> -c:a combo
>
> Le jeu. 25 juin 2020 à 14:35, Gyan Doshi <[hidden email]> a écrit :
>
> >
> >
> > On 25-06-2020 05:17 pm, Louis Geuten wrote:
> > > Hello,
> > >
> > > It seems that using the argument "-flags +global_header" with the
> > bitstream
> > > filter "dump_extra" fixes the issue.
> > > Why this isn't needed when directly muxing with ISMV instead of fifo is
> > > beyond me.
> >
> > Each muxer has a list of flags; those relevant to encoders are conveyed
> > by ffmpeg to that encoder.
> >
> > The fifo muxer isn't a muxer per-se but an intermediary layer dressed up
> > as a muxer. It won't necessarily share the relevant flags with the child
> > muxer, so they have to be manually set by the user.
> >
> > Gyan
> > _______________________________________________
> > ffmpeg-user mailing list
> > [hidden email]
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> > [hidden email] with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".