Re: [FFmpeg-user] Problem with videos not playing in mobile browser

2022-06-28 Thread Cecil Westerhof via ffmpeg-user
"Dr Mark A. Garlick"  writes:

> Dear all
>
> I am new to this forum.
>
> I have noticed that some of my videos, encoded with ffmpeg and uploaded
> to my websites, do not play on mobile web browsers, but they work 
> perfectly well on desktop browsers on my Linux machine. I get either a
> message saying 'file is corrupted' or no message at all (just a blank 
> video) depending on the browser. I've tried Brave, Firefox and Chrome,
> on an iPhone, a Samsung tablet and a Samsung Galaxy s10 plus. The 'bad' 
> videos consistently fail to play on mobile devices.

Try it with:
-pix_fmt yuv420p

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Problem with videos not playing in mobile browser

2022-06-28 Thread Paul B Mahol
On Tue, Jun 28, 2022 at 3:44 PM Dr Mark A. Garlick 
wrote:

> Dear all
>
> I am new to this forum.
>
> I have noticed that some of my videos, encoded with ffmpeg and uploaded
> to my websites, do not play on mobile web browsers, but they work
> perfectly well on desktop browsers on my Linux machine. I get either a
> message saying 'file is corrupted' or no message at all (just a blank
> video) depending on the browser. I've tried Brave, Firefox and Chrome,
> on an iPhone, a Samsung tablet and a Samsung Galaxy s10 plus. The 'bad'
> videos consistently fail to play on mobile devices.
>
> I've run an ffprobe on two .mp4 files: one which works on a mobile and
> desktop browser (good.mp4) and one which will only play on a desktop
> browser (bad.mp4. These are partial outputs (the rest of the output for
> the two files seems identical):
>
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bad.mp4':
>Metadata:
>  major_brand : isom
>  minor_version   : 512
>  compatible_brands: isomiso2avc1mp41
>  encoder : Lavf58.76.100
>Duration: 00:00:30.02, start: 0.00, bitrate: 1582 kb/s
>Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661),
> yuv422p10le(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 1574 kb/s, 24 fps,
> 24 tbr, 12288 tbn, 48 tbc (default)
>  Metadata:
>handler_name: VideoHandler
>vendor_id   : [0][0][0][0]
>Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
> stereo, fltp, 2 kb/s (default)
>  Metadata:
>handler_name: SoundHandler
>vendor_id   : [0][0][0][0]
>
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'good.mp4':
>Metadata:
>  major_brand : isom
>  minor_version   : 512
>  compatible_brands: isomiso2avc1mp41
>  encoder : Lavf58.76.100
>Duration: 00:00:30.00, start: 0.00, bitrate: 4824 kb/s
>Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
> bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 4821 kb/s, 24
> fps, 24 tbr, 12288 tbn, 48 tbc (default)
>  Metadata:
>handler_name: VideoHandler
>vendor_id   : [0][0][0][0]
>
> The command I used to encode them both (via a bash scrip on Linux) is
>
> for f in *.mp4
>  do ffmpeg -i "$f"  -vf "drawtext=text='© Mark A. Garlick /
> markgarlick.com':x=w-tw-10:y=10:
> fontfile=/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS.ttf:fontsize=25:fontcolor=white"
>
> -write_tmcd false -s 1280x720 -preset medium -crf 24 "full/${f%.*}.mp4"
> done
>
> Can anybody offer any insight?
>

probably YUV420P vs YUV422P

Some players only supports YUV420P.


>
> My thanks.
>
> --
> Dr Mark A. Garlick  *Dr Mark A. Garlick
>  *   [Follow me on Facebook!]
>  [Follow me on Twitter!]
>  [Follow me on LinkedIn!]
>  [Subscribe on
> YouTube!]  [Follow me on
> Instagram!] 
> Illustrator | Author | Animator
> e: m...@markgarlick.com 
> t:+44 7952 830 945
> w: markgarlick.com 
> w: space-art.co.uk 
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Problem with videos not playing in mobile browser

2022-06-28 Thread Jess Portnoy via ffmpeg-user
Hello,

Could you share a URI for one of these videos?
Also, do they play on mobile before you add the text filter?

Cheers,

--
May the source be with you,

Jess Portnoy

From: ffmpeg-user  on behalf of Dr Mark A. 
Garlick 
Sent: 28 June 2022 14:44
To: ffmpeg-user@ffmpeg.org 
Subject: [FFmpeg-user] Problem with videos not playing in mobile browser

CAUTION: External email - use caution opening links or attachments


Dear all

I am new to this forum.

I have noticed that some of my videos, encoded with ffmpeg and uploaded
to my websites, do not play on mobile web browsers, but they work
perfectly well on desktop browsers on my Linux machine. I get either a
message saying 'file is corrupted' or no message at all (just a blank
video) depending on the browser. I've tried Brave, Firefox and Chrome,
on an iPhone, a Samsung tablet and a Samsung Galaxy s10 plus. The 'bad'
videos consistently fail to play on mobile devices.

I've run an ffprobe on two .mp4 files: one which works on a mobile and
desktop browser (good.mp4) and one which will only play on a desktop
browser (bad.mp4. These are partial outputs (the rest of the output for
the two files seems identical):

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bad.mp4':
   Metadata:
 major_brand : isom
 minor_version   : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.76.100
   Duration: 00:00:30.02, start: 0.00, bitrate: 1582 kb/s
   Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661),
yuv422p10le(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 1574 kb/s, 24 fps,
24 tbr, 12288 tbn, 48 tbc (default)
 Metadata:
   handler_name: VideoHandler
   vendor_id   : [0][0][0][0]
   Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 2 kb/s (default)
 Metadata:
   handler_name: SoundHandler
   vendor_id   : [0][0][0][0]

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'good.mp4':
   Metadata:
 major_brand : isom
 minor_version   : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.76.100
   Duration: 00:00:30.00, start: 0.00, bitrate: 4824 kb/s
   Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 4821 kb/s, 24
fps, 24 tbr, 12288 tbn, 48 tbc (default)
 Metadata:
   handler_name: VideoHandler
   vendor_id   : [0][0][0][0]

The command I used to encode them both (via a bash scrip on Linux) is

for f in *.mp4
 do ffmpeg -i "$f"  -vf "drawtext=text='© Mark A. Garlick /
markgarlick.com':x=w-tw-10:y=10:
fontfile=/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS.ttf:fontsize=25:fontcolor=white"
-write_tmcd false -s 1280x720 -preset medium -crf 24 "full/${f%.*}.mp4"
done

Can anybody offer any insight?

My thanks.

--
Dr Mark A. Garlick  *Dr Mark A. Garlick

 *   [Follow me on Facebook!]

 [Follow me on Twitter!]

 [Follow me on LinkedIn!]

 [Subscribe on
YouTube!] 

 [Follow me on
Instagram!] 

[FFmpeg-user] Problem with videos not playing in mobile browser

2022-06-28 Thread Dr Mark A. Garlick

Dear all

I am new to this forum.

I have noticed that some of my videos, encoded with ffmpeg and uploaded 
to my websites, do not play on mobile web browsers, but they work 
perfectly well on desktop browsers on my Linux machine. I get either a 
message saying 'file is corrupted' or no message at all (just a blank 
video) depending on the browser. I've tried Brave, Firefox and Chrome, 
on an iPhone, a Samsung tablet and a Samsung Galaxy s10 plus. The 'bad' 
videos consistently fail to play on mobile devices.


I've run an ffprobe on two .mp4 files: one which works on a mobile and 
desktop browser (good.mp4) and one which will only play on a desktop 
browser (bad.mp4. These are partial outputs (the rest of the output for 
the two files seems identical):


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bad.mp4':
  Metadata:
    major_brand : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder : Lavf58.76.100
  Duration: 00:00:30.02, start: 0.00, bitrate: 1582 kb/s
  Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), 
yuv422p10le(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 1574 kb/s, 24 fps, 
24 tbr, 12288 tbn, 48 tbc (default)

    Metadata:
  handler_name    : VideoHandler
  vendor_id   : [0][0][0][0]
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 
stereo, fltp, 2 kb/s (default)

    Metadata:
  handler_name    : SoundHandler
  vendor_id   : [0][0][0][0]

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'good.mp4':
  Metadata:
    major_brand : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder : Lavf58.76.100
  Duration: 00:00:30.00, start: 0.00, bitrate: 4824 kb/s
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, 
bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 4821 kb/s, 24 
fps, 24 tbr, 12288 tbn, 48 tbc (default)

    Metadata:
  handler_name    : VideoHandler
  vendor_id   : [0][0][0][0]

The command I used to encode them both (via a bash scrip on Linux) is

for f in *.mp4
    do ffmpeg -i "$f"  -vf "drawtext=text='© Mark A. Garlick / 
markgarlick.com':x=w-tw-10:y=10: 
fontfile=/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS.ttf:fontsize=25:fontcolor=white" 
-write_tmcd false -s 1280x720 -preset medium -crf 24 "full/${f%.*}.mp4"

done

Can anybody offer any insight?

My thanks.

--
Dr Mark A. Garlick 	*Dr Mark A. Garlick 
 * 	[Follow me on Facebook!] 
 [Follow me on Twitter!] 
 [Follow me on LinkedIn!] 
 [Subscribe on 
YouTube!]  [Follow me on 
Instagram!] 

Illustrator | Author | Animator
e: m...@markgarlick.com 
t:+44 7952 830 945
w: markgarlick.com 
w: space-art.co.uk 
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".