VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    Hello

    There's a radio show whose first half is available as an MP3 audio file while the second half is available as an MP4 audiovideo file.

    I'd like to combine both into a single MP4 audiovideo file.

    I was thinking of using ffmpeg.exe to create an MP4 file from the MP3 + JPG file with the exact same audiovideo parameters as the MP4 file, and use "My MP4Box GUI" to join the two files into a single MP4 file.

    Does it look like a good idea?

    Thank you.

    PS: Here's what MediaInfo says about the two input files:
    Audio
    Code:
    General
    Complete name                            : C:\first.half.mp3
    Format                                   : MPEG Audio
    File size                                : 9.50 MiB
    Duration                                 : 10mn 22s
    Overall bit rate mode                    : Constant
    Overall bit rate                         : 128 Kbps
    Writing library                          : LAME3.99r
    
    Audio
    Format                                   : MPEG Audio
    Format version                           : Version 1
    Format profile                           : Layer 3
    Mode                                     : Joint stereo
    Duration                                 : 10mn 22s
    Bit rate mode                            : Constant
    Bit rate                                 : 128 Kbps
    Channel(s)                               : 2 channels
    Sampling rate                            : 48.0 KHz
    Compression mode                         : Lossy
    Stream size                              : 9.50 MiB (100%)
    Writing library                          : LAME3.99r
    Encoding settings                        : -m j -V 4 -q 3 -lowpass 17 -b 128
    Video
    Code:
    General
    Complete name                            : C:\second.half.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom
    File size                                : 118 MiB
    Duration                                 : 19mn 41s
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 835 Kbps
    Tagged date                              : UTC 2014-04-17 08:37:51
    Writing application                      : Lavf55.19.104
    
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L3.0
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 4 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 19mn 41s
    Bit rate                                 : 700 Kbps
    Width                                    : 848 pixels
    Height                                   : 480 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Constant
    Frame rate                               : 25.000 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.069
    Stream size                              : 98.5 MiB (84%)
    Writing library                          : x264 core 140 r2377M 1ca7bb9
    
    Audio
    ID                                       : 2
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 40
    Duration                                 : 19mn 41s
    Duration_LastFrame                       : -11ms
    Bit rate mode                            : Variable
    Bit rate                                 : 128 Kbps
    Maximum bit rate                         : 800 Kbps
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 44.1 KHz
    Compression mode                         : Lossy
    Stream size                              : 18.0 MiB (15%)
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Sounds like a decent method to me.

    Scott
    Quote Quote  
  3. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    I must be using the wrong settings in ffmpeg, because the two MP4 files aren't compatible so can't be joined with either MP4Joiner or My MP4Box GUI

    Turning MP3 into MP4 video:
    Code:
    INPUT
    Complete name                            : C:\first.half.mp3
    Format                                   : MPEG Audio
    File size                                : 9.50 MiB
    Duration                                 : 10mn 22s
    Overall bit rate mode                    : Constant
    Overall bit rate                         : 128 Kbps
    Writing library                          : LAME3.99r
    
    Audio
    Format                                   : MPEG Audio
    Format version                           : Version 1
    Format profile                           : Layer 3
    Mode                                     : Joint stereo
    Duration                                 : 10mn 22s
    Bit rate mode                            : Constant
    Bit rate                                 : 128 Kbps
    Channel(s)                               : 2 channels
    Sampling rate                            : 48.0 KHz
    Compression mode                         : Lossy
    Stream size                              : 9.50 MiB (100%)
    Writing library                          : LAME3.99r
    Encoding settings                        : -m j -V 4 -q 3 -lowpass 17 -b 128
    
    ffmpeg.exe -loop 1 -i speaker.png -i first.half.mp3  -shortest -vf scale=640:480 -c:v libx264 -tune stillimage -c:a copy radio.show.first.half.mp4
    
    OUTPUT
    Complete name                            : C:\radio.show.first.half.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom
    File size                                : 13.3 MiB
    Duration                                 : 10mn 24s
    Overall bit rate                         : 178 Kbps
    Writing application                      : Lavf55.35.101
    
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High 4:4:4 Predictive@L3.0
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 4 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 10mn 24s
    Bit rate                                 : 45.2 Kbps
    Width                                    : 640 pixels
    Height                                   : 480 pixels
    Display aspect ratio                     : 4:3
    Frame rate mode                          : Constant
    Frame rate                               : 25.000 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:4:4
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.006
    Stream size                              : 3.36 MiB (25%)
    Writing library                          : x264 core 142 r2409 d6b4e63
    Encoding settings                        : cabac=1 / ref=3 / deblock=1:-3:-3 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=2.00:0.70 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=2 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.20
    
    Audio
    ID                                       : 2
    Format                                   : MPEG Audio
    Format version                           : Version 1
    Format profile                           : Layer 3
    Mode                                     : Joint stereo
    Mode extension                           : MS Stereo
    Codec ID                                 : 6B
    Duration                                 : 10mn 22s
    Bit rate mode                            : Constant
    Bit rate                                 : 128 Kbps
    Channel(s)                               : 2 channels
    Sampling rate                            : 48.0 KHz
    Compression mode                         : Lossy
    Stream size                              : 9.50 MiB (72%)
    Converting MP4 to identical settings found in first file:
    Code:
    INPUT
    Complete name                            : C:\second.half.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom
    File size                                : 118 MiB
    Duration                                 : 19mn 41s
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 835 Kbps
    Tagged date                              : UTC 2014-04-17 08:37:51
    Writing application                      : Lavf55.19.104
    
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L3.0
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 4 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 19mn 41s
    Bit rate                                 : 700 Kbps
    Width                                    : 848 pixels
    Height                                   : 480 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Constant
    Frame rate                               : 25.000 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.069
    Stream size                              : 98.5 MiB (84%)
    Writing library                          : x264 core 140 r2377M 1ca7bb9
    
    Audio
    ID                                       : 2
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 40
    Duration                                 : 19mn 41s
    Duration_LastFrame                       : -11ms
    Bit rate mode                            : Variable
    Bit rate                                 : 128 Kbps
    Maximum bit rate                         : 800 Kbps
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 44.1 KHz
    Compression mode                         : Lossy
    Stream size                              : 18.0 MiB (15%)
    
    ffmpeg.exe -i second.half.mp4  -shortest -s:v 640x480 -c:v libx264 -tune stillimage -c:a  libmp3lame -b:a 128k -r:a 48000 radio.show.second.half.mp4
    
    OUTPUT:
    Complete name                            : C:\radio.show.second.half.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom
    File size                                : 103 MiB
    Duration                                 : 19mn 41s
    Overall bit rate                         : 731 Kbps
    Writing application                      : Lavf55.35.101
    
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L3.0
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 4 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 19mn 41s
    Bit rate                                 : 595 Kbps
    Width                                    : 640 pixels
    Height                                   : 480 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Constant
    Frame rate                               : 25.000 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.078
    Stream size                              : 83.8 MiB (81%)
    Writing library                          : x264 core 142 r2409 d6b4e63
    Encoding settings                        : cabac=1 / ref=3 / deblock=1:-3:-3 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=2.00:0.70 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-4 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.20
    
    Audio
    ID                                       : 2
    Format                                   : MPEG Audio
    Format version                           : Version 1
    Format profile                           : Layer 3
    Mode                                     : Joint stereo
    Mode extension                           : MS Stereo
    Codec ID                                 : 6B
    Duration                                 : 19mn 41s
    Duration_LastFrame                       : -1ms
    Bit rate mode                            : Constant
    Bit rate                                 : 128 Kbps
    Channel(s)                               : 2 channels
    Sampling rate                            : 44.1 KHz
    Compression mode                         : Lossy
    Stream size                              : 18.0 MiB (18%)
    Writing library                          : LAME3.99.5
    Quote Quote  
  4. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    I noticed this error when creating the second MP4 file:
    Code:
    -tune stillimage
    After removing this wrong switch, the two files aren't identical:
    • The first file: aspect ratio 4:3, sample frequency 48000Hz
    • The second file: aspect ratio 1:1,77, sample frequency 44100Hz
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!