Author Topic: Using a movie file  (Read 12579 times)

Offline uzelessknowledge

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: Using a movie file
« Reply #30 on: November 01, 2015, 10:09:17 AM »
What is your sequence timing. I've talked to another user that didn't match the frame rate to sequence timing and it caused issues.


Travis
Sent from my iPhone using Tapatalk

Offline sean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1727
    • View Profile
    • Xlights and Nutcracker Forum
Re: Using a movie file
« Reply #31 on: November 01, 2015, 10:17:21 AM »
 Mp4's are normally 29.97 fps . If you dont change the frame rate we will play the 30 frames per sec back at 20 fps. This means they appear 50% slowed down. To fix this u ay them back at 1.5 speed. If u use the -r option the 29.97fps movie is changed to 20fps. Now playback should be at 1.0 in xl4. It seems your "-r 20" did not work. Be sure u specify it before the "-i". Ffmpeg -r 20 -i frozen.mp4 -s 30x30 fff-%d.png


Sent from my iPhone using Tapatalk
Sean
Littleton, CO
Latest releases http://nutcracker123.com/nutcracker/releases
xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php
Fbook [url=https://www.facebook.com/groups/62

Offline drlucas

  • Sr. Member
  • ****
  • Posts: 321
    • View Profile
Re: Using a movie file
« Reply #32 on: November 01, 2015, 07:39:15 PM »
. Now playback should be at 1.0 in xl4. It seems your "-r 20" did not work. Be sure u specify it before the "-i". Ffmpeg -r 20 -i frozen.mp4 -s 30x30 fff-%d.png

/quote]

This is the command I used...

 ../../Desktop/ffmpeg -r 20 -i thriller.mp4 -s 128x96 thrill-%d.png

The version of ffmpeg i'm using is list below. Maybe I need a different version? 
fmpeg version 2.4.3-tessus Copyright (c) 2000-2014 the FFmpeg developers

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Using a movie file
« Reply #33 on: November 01, 2015, 07:39:23 PM »
I just created 5 videos for my P10 panel that I played last night for Halloween and the -r 20 was working fine.  You need to create a 50ms sequence to use the -r 20 frames and it works fine with 1.0 speed.

Sean why do you think -r needs to come first....I don't do it that way and it works fine.  This is the command line I used for all mine:
ffmpeg -i ItsHalloween.mp4 -r 20 -s 128x80 fr-%d.png

Offline drlucas

  • Sr. Member
  • ****
  • Posts: 321
    • View Profile
Re: Using a movie file
« Reply #34 on: November 09, 2015, 08:15:50 PM »
So I grabbed the latest ffmpeg and tried again with another video file. Once again I need to set the frame adjust rate to 1.5 for it to play correctly. I attached my xml files if anyone wants to look at the files. Not a huge issue, but just I'm not seeing the same things you guys are seeing.
Code: [Select]
MacBook:bells-muppets ryanlucas$ ffmpeg -r 20 -i TheMuppets_converted.mp4 -s 128x96 mupp-%d.png
ffmpeg version 2.8.1 Copyright (c) 2000-2015 the FFmpeg developers
  built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
  configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --enable-libvidstab --enable-libx265 --disable-doc --arch=x86_64 --enable-runtime-cpudetect
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[mpeg4 @ 0x7fefe400e200] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'TheMuppets_converted.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: mp42
    creation_time   : 2015-11-10 02:24:11
    media_type      : 9
    season_number   : 1
    episode_sort    : 1
    hd_video        : 0
    iTunMOVI        : <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"  "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>studio</key><string>studio</string><key>cast</key><array><dict><key>name<
  Duration: 00:01:09.10, start: 0.000000, bitrate: 5179 kb/s
    Stream #0:0(eng): Video: mpeg4 (Simple Scalable Profile) (mp4v / 0x7634706D), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 5048 kb/s, 30 fps, 30 tbr, 90k tbn, 30 tbc (default)
    Metadata:
      creation_time   : 2015-11-10 02:24:11
      handler_name    : VideoHandler
      encoder         : xvid
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      creation_time   : 2015-11-10 02:24:11
      handler_name    : SoundHandler
Output #0, image2, to 'mupp-%d.png':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: mp42
    iTunMOVI        : <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"  "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>studio</key><string>studio</string><key>cast</key><array><dict><key>name<
    media_type      : 9
    season_number   : 1
    episode_sort    : 1
    hd_video        : 0
    encoder         : Lavf56.40.101
    Stream #0:0(eng): Video: png, rgb24, 128x96 [SAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 20 fps, 20 tbn, 20 tbc (default)
    Metadata:
      creation_time   : 2015-11-10 02:24:11
      handler_name    : VideoHandler
      encoder         : Lavc56.60.100 png
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> png (native))
Press [q] to stop, [?] for help
[mpeg4 @ 0x7fefe4836800] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag
frame= 2072 fps=566 q=-0.0 Lsize=N/A time=00:01:43.60 bitrate=N/A   
video:62134kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Offline JonB256

  • Hero Member
  • *****
  • Posts: 832
    • View Profile
    • My Christmas Website
Re: Using a movie file
« Reply #35 on: January 15, 2016, 11:14:02 AM »
So I grabbed the latest ffmpeg and tried again with another video file. Once again I need to set the frame adjust rate to 1.5 for it to play correctly. ...

I know this is "older" and too late for Christmas, but saw it while looking for something else.

I had the same "adjust rate to 1.5" problem and it was because my source video was 30 fps. You converted it to 20 fps.  20 * 1.5 = 30

That was what I convinced myself of, anyway

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Using a movie file
« Reply #36 on: January 15, 2016, 03:11:39 PM »
The whole idea of telling ffmpeg to do -r 20 is to create images that can be flipped at that rate to produce the original video.

Offline JonB256

  • Hero Member
  • *****
  • Posts: 832
    • View Profile
    • My Christmas Website
Re: Using a movie file
« Reply #37 on: January 15, 2016, 06:37:54 PM »
The video I converted looked fine but wouldn't sync with the audio without the 1.5 rate.

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Using a movie file
« Reply #38 on: January 15, 2016, 07:02:09 PM »
I would say ffmpeg didn't work right then.

Offline JonB256

  • Hero Member
  • *****
  • Posts: 832
    • View Profile
    • My Christmas Website
Re: Using a movie file
« Reply #39 on: January 15, 2016, 10:22:42 PM »
I will get plenty of opportunity to try again.
2016 will (if I get it all built) will have a LOT of pixel/matrix space.

1 40x30 bullet pixel panel
1 3x3 P10 panel
2 48x192 P10 panels
1 pixel mega tree, 270degree, 36 strands, 100 per strand

(over 60,000 channels - time to get busy with xLights)

Offline mararunr

  • Sr. Member
  • ****
  • Posts: 271
    • View Profile
    • Bentonville Heart Lites
Re: Using a movie file
« Reply #40 on: January 16, 2016, 06:27:49 AM »
I will get plenty of opportunity to try again.
2016 will (if I get it all built) will have a LOT of pixel/matrix space.

1 40x30 bullet pixel panel
1 3x3 P10 panel
2 48x192 P10 panels
1 pixel mega tree, 270degree, 36 strands, 100 per strand

(over 60,000 channels - time to get busy with xLights)


And I'm sure there will be something new this year that we haven't even heard about yet that we will all want to add to our displays as well - don't forget to add time for building that  :D
Bentonville Heart Lites (www.facebook.com/bheartlites)