remux AVI (H.264+MP3) to MP3 causes problems in browser; Missing PTS timestamps

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

remux AVI (H.264+MP3) to MP3 causes problems in browser; Missing PTS timestamps

Ben Stover
I have videos in AVI format which contain MP3 and H.264 encoded videos.

I can play them successfully on my local Windows computer with videoplayers tools like VLC

Now I remux (without new encoding) them with the following ffmpeg command to MP4 container :

Fmpeg.exe  -i test.avi -acodec copy -vcodec copy -map 0 test_out.mp4

I still can play the successfully  on my local Windows computer with videoplayers tools like VLC


Afterwards I uploaded them to a remote server and launched them in browser.

Unfortuntely when I call these videos now in browser then

- Firefox v64.0 plays no audio (only video)
- Chrome plays audio but video is stuttering.

So there is a bug in video remxuing of ffmpeg.

During problem investigation I dragged the MP4 video onto the well know Avidemux converter tool and got the following warning prompt:

"The video contains B-frames, but prestentation time stamp (PTS) are either missing or monotonically increased.
Avidemux can try to reconstruct correct PTS by decoding the entire video. This may take a lot of time. Proceed?"

I clicked OK, then saved (un-reencoded the new MP4), uploaded it again...and playing works in both browser (Firefox and Chrome)
successfuly.

So again: remuxing in ffmpeg has a bug with PTS

Is there a way to remux correctly from AVI to MP4 container?

Thank you
Ben

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: remux AVI (H.264+MP3) to MP3 causes problems in browser; Missing PTS timestamps

Lou Logan
On Thu, Jan 3, 2019, at 11:14 AM, Ben wrote:
>
> Now I remux (without new encoding) them with the following ffmpeg
> command to MP4 container :
>
> Fmpeg.exe  -i test.avi -acodec copy -vcodec copy -map 0 test_out.mp4

We need to see the complete console output from your command to be able to make any suggestions.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: remux AVI (H.264+MP3) to MP3 causes problems in browser; Missing PTS timestamps

Ben Stover
ok, here it is:

ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20181017
  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
--enable-libzimg --ena
ble-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis
--enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex
--enable-libxvid --enable-libaom --enable-libmfx --enable-amf
--enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc
--enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, avi, from 'D:\tmp\test.avi':
  Metadata:
    encoder         : Lavf58.24.100
  Duration: 00:03:06.33, start: 0.000000, bitrate: 2374 kb/s
    Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(tv, bt709,
progressive), 1920x1080 [SAR 1:1 DAR 16:9], 2201 kb/s, 30 fps, 30 tbr, 30
tbn, 60 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp,
144 kb/s
Output #0, mp4, to 'D:\tmp\test_out.mp4':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709,
progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 2201 kb/s, 30 fps, 30
tbr, 15360 tbn, 30 tbc
    Stream #0:1: Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 144
kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mp4 @ 00000000003554c0] Timestamps are unset in a packet for stream 0. This
is deprecated and will stop working in the future. Fix your code to set the
timestamps properly
[mp4 @ 00000000003554c0] pts has no value
    Last message repeated 340 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:00:11.36
bitrate=2214.0kbits/s speed=22.7x
    Last message repeated 344 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:00:22.86
bitrate=2201.1kbits/s speed=22.8x
    Last message repeated 345 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:00:34.40
bitrate=2255.7kbits/s speed=22.9x
    Last message repeated 346 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:00:45.96
bitrate=2281.2kbits/s speed=  23x
    Last message repeated 345 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:00:57.50
bitrate=2297.8kbits/s speed=  23x
    Last message repeated 346 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:01:09.06
bitrate=2307.7kbits/s speed=  23x
    Last message repeated 346 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:01:20.63
bitrate=2288.8kbits/s speed=  23x
    Last message repeated 345 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:01:32.16
bitrate=2275.4kbits/s speed=  23x
    Last message repeated 346 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:01:43.73
bitrate=2284.5kbits/s speed=  23x
    Last message repeated 346 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:01:55.30
bitrate=2291.8kbits/s speed=  23x
    Last message repeated 346 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:02:06.86
bitrate=2297.7kbits/s speed=  23x
    Last message repeated 346 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:02:18.43
bitrate=2302.7kbits/s speed=  23x
    Last message repeated 343 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:02:29.90
bitrate=2308.4kbits/s speed=  23x
    Last message repeated 347 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:02:41.50
bitrate=2298.4kbits/s speed=  23x
    Last message repeated 344 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:02:53.00
bitrate=2327.5kbits/s speed=  23x
    Last message repeated 342 times
[mp4 @ 00000000003554c0] pts has no valueB time=00:03:04.43
bitrate=2353.8kbits/s speed=  23x
    Last message repeated 54 times
[mp4 @ 00000000003554c0] pts has no value
    Last message repeated 1 times
frame= 5590 fps=689 q=-1.0 Lsize=   53843kB time=00:03:06.30
bitrate=2367.6kbits/s speed=  23x
video:50057kB audio:3638kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.276332%




--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: remux AVI (H.264+MP3) to MP3 causes problems in browser; Missing PTS timestamps

Carl Eugen Hoyos-2
In reply to this post by Ben Stover
2019-01-03 21:14 GMT+01:00, Ben <[hidden email]>:

> I have videos in AVI format which contain MP3 and H.264 encoded videos.
>
> I can play them successfully on my local Windows computer with videoplayers
> tools like VLC
>
> Now I remux (without new encoding) them with the following ffmpeg command to
> MP4 container :
>
> Fmpeg.exe  -i test.avi -acodec copy -vcodec copy -map 0 test_out.mp4
>
> I still can play the successfully  on my local Windows computer with
> videoplayers tools like VLC
>
>
> Afterwards I uploaded them to a remote server and launched them in browser.
>
> Unfortuntely when I call these videos now in browser then
>
> - Firefox v64.0 plays no audio (only video)

Does Firefox support mp3-in-isom?

> - Chrome plays audio but video is stuttering.

Does it work if you use MP4Box to remux?

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: remux AVI (H.264+MP3) to MP3 causes problems in browser; Missing PTS timestamps

Ben Stover
Hello Carl Eugen

Sorry for the questions:

What means "mp3-in-isom"?

How do I use an "MP4Box" to remux with ffmpeg?

Ben



--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: remux AVI (H.264+MP3) to MP3 causes problems in browser; Missing PTS timestamps

Carl Eugen Hoyos-2
2019-01-09 11:17 GMT+01:00, Ben <[hidden email]>:

> What means "mp3-in-isom"?

It means an isom (mp4) file containing mp3.

> How do I use an "MP4Box" to remux with ffmpeg?

You cannot, MP4Box is a program that allows remuxing to mp4.

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

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